/* Modern CSS Reset */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6A00;
    --secondary-color: #0A1F44;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --gray: #e0e0e0;
    --dark-gray: #333333;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}


/* Typography */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}


/* Container */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}


/* Header & Navigation */

.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .navbar {
        padding: 1rem 0;
        gap: 2rem;
        flex-wrap: nowrap;
    }
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 60px;
    width: 60px;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .logo img {
        height: 50px;
    }
}

.search-container {
    flex: 1;
    min-width: 200px;
    order: 3;
    width: 100%;
}

@media (min-width: 768px) {
    .search-container {
        order: initial;
        width: auto;
        max-width: 500px;
    }
}

.search-container form {
    display: flex;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 2px solid var(--gray);
    border-right: none;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .search-input {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    padding: 0.6rem 1.2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

@media (min-width: 768px) {
    .search-btn {
        padding: 0.75rem 1.5rem;
    }
}

.search-btn:hover {
    background: #e55e00;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
    order: 2;
}

@media (min-width: 768px) {
    .nav-icons {
        gap: 1.5rem;
        order: initial;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--dark-gray);
    text-decoration: none;
    font-size: 0.7rem;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .nav-item {
        font-size: 0.875rem;
    }
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

@media (min-width: 768px) {
    .nav-item i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Hero Section - Completely Redesigned */

.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a2f5a 100%);
    color: var(--white);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .hero-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: center;
    }
}

.hero-text {
    text-align: center;
}

@media (min-width: 768px) {
    .hero-text {
        text-align: left;
    }
}

.hero-text h1 {
    font-size: clamp(1.8rem, 6vw, 3.5rem);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.hero-text .highlight {
    color: var(--primary-color);
}

.hero-text p {
    font-size: clamp(1rem, 4vw, 1.25rem);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .hero-text p {
        margin-bottom: 2rem;
    }
}

.hero-badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .hero-badge {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-buttons {
        justify-content: flex-start;
        gap: 1rem;
    }
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .btn {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #e55e00;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--secondary-color);
}


/* Hero Collage - Fixed Image Sizes */

.hero-collage {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 480px) {
    .hero-collage {
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .hero-collage {
        max-width: 500px;
        margin: 0;
    }
}

.collage-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 0.75rem;
    backdrop-filter: blur(10px);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .collage-item {
        padding: 1rem;
    }
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 120px;
    max-height: 120px;
}

@media (min-width: 480px) {
    .collage-item img {
        max-width: 140px;
        max-height: 140px;
    }
}

@media (min-width: 768px) {
    .collage-item img {
        max-width: 160px;
        max-height: 160px;
    }
}


/* Categories Grid - Improved Responsive */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

@media (min-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1rem;
        margin: 2rem 0;
    }
}

.category-card {
    background: var(--white);
    border-radius: var(--border-radius-md);
    padding: 1rem 0.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--dark-gray);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

@media (min-width: 768px) {
    .category-card {
        padding: 1.5rem 1rem;
    }
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .category-card i {
        font-size: 2rem;
    }
}

.category-card span {
    display: block;
    font-weight: 500;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .category-card span {
        font-size: 0.9rem;
    }
}


/* Products Grid - Improved Responsive */

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

@media (min-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        margin: 2rem 0;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 1;
}

@media (min-width: 768px) {
    .product-badge {
        top: 1rem;
        left: 1rem;
        padding: 0.25rem 0.75rem;
        font-size: 0.875rem;
    }
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .product-info {
        padding: 1rem;
    }
}

.product-title {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .product-title {
        font-size: 1rem;
    }
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .current-price {
        font-size: 1.25rem;
    }
}

.old-price {
    font-size: 0.7rem;
    color: #999;
    text-decoration: line-through;
}

@media (min-width: 768px) {
    .old-price {
        font-size: 0.875rem;
    }
}

.discount {
    background: #ff4444;
    color: var(--white);
    padding: 0.2rem 0.4rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.6rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    .discount {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

.add-to-cart {
    width: 100%;
    padding: 0.5rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.75rem;
    margin-top: auto;
}

@media (min-width: 768px) {
    .add-to-cart {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

.add-to-cart:hover {
    background: var(--primary-color);
}


/* Flash Sale Banner */

.flash-sale {
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .flash-sale {
        padding: 1rem 2rem;
        gap: 1rem;
        margin: 2rem 0;
    }
}

.flash-sale i {
    font-size: 1.2rem;
}

@media (min-width: 768px) {
    .flash-sale i {
        font-size: 1.5rem;
    }
}

.flash-sale span {
    font-weight: 600;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .flash-sale span {
        font-size: 1.1rem;
    }
}

.timer {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.timer-block {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .timer-block {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}


/* Features Section */

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .features-grid {
        gap: 2rem;
        margin: 3rem 0;
    }
}

.feature-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.feature-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .feature-card i {
        font-size: 2.5rem;
    }
}

.feature-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .feature-card h4 {
        font-size: 1.1rem;
    }
}

.feature-card p {
    color: #666;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .feature-card p {
        font-size: 0.9rem;
    }
}


/* Newsletter */

.newsletter {
    background: linear-gradient(135deg, var(--primary-color), #ff8c33);
    padding: 2.5rem 0;
    margin: 2rem 0;
    color: var(--white);
}

@media (min-width: 768px) {
    .newsletter {
        padding: 4rem 0;
        margin: 3rem 0;
    }
}

.newsletter-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 1rem;
}

.newsletter h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .newsletter h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
}

.newsletter p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .newsletter p {
        margin-bottom: 2rem;
        font-size: 1rem;
    }
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .newsletter-form {
        flex-direction: row;
        gap: 0.5rem;
    }
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .newsletter-input {
        padding: 1rem;
        font-size: 1rem;
    }
}

.newsletter-input:focus {
    outline: none;
}

.newsletter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .newsletter-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

.newsletter-btn:hover {
    background: #1a2f5a;
}


/* Footer */

.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 2rem 0 1rem;
}

@media (min-width: 768px) {
    .footer {
        padding: 3rem 0 1rem;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .footer-col h4 {
        margin-bottom: 1rem;
        font-size: 1.1rem;
    }
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .footer-col ul li {
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
    }
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .social-links {
        gap: 1rem;
        margin-top: 1rem;
    }
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .social-links a {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        padding-top: 2rem;
        font-size: 0.875rem;
    }
}


/* Section Headers */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 1.5rem;
    }
}

.section-header h2 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .section-header h2 {
        font-size: 1.75rem;
    }
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .view-all {
        font-size: 1rem;
    }
}

.view-all:hover {
    color: var(--secondary-color);
}


/* Toast Notifications */

.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    background: var(--white);
    color: var(--dark-gray);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 2000;
    max-width: 350px;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .toast {
        left: auto;
        right: 2rem;
        bottom: 2rem;
    }
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}


/* Loading Spinner */

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@media (min-width: 768px) {
    .spinner {
        width: 40px;
        height: 40px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Utility Classes */

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}


/* Hide on mobile/desktop */

.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: block;
    }
    .hide-desktop {
        display: none;
    }
}