/* ========== GOOGLE FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&family=Playfair+Display:wght@700;800;900&display=swap');

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0a2a 0%, #1a0b2e 50%, #0f0c3a 100%);
    color: #fff;
    min-height: 100vh;
}

a{
    text-decoration: none;
}

/* ========== STICKY NAVBAR ========== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(15, 15, 45, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-image {
    height: 45px;
    width: auto;
    display: block;
}

.logo-icon {
    display: none;
}

.logo-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f0f0ff, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text .tagline-small {
    font-size: 0.6rem;
    color: #a78bfa;
}

/* Search Bar */
.nav-search {
    flex: 1;
    max-width: 400px;
}

.search-wrapper {
    position: relative;
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a78bfa;
}

.nav-search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 2rem;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.nav-search-input:focus {
    outline: none;
    border-color: #c084fc;
    background: rgba(139, 92, 246, 0.2);
}

.nav-search-input::placeholder {
    color: #94a3b8;
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #c084fc;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #c084fc;
}

/* ========== MAIN LAYOUT ========== */
.products-main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    gap: 2rem;
}

/* ========== SIDEBAR - STICKY ON DESKTOP ONLY ========== */
.filters-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 1.5rem;
    height: fit-content;
}

/* Only sticky on screens 992px and above */
@media screen and (min-width: 992px) {
    .filters-sidebar {
        position: sticky;
        top: 90px;
    }
}

.filters-sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    color: #c084fc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sort Box */
.sort-box {
    margin-bottom: 1.5rem;
}

.sort-box select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.sort-box select option {
    background: #1a0b2e;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.category-list button {
    width: 100%;
    text-align: left;
    padding: 0.7rem 1rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.category-list button:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
    transform: translateX(5px);
}

.category-list button.active {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: white;
}

/* ========== PRODUCTS GRID ========== */
.products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: all 0.4s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.product-image {
    width: 100%;
    height: 220px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1rem;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #c084fc;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #c084fc;
    margin-top: 0.4rem;
}

.no-products {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
    grid-column: 1 / -1;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(15, 15, 45, 0.98), rgba(26, 11, 46, 0.98));
    border-radius: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: #c084fc;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2001;
}

.modal-close:hover {
    color: #fff;
    background: rgba(139, 92, 246, 0.3);
}

.modal-image {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.modal-image img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.modal-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.modal-category {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #c084fc;
    width: fit-content;
}

.modal-info p {
    color: #94a3b8;
    line-height: 1.5;
    font-size: 0.85rem;
}

/* Price Breakdown */
.price-breakdown {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 0.8rem;
}

.price-breakdown h3 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #c084fc;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    font-size: 0.8rem;
}

.price-row.total {
    border-bottom: none;
    margin-top: 0.3rem;
    padding-top: 0.5rem;
    font-weight: 700;
    color: #c084fc;
    font-size: 0.9rem;
}

/* Color Variants */
.color-variants h3 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #c084fc;
}

.color-options {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.color-option {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.color-option.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px #c084fc;
}

/* Quantity */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.quantity-selector label {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: #c084fc;
    font-size: 1rem;
    cursor: pointer;
}

.qty-input {
    width: 50px;
    text-align: center;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: #fff;
}

/* Action Buttons */
.modal-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.btn-enquire, .btn-whatsapp {
    flex: 1;
    padding: 0.7rem;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-enquire {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    border: none;
    color: white;
}

.btn-whatsapp {
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid #25d366;
    color: #25d366;
}

/* ========== RESPONSIVE - TABLET (SIDEBAR NOT STICKY) ========== */
@media screen and (max-width: 991px) {
    .products-main {
        flex-direction: column;
    }
    
    .filters-sidebar {
        width: 100%;
        position: static !important;
    }
    
    .category-list {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
        overflow-x: auto;
    }
    
    .category-list button {
        width: auto;
        white-space: nowrap;
    }
    
    .category-list button:hover {
        transform: translateY(-2px);
    }
    
    .nav-search {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media screen and (max-width: 768px) {
    /* Navbar - stays sticky */
    .navbar {
        padding: 0.8rem 1rem;
    }
    
    /* Hide menu and nav links */
    .menu-toggle {
        display: none;
    }
    
    .nav-links {
        display: none !important;
    }
    
    /* Logo and search side by side */
    .nav-container {
        flex-wrap: nowrap;
    }
    
    .logo-text {
        display: none;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .logo {
        flex-shrink: 0;
    }
    
    .nav-search {
        flex: 1;
        margin: 0;
    }
    
    .products-main {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: 0.6rem;
    }
    
    .product-info h3 {
        font-size: 0.8rem;
    }
    
    .filters-sidebar {
        padding: 1rem;
    }
    
    /* Modal mobile */
    .modal-body {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-image img {
        max-height: 200px;
    }
    
    .modal-info h2 {
        font-size: 1.2rem;
    }
}

/* ========== EXTRA SMALL DEVICES ========== */
@media screen and (max-width: 480px) {
    .logo-image {
        height: 35px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.8rem;
    }
    
    .product-image {
        height: 140px;
    }
    
    .modal-body {
        padding: 0.8rem;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    animation: modalFadeIn 0.3s ease;
}

/* Image Gallery Styles */
.product-gallery {
    margin-bottom: 1rem;
}

.main-image {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.8rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    cursor: pointer;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image img:hover {
    transform: scale(1.05);
}

.thumbnail-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail.active {
    border-color: #c084fc;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: #a855f7;
}

/* Variant Selector Styles */
.variant-selector {
    margin: 1rem 0;
}

.variant-selector h3 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #c084fc;
}

.variant-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.variant-btn {
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 2rem;
    color: #cbd5e1;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.variant-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #c084fc;
}

.variant-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    border-color: transparent;
    color: white;
}

/* Fullscreen Image Modal */
.image-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.image-viewer.active {
    display: flex;
}

.image-viewer img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.image-viewer-close {
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    z-index: 3001;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: #c084fc;
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .main-image {
        height: 220px;
    }
    
    .thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .variant-btn {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }
}
