/* ========================================
   APPLE PARALLAX COMPONENTS - FIXED
   ======================================== */

/* ===== HEADER & NAVIGATION ===== */
.header-main {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid #d2d2d7;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px;
    padding: 0.5rem 2rem;
}

.brand {
    font-size: 1.32rem;
    font-weight: 600;
}

.brand a {
    color: #1d1d1f;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-item {
    position: relative;
}

.nav-item>a {
    color: #1d1d1f;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-item>a:hover {
    color: #0066cc;
}

.chevron {
    font-size: 0.6rem;
    opacity: 0.5;
}

/* Mega Menu Dropdown */
.mega-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    padding: 1.5rem;
    min-width: 240px;
    z-index: 1000;
    margin-top: 0.5rem;
    border: 1px solid #e5e5e5;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item:hover .mega-menu-dropdown {
    display: block;
}

.mega-menu-column h4 {
    font-size: 0.78rem;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.mega-menu-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu-column li {
    margin-bottom: 0.15rem;
}

.mega-menu-column a {
    font-size: 0.96rem;
    color: #1d1d1f;
    text-decoration: none;
    display: block;
    padding: 0.2rem 0;
}

.mega-menu-column a:hover {
    color: #0066cc;
}

.mega-menu-column .count {
    font-size: 0.78rem;
    color: #86868b;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon {
    font-size: 1.5rem;
    color: #1d1d1f;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.header-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #0066cc;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 50px;
    min-width: 18px;
    text-align: center;
}

/* ===== HERO SECTION ===== */
.hero {
    height: 40vh;
    min-height: 250px;
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #1d1d1f;
    color: white;
}

.hero-content {
    max-width: 500px;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.08rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.btn-apple {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.96rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.btn-apple:hover {
    background: #0055aa;
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* ===== STOREFRONT SECTIONS ===== */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.storefront-section {
    padding: 2rem 0;
}

.storefront-section.alt {
    background: #f5f5f7;
}

/* ===== LAYOUT GRID ===== */
.layout-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
}

/* ===== SIDEBAR & FILTERS ===== */
.sidebar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    height: calc(100vh - 100px);
    position: sticky;
    top: 80px;
    border: 1px solid #e5e5e5;
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 10px;
}

.filter-section {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-section h3 {
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
    text-transform: uppercase;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

.filter-checkbox input {
    accent-color: #0066cc;
    width: 12px;
    height: 12px;
}

.filter-checkbox .count {
    margin-left: auto;
    font-size: 0.78rem;
    color: #999;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.sort-options select {
    padding: 0.3rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
}

/* ===== PRODUCT CARDS ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    min-height: 800px;
}

.product-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #0066cc;
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ff6600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1d1d1f;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: auto;
}

.price-now {
    font-size: 1.32rem;
    font-weight: 700;
    color: #1d1d1f;
}

.price-was {
    font-size: 0.96rem;
    color: #86868b;
    text-decoration: line-through;
}

.price-vat {
    font-size: 0.9rem;
    left: 0.4rem;
    background: #ff6600;
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 50px;
}

.countdown {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.countdown-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    opacity: 0.6;
}

/* ===== LOAD MORE PAGINATION ===== */
.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 1rem 0;
    width: 100%;
}

.showing-text {
    font-size: 0.9rem;
    color: #86868b;
}

.load-more-btn {
    min-width: 200px;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* ===== CART DRAWER ===== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    z-index: 2001;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #86868b;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f5f5f7;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: #f9f9f9;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: #1d1d1f;
}

.cart-empty {
    text-align: center;
    padding: 2rem;
    color: #86868b;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e5e5;
    background: #f9f9f9;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .cart-drawer {
        width: 100%;
        right: -100%;
    }
}

/* ===== LOADING & ERROR ===== */
.loading,
.error {
    text-align: center;
    padding: 2rem;
    font-size: 1.02rem;
    color: #999;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero {
        height: 30vh;
    }

    .layout-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== FOOTER ===== */
.footer-main {
    background: #f5f5f7;
    padding: 3rem 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.8rem;
    text-transform: none;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    font-size: 0.84rem;
    color: #515154;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    font-size: 0.84rem;
    color: #86868b;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
}

/* ===== QUICK VIEW MODAL ===== */
.qv-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.qv-content {
    background: white;
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    animation: modalScale 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalScale {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.qv-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: #86868b;
    cursor: pointer;
    z-index: 10;
}

.qv-gallery img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.qv-info h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.qv-info p {
    font-size: 1.08rem;
    color: #515154;
    line-height: 1.6;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .qv-content {
        grid-template-columns: 1fr;
    }
}

/* ===== PRODUCT CARD ACTIONS ===== */
.add-to-cart-btn-card {
    margin-top: 1rem;
    width: 100%;
    padding: 0.6rem;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.add-to-cart-btn-card:hover {
    background: #0055aa;
    transform: translateY(-1px);
}

.product-card-action {
    margin-top: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f5f5f7;
    border-radius: 12px;
    justify-content: center;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #d2d2d7;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
}

.qty-btn:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
    transform: scale(1.05);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-display {
    min-width: 32px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #1d1d1f;
}


/* ===== MOBILE RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
    /* Fix stuck images - remove fixed heights */
    .sidebar {
        position: static;
        height: auto;
        max-height: none;
        overflow: visible;
        display: none; /* Hide sidebar on mobile */
    }
    
    /* Single column product grid */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }
    
    /* Full width product cards */
    .product-card {
        padding: 1rem;
    }
    
    /* Product image sizing */
    .product-image {
        aspect-ratio: 1;
        max-height: 250px;
    }
    
    /* Footer responsive */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    /* Header adjustments */
    .header-main .container {
        padding: 0.5rem 1rem;
    }
    
    .brand {
        font-size: 1.1rem;
    }
    
    /* Container padding */
    .container {
        padding: 0 1rem;
    }
    
    /* Hero section */
    .hero {
        height: auto;
        min-height: 150px;
        padding: 2rem 1rem;
    }
    
    /* Layout grid single column */
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Section spacing */
    .section {
        padding: 1.5rem 0;
    }
    
    /* Product price */
    .price-now {
        font-size: 1.1rem;
    }
    
    /* Add to cart button */
    .add-to-cart-btn-card {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    
    /* Quantity controls */
    .quantity-controls {
        padding: 0.4rem;
    }
    
    .qty-btn {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .brand {
        font-size: 1rem;
    }
    
    .header-icons {
        gap: 0.5rem;
    }
    
    .header-icon i {
        font-size: 1.1rem;
    }
}


/* ===== MOBILE FILTER DRAWER ===== */
.mobile-filter-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0066cc 0%, #0055aa 100%);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.4);
    transition: all 0.3s ease;
}

.mobile-filter-btn i {
    margin-right: 0.5rem;
}

.mobile-filter-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 102, 204, 0.5);
}

@media (max-width: 768px) {
    .mobile-filter-btn {
        display: flex;
        align-items: center;
    }
    
    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100%;
        z-index: 2000;
        background: white;
        padding: 1.5rem;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    
    .sidebar.open {
        display: block;
        transform: translateX(0);
    }
    
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }
    
    .filter-overlay.open {
        display: block;
    }
    
    .filter-close-btn {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .filter-close-btn h3 {
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    .filter-close-btn button {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: #86868b;
    }
}
