:root {
    --primary: #dc2626;
    --secondary: #991b1b;
    --accent: #ef4444;
    --dark: #000000;
    --light: #fef2f2;
    --success: #25D366;
    --white: #ffffff;
    --gray: #6b7280;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 0.5rem 0 0.2rem 0;
    position: relative;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo img {
    height: 38px;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-right: 0;
}

/* Main menu (nav) */
.main-menu {
    flex: 1;
}

.nav-list {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    list-style: none;
}

.nav-list a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;      /* slightly increased for uppercase */
    text-transform: uppercase;   /* ALL CAPS */
    transition: opacity 0.2s;
    white-space: nowrap;
}

.nav-list a:hover {
    opacity: 0.85;
    border-bottom: 2px solid var(--white);
}

/* Active menu item - desktop */
.nav-list a.active {
    border-bottom: 2px solid var(--white);
    font-weight: 800;
    opacity: 1;
}

/* Products Grid */
.products-grid {
    display: grid;
    gap: 1.5rem;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

.products-grid {
    grid-template-columns: 1fr;
}

/* Product Detail Page Styles */
.breadcrumb {
    margin: 1rem 0;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.product-detail {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
    overflow: hidden;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.product-gallery-main {
    position: relative;
    background: #f8f8f8;
    border-radius: var(--radius);
    overflow: hidden;
}

.main-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    transform: translateY(-50%);
    z-index: 10;
}

.gallery-nav button {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.gallery-nav button:hover {
    background: var(--white);
    transform: scale(1.05);
}

.thumbnail-strip {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.thumbnail {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    object-fit: cover;
}

.thumbnail.active {
    border-color: var(--primary);
    transform: scale(0.98);
}

.product-info-detail {
    padding: 0.5rem 0;
}

.product-brand-detail {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.product-title-detail {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0 0.75rem;
    line-height: 1.2;
}

.product-price-detail {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1rem 0;
}

.product-fabric-detail {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: inline-block;
    background: var(--light);
    padding: 0.25rem 0.75rem;
    border-radius: 30px;
}

.product-description-detail {
    color: #374151;
    line-height: 1.6;
    margin: 1.5rem 0;
    font-size: 1rem;
}

.whatsapp-btn-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--success);
    color: var(--white);
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 40px;
    font-weight: 700;
    text-decoration: none;
    gap: 12px;
    transition: background 0.2s;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.whatsapp-btn-detail:hover {
    background: #128C7E;
}

.sold-out-badge-detail {
    background: var(--dark);
    color: white;
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 700;
    margin-top: 1rem;
}

.similar-section {
    margin: 3rem 0 2rem;
}

.similar-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.similar-title:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.similar-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 480px) {
    .similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 768px) {
    .similar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    .similar-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.similar-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.similar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.similar-img {
    width: 100%;
    aspect-ratio: 1 / 1.25;
    object-fit: cover;
    object-position: top center;
}

.similar-info {
    padding: 0.75rem;
}

.similar-brand {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.similar-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

.similar-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.not-found {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: var(--radius);
    margin: 2rem 0;
}

@media (min-width: 320px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}

@media (min-width: 375px) {
    .products-grid {
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    }
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.product-gallery {
    position: relative;
    width: 100%;
    padding-bottom: 125%;
    overflow: hidden;
    background: #f8f8f8;
    border-radius: 8px 8px 0 0;
}

.image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

.product-card:hover .image-link img {
    transform: scale(1.02);
}

.sold-out-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--dark);
    color: var(--white);
    padding: 0.4rem 0.9rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.75rem;
    z-index: 15;
}

.product-info {
    padding: 1rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
}

.product-brand {
    color: var(--primary);
    font-weight: 700;
}

.product-fabric {
    color: var(--gray);
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0.5rem 0 0.6rem;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success);
    color: var(--white);
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    gap: 8px;
    transition: background 0.2s;
    font-size: 0.85rem;
}

.whatsapp-btn:hover {
    background: #128C7E;
}

.whatsapp-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
}

.loading, .error {
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: var(--gray);
}

.no-products {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 24px;
}

/* Mobile Styles with Enhanced Dropdown */
@media (max-width: 768px) {
    header {
        z-index: 1000;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        order: unset;
        z-index: 1001;
    }
    
    .header-container {
        justify-content: space-between;
    }
    
    .nav-list {
        display: none;
        flex-direction: column;
        background: rgba(220, 38, 38, 0.98);
        backdrop-filter: blur(8px);
        padding: 0.5rem 0;
        gap: 0;
        z-index: 1002;
        box-shadow: 0 12px 24px rgba(0,0,0,0.2);
        border-radius: 0 0 20px 20px;
        transition: all 0.3s ease;
        transform-origin: top;
        transform: scaleY(0);
        opacity: 0;
        visibility: hidden;
        margin: 0;
    }
    
    .nav-list.show {
        display: flex;
        transform: scaleY(1);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list li {
        text-align: center;
        padding: 0;
        border-bottom: none;
    }
    
    .nav-list a {
        font-size: 1rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        display: block;
        white-space: normal;
        padding: 0.85rem 1rem;
        transition: background-color 0.2s ease;
        border-bottom: none;
    }
    
    .nav-list a:hover {
        background-color: rgba(255, 255, 255, 0.15);
        transform: none;
        border-bottom: none;
    }
    
    /* Active menu item on mobile */
    .nav-list a.active {
        background-color: rgba(255, 255, 255, 0.25);
        border-bottom: none;
        font-weight: 800;
    }
    
    .product-info {
        padding: 0.75rem;
    }
    
    .product-title {
        font-size: 0.85rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .whatsapp-btn {
        padding: 0.6rem;
        font-size: 0.75rem;
    }
}

/* Footer Styles */
footer {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.social-links a {
    margin: 0 12px;
    font-size: 1.5rem;
    transition: opacity 0.2s;
    color: white;
}

.social-links a:hover {
    opacity: 0.7;
}