/**
 * Taban24 Storefront Custom CSS
 * Pure Vanilla CSS - Marketplace Main Shop Styling
 */

/* Header / Main Navbar (Non-sticky: scrolls naturally with page) */
.shop-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 950;
    box-shadow: var(--shadow-sm);
}

body.mega-menu-open .shop-header,
.shop-header:has(.mega-menu-wrapper.open) {
    z-index: 100000 !important;
}

.shop-topbar {
    padding-block: 0.65rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topbar-announcement {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.topbar-main-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.topbar-actions {
    flex-shrink: 0;
}

.shop-navbar-main {
    padding-block: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.header-brand-logo {
    text-decoration: none;
    flex-shrink: 0;
}

.brand-title-group {
    display: flex;
    flex-direction: column;
}

.header-action-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.shop-search-bar {
    flex: 1;
    max-width: 580px;
    position: relative;
}

.shop-search-input {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 1rem;
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    outline: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.shop-search-input:focus {
    background-color: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.shop-search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.cart-btn-wrapper {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    background-color: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 19px;
    height: 19px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Category Navigation Bar */
.category-nav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-block: 0.65rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 70, 229, 0.3) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.category-nav::-webkit-scrollbar {
    height: 5px;
}
.category-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-full);
}
.category-nav::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.35);
    border-radius: var(--radius-full);
}
.category-nav::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.cat-pill {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.cat-pill:hover, .cat-pill.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Hero Carousel / Banner Area */
.shop-hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-block: 1.75rem;
}

@media (max-width: 850px) {
    .shop-hero-grid {
        grid-template-columns: 1fr;
    }
}

.hero-main-card {
    background: linear-gradient(135deg, #312e81, #1e1b4b);
    border-radius: var(--radius-lg);
    padding: 2.75rem 2.25rem;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-main-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.35), transparent 70%);
    border-radius: 50%;
}

.hero-side-card {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    margin-block: 1.5rem;
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.4);
}

.product-thumb {
    width: 100%;
    height: 200px;
    background-color: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-thumb img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-thumb img {
    transform: scale(1.05);
}

.product-badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--danger);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
}

.product-details {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.product-vendor-info {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.45;
    margin-bottom: 0.65rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-box {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.product-price-old {
    font-size: 0.8rem;
    color: var(--text-subtle);
    text-decoration: line-through;
}

.product-price-current {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Features Bar */
.features-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-block: 3.5rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
}

@media (max-width: 768px) {
    .features-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .features-bar {
        grid-template-columns: 1fr;
    }
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* =========================================
   Unified Responsive Storefront Footer
   ========================================= */
.shop-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding-top: 2.75rem;
    padding-bottom: 2rem;
    margin-top: 3.5rem;
}

/* Footer Top Row: Brand & Back to Top */
.footer-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.footer-brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-img {
    max-height: 40px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.footer-logo-fallback {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.footer-site-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.footer-site-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.footer-back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.footer-back-to-top:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* Feature Badges Strip */
.footer-features-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding: 1.15rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.footer-feature-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.footer-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.footer-feature-text {
    display: flex;
    flex-direction: column;
}

.footer-feature-text strong {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 700;
}

.footer-feature-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Main Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1.3fr;
    gap: 2.5rem;
    margin-bottom: 2.25rem;
}

.footer-heading {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.85rem;
    position: relative;
    padding-bottom: 0.4rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-about-text {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.85;
}

/* Nav Columns (Nested Grid) */
.footer-nav-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links-list li a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
}

.footer-links-list li a i {
    font-size: 0.7rem;
    opacity: 0.6;
    transition: transform 0.15s ease;
}

.footer-links-list li a:hover {
    color: var(--primary);
    transform: translateX(-3px);
}

.footer-links-list li a:hover i {
    opacity: 1;
    color: var(--primary);
}

.footer-highlight-link {
    color: #ef4056 !important;
    font-weight: 700 !important;
}

/* Contact Column */
.footer-phone-cta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.footer-phone-cta:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.footer-phone-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.footer-phone-info {
    display: flex;
    flex-direction: column;
}

.footer-phone-label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.footer-phone-number {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.footer-hours-note {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

/* Trust Badges Box */
.footer-trust-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-trust-item {
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.footer-trust-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.footer-trust-item i {
    font-size: 1.15rem;
    color: #f59e0b;
}

.footer-trust-item span {
    font-size: 0.52rem;
    font-weight: 700;
    color: #475569;
}

/* Social Media */
.footer-social-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.footer-social-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.footer-social-icons {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.social-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-icon-btn:hover {
    color: #fff;
    transform: translateY(-2px);
}

.social-icon-btn.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    border-color: transparent;
}

.social-icon-btn.telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
}

.social-icon-btn.whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
}

/* Footer Bottom */
.footer-bottom {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-bottom-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
}

/* Mobile Footer Optimization (max-width: 768px) */
@media (max-width: 768px) {
    .shop-footer {
        padding-top: 1.75rem;
        padding-bottom: 2rem;
        margin-top: 2.25rem;
    }

    .footer-top-row {
        padding-bottom: 1rem;
        margin-bottom: 1.25rem;
    }

    .footer-site-title {
        font-size: 1.05rem;
    }

    .footer-site-tagline {
        display: none;
    }

    .footer-back-to-top {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }

    .footer-features-strip {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 0.85rem 0.75rem;
        margin-bottom: 1.5rem;
    }

    .footer-feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.35rem;
    }

    .footer-feature-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .footer-feature-text strong {
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .footer-feature-text span {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .footer-about-text {
        font-size: 0.8rem;
        line-height: 1.6;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .footer-nav-columns {
        gap: 1.25rem;
        background: var(--bg-card);
        padding: 1rem;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-subtle);
    }

    .footer-links-list li a {
        font-size: 0.8rem;
        padding: 0.2rem 0;
    }

    .footer-phone-cta {
        padding: 0.6rem 0.85rem;
    }

    .footer-trust-box {
        justify-content: flex-start;
    }

    .footer-trust-item {
        width: 44px;
        height: 44px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding-top: 1rem;
    }

    .footer-copyright-text {
        font-size: 0.74rem;
        line-height: 1.6;
    }

    .footer-bottom-badge {
        display: none;
    }
}

/* =========================================
   Product Detail Page Styles
   ========================================= */
.product-detail-layout {
    display: grid;
    grid-template-columns: 450px 1fr 320px;
    gap: 1.75rem;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 1100px) {
    .product-detail-layout {
        grid-template-columns: 1fr 1fr;
    }
    .product-buy-box {
        grid-column: span 2;
    }
}
@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
    .product-buy-box {
        grid-column: span 1;
    }
}

.gallery-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-display {
    width: 100%;
    height: 380px;
    background-color: var(--bg-page);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.main-image-display img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.gallery-thumb-item {
    width: 65px;
    height: 65px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    cursor: pointer;
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--transition);
}

.gallery-thumb-item.active, .gallery-thumb-item:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Variant Pickers: Colors & Sizes */
.variant-section {
    margin-block: 1.25rem;
    padding-block: 1rem;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.variant-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: var(--text-main);
}

.color-options {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.color-option-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-surface);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.color-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
}

.color-option-btn.active, .color-option-btn:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.size-options {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.size-option-btn {
    min-width: 44px;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-surface);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
}

.size-option-btn.active, .size-option-btn:hover {
    border-color: var(--primary);
    background-color: var(--primary);
    color: #ffffff;
}

/* Seller Card & Buy Box */
.product-buy-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: fit-content;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
}

.seller-header-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1rem;
}

.seller-avatar-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #0284c7, #06b6d4);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.quantity-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-page);
    overflow: hidden;
}

.quantity-stepper button {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-stepper button:hover {
    background-color: var(--border-color);
}

.quantity-stepper span {
    width: 40px;
    text-align: center;
    font-weight: 700;
}

/* Tabs Section: Description, Specs, Reviews */
.tabs-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 3.5rem;
}

.tabs-nav-bar {
    display: flex;
    gap: 1.5rem;
    border-bottom: 2px solid var(--border-subtle);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding-block: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    left: 0;
    height: 2.5px;
    background-color: var(--primary);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr:nth-child(even) {
    background-color: var(--bg-page);
}

.spec-table td {
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-subtle);
}

.spec-table td:first-child {
    font-weight: 700;
    color: var(--text-muted);
    width: 250px;
}

/* =========================================
   Cart Added Pop-up Modal
   ========================================= */
.cart-added-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 100070;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.cart-added-modal {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cart-added-header {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    padding-left: 2.75rem;
}

.cart-added-close-btn {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.cart-added-close-btn:hover {
    background: rgba(255, 255, 255, 0.45);
}

.cart-added-body {
    padding: 1.35rem;
}

.cart-added-product-info {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--bg-page);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.cart-added-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 576px) {
    .cart-added-modal-backdrop {
        padding: 0.75rem;
        align-items: center;
    }
    .cart-added-modal {
        border-radius: var(--radius-lg);
        max-width: 100%;
    }
    .cart-added-header {
        padding: 0.85rem 1rem;
        padding-left: 2.5rem;
        gap: 0.5rem;
    }
    .cart-added-header span {
        font-size: 0.88rem !important;
        line-height: 1.45;
        font-weight: 700 !important;
    }
    .cart-added-header svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }
    .cart-added-body {
        padding: 1rem 0.85rem;
    }
    .cart-added-product-info {
        padding: 0.65rem 0.75rem;
        gap: 0.65rem;
        margin-bottom: 1rem;
    }
    .cart-added-product-info h4 {
        font-size: 0.85rem !important;
    }
    .cart-added-actions {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .cart-added-actions .btn {
        width: 100%;
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
}

/* =========================================
   Cart & Checkout Pages
   ========================================= */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.75rem;
    margin-block: 2rem;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

.cart-item-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1rem;
    align-items: center;
    transition: var(--transition);
}

.cart-item-card:hover {
    box-shadow: var(--shadow-sm);
}

.cart-summary-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   Left Off-Canvas Shopping Cart Drawer
   ========================================================================== */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 410px;
    max-width: 90vw;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    box-shadow: 12px 0 35px rgba(0, 0, 0, 0.28);
    z-index: 1060;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface);
}

.cart-drawer-close-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-page);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.cart-drawer-close-btn:hover {
    background-color: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger);
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 70, 229, 0.25) transparent;
}

.cart-drawer-body::-webkit-scrollbar {
    width: 5px;
}
.cart-drawer-body::-webkit-scrollbar-thumb {
    background-color: rgba(79, 70, 229, 0.3);
    border-radius: var(--radius-full);
}

.cart-drawer-items {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cart-drawer-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem;
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.cart-drawer-item:hover {
    border-color: var(--border-focus);
}

.cart-drawer-item-img {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.cart-drawer-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-drawer-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cart-drawer-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.35rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cart-drawer-item-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

.cart-drawer-item-title a:hover {
    color: var(--primary);
}

.cart-drawer-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.cart-drawer-item-meta .meta-tag {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

.cart-drawer-item-meta .meta-shop {
    color: var(--primary);
    font-weight: 600;
}

.cart-drawer-item-pricing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
}

.cart-drawer-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cart-drawer-stepper button {
    width: 26px;
    height: 26px;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: var(--transition);
}

.cart-drawer-stepper button:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.cart-drawer-stepper span {
    min-width: 24px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.cart-drawer-item-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.cart-drawer-item-price .price-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
}

.cart-drawer-item-price .price-unit {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.cart-drawer-item-del {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-drawer-item-del:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

.cart-drawer-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

.cart-drawer-empty .empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.cart-drawer-empty h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.cart-drawer-empty p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.cart-drawer-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.cart-drawer-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-drawer-total-row .total-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

.cart-drawer-total-row .total-price {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.cart-drawer-total-row .total-price strong {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--primary);
}

.cart-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.cart-drawer-btn-cart {
    height: 42px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cart-drawer-btn-checkout {
    height: 46px;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

/* ==========================================================================
   Dynamic Scroll Topbar (Appears only when main header scrolls away)
   ========================================================================== */
.scroll-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 920;
    transform: translateY(-100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, background-color 0.3s ease;
    padding-block: 0.5rem;
    pointer-events: none;
    opacity: 0;
}

[data-theme="dark"] .scroll-topbar {
    background-color: rgba(15, 23, 42, 0.94);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.scroll-topbar.visible {
    transform: translateY(0);
    pointer-events: auto;
    opacity: 1;
}

.scroll-topbar-cats-container {
    flex: 1;
    max-width: 56%;
    overflow: hidden;
}

.scroll-topbar-nav {
    padding-block: 0.15rem;
    gap: 0.45rem;
}

.scroll-topbar-search-form {
    position: relative;
    width: 170px;
    transition: width 0.3s ease;
}

.scroll-topbar-search-form:focus-within {
    width: 220px;
}

.scroll-topbar-search-input {
    width: 100%;
    padding: 0.4rem 1.8rem 0.4rem 0.75rem;
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    outline: none;
    font-size: 0.78rem;
    transition: var(--transition);
}

.scroll-topbar-search-input:focus {
    background-color: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.scroll-topbar-search-btn {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    .scroll-topbar-cats-container {
        max-width: 48%;
    }
}

/* ==========================================================================
   Digikala-style Navigation Bar & Cascading Mega Menu (طرح دیجی‌کالا)
   ========================================================================== */
.shop-nav-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-block: 0.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.nav-divider {
    width: 1px;
    height: 22px;
    background-color: var(--border-color);
    flex-shrink: 0;
}

.shop-quick-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    overflow-x: auto;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.quick-link:hover {
    color: var(--primary);
}

/* Mega Menu Wrapper */
.mega-menu-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.mega-menu-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.15s ease;
    user-select: none;
    position: relative;
    z-index: 870;
}

.mega-menu-trigger-btn:hover {
    color: #ef4056;
    border-color: #ef4056;
}

/* When open or hovered, button and dropdown fuse seamlessly into a single unit */
.mega-menu-wrapper:hover .mega-menu-trigger-btn,
.mega-menu-wrapper.open .mega-menu-trigger-btn {
    color: #ef4056;
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-bottom: 2px solid var(--bg-surface) !important;
    border-radius: 10px 10px 0 0 !important;
    margin-bottom: -1px;
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.04);
}

.mega-menu-trigger-btn .mega-chevron {
    transition: transform 0.2s ease;
}

.mega-menu-wrapper:hover .mega-chevron,
.mega-menu-wrapper.open .mega-chevron {
    transform: rotate(180deg);
}

/* Remove Backdrop Dimmer completely as requested */
.mega-menu-backdrop {
    display: none !important;
}

/* Mega Menu Dropdown Container - Extends Directly From The Button */
.mega-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 980px;
    max-width: 92vw;
    height: 500px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-top-right-radius: 0 !important; /* Seamless continuous right edge with the button */
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    box-shadow: 0 20px 42px -6px rgba(0, 0, 0, 0.14), 0 0 1px rgba(0, 0, 0, 0.08);
    z-index: 860;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    overflow: hidden;
    direction: rtl;
    pointer-events: none;
}

.mega-menu-wrapper:hover .mega-menu-dropdown,
.mega-menu-wrapper.open .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mega-menu-body {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.mega-menu-mobile-header,
.mega-menu-mobile-backdrop {
    display: none;
}

body.mega-menu-open {
    overflow: hidden !important;
}

/* Compact Mega Menu for Scroll Topbar */
.mega-menu-wrapper.compact .mega-menu-trigger-btn {
    padding: 0.32rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.mega-menu-wrapper.compact:hover .mega-menu-trigger-btn,
.mega-menu-wrapper.compact.open .mega-menu-trigger-btn {
    border-radius: 8px 8px 0 0 !important;
    border-bottom: 2px solid var(--bg-surface) !important;
}

.mega-menu-wrapper.compact .mega-menu-dropdown {
    top: 100%;
    height: 460px;
}

/* Right Sidebar: Main Categories (ستون راست موضوعات دیجی‌کالا) */
.mega-menu-sidebar {
    width: 220px;
    background-color: var(--bg-page);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.mega-cats-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.mega-cats-list::-webkit-scrollbar {
    width: 4px;
}
.mega-cats-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-full);
}

.mega-cat-item {
    display: flex;
    align-items: center;
    padding: 0.72rem 1.15rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-right: 3px solid transparent;
}

.mega-cat-item:hover,
.mega-cat-item.active {
    background-color: var(--bg-surface);
    color: #ef4056;
    font-weight: 700;
    border-right-color: #ef4056;
}

.mega-cat-item .mega-cat-icon {
    font-size: 1.15rem;
    margin-left: 0.6rem;
}

.mega-cat-item .mega-cat-name {
    flex: 1;
}

/* Left Content: Subcategories (پنل چپ و ستون‌های زیرمجموعه دیجی‌کالا) */
.mega-menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-surface);
    padding: 1.25rem 2rem;
}

.mega-sub-pane {
    display: none;
    flex-direction: column;
    height: 100%;
}

.mega-sub-pane.active {
    display: flex;
}

.mega-pane-top-row {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.mega-all-category-link {
    color: #0284c7;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition);
}

.mega-all-category-link:hover {
    color: #0369a1;
    text-decoration: underline;
}

/* Multi-Column Subcategories Layout */
.mega-sub-columns {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem 1.25rem;
    align-content: flex-start;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.mega-sub-columns::-webkit-scrollbar {
    width: 4px;
}
.mega-sub-columns::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-full);
}

.mega-sub-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.mega-col-title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    margin-bottom: 0.35rem;
    transition: var(--transition);
}

.mega-col-title .col-pipe {
    color: #ef4056;
    font-weight: 900;
    font-size: 0.95rem;
}

.mega-col-title .col-arrow {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-right: 0.15rem;
}

.mega-col-title:hover {
    color: #ef4056;
}

.mega-col-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.mega-col-items li a {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.15s ease;
    display: block;
}

.mega-col-items li a:hover {
    color: #ef4056;
}

.mega-sub-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1.5rem;
}

/* Tablet screens (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .mega-menu-dropdown {
        width: 760px;
        max-width: calc(100vw - 2rem);
    }
    .mega-sub-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Mobile Responsive Rules for Header, Topbar, Categories & Scroll Topbar
   ========================================================================== */
@media (max-width: 768px) {
    .hide-mobile,
    .header-action-btn.hide-mobile,
    .scroll-action-btn.hide-mobile,
    .btn.hide-mobile,
    a.hide-mobile,
    button.hide-mobile,
    span.hide-mobile {
        display: none !important;
    }

    /* 1. Compact Shop Topbar */
    .shop-topbar {
        padding-block: 0.45rem;
        font-size: 0.76rem;
    }

    /* 2. Main Navbar Wrapping */
    .shop-navbar-main {
        flex-wrap: wrap;
        padding-block: 0.65rem 0.45rem;
        gap: 0.6rem 0.4rem;
        align-items: center;
    }

    .header-brand-logo {
        order: 1;
        max-width: 55%;
        min-width: 0;
        flex-shrink: 1;
    }

    .header-brand-logo .brand-title {
        font-size: 1.05rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-brand-logo .brand-logo-badge,
    .header-brand-logo .brand-logo-img {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.15rem !important;
        flex-shrink: 0;
    }

    .header-action-group {
        order: 2;
        margin-inline-start: auto;
        gap: 0.35rem !important;
        flex-shrink: 0;
    }

    /* Icon-only Buttons on Mobile */
    .header-action-btn {
        width: 35px !important;
        height: 35px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 9px !important;
        font-size: 0.95rem !important;
        flex-shrink: 0;
    }

    .header-action-btn span {
        display: none !important;
    }

    .header-action-btn i {
        margin: 0 !important;
    }

    .header-action-btn.hide-mobile,
    .scroll-action-btn.hide-mobile,
    .header-admin-btn,
    .header-action-btn.header-admin-btn,
    .scroll-action-btn.header-admin-btn,
    a.header-admin-btn,
    button.header-admin-btn {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        overflow: hidden !important;
        pointer-events: none !important;
        position: absolute !important;
        opacity: 0 !important;
    }

    .cart-btn-wrapper .cart-badge {
        top: -4px !important;
        left: -4px !important;
    }

    .shop-search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        flex-basis: 100%;
        margin-top: 0.2rem;
    }

    .shop-search-input {
        padding: 0.65rem 2.6rem 0.65rem 0.85rem;
        font-size: 0.84rem;
    }

    /* 3. Navigation Bar & Quick Links - Completely Hidden on Mobile, Moved to Left Hamburger Drawer */
    .shop-nav-bar {
        display: none !important;
    }

    .quick-link {
        font-size: 0.8rem;
    }

    /* 4. Compact Scroll Topbar */
    .scroll-topbar {
        padding-block: 0.4rem;
        z-index: 980;
    }

    .scroll-topbar .container {
        padding-inline: 0.75rem;
        gap: 0.45rem;
    }

    .scroll-action-btn {
        width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 8px !important;
        font-size: 0.95rem !important;
    }

    .scroll-action-btn i {
        margin: 0 !important;
    }

    /* 5. Mobile Mega Menu Full-Screen Drawer */
    .mega-menu-wrapper.open .mega-menu-mobile-backdrop {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        background-color: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 100000 !important;
    }

    .mega-menu-wrapper.open .mega-menu-dropdown {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        z-index: 100001 !important;
        display: flex !important;
        flex-direction: column !important;
        background-color: var(--bg-surface) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
        animation: megaMenuSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes megaMenuSlideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .mega-menu-mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 1.15rem;
        background-color: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .mega-menu-close-btn {
        width: 36px;
        height: 36px;
        border-radius: var(--radius-full);
        border: 1px solid var(--border-color);
        background: var(--bg-page);
        color: var(--text-main);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        cursor: pointer;
        transition: var(--transition);
    }

    .mega-menu-close-btn:hover {
        background-color: #fee2e2;
        color: #ef4444;
        border-color: #fca5a5;
    }

    .mega-menu-body {
        display: flex !important;
        flex: 1 !important;
        width: 100% !important;
        height: calc(100dvh - 58px) !important;
        overflow: hidden !important;
    }

    .mega-menu-sidebar {
        width: 115px !important;
        max-width: 34vw !important;
        background-color: var(--bg-page) !important;
        border-left: 1px solid var(--border-color) !important;
        flex-shrink: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .mega-cats-list {
        padding: 0.25rem 0 !important;
    }

    .mega-cat-item {
        padding: 0.75rem 0.35rem !important;
        border-right: 3px solid transparent !important;
        border-bottom: 1px solid var(--border-subtle) !important;
        text-align: center;
        justify-content: center;
    }

    .mega-cat-item-inner {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 0.35rem !important;
        width: 100% !important;
    }

    .mega-cat-item .mega-cat-icon {
        margin: 0 !important;
        font-size: 1.35rem !important;
    }

    .mega-cat-item .mega-cat-name {
        font-size: 0.76rem !important;
        font-weight: 600 !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
    }

    .mega-cat-item.active {
        background-color: var(--bg-surface) !important;
        border-right-color: #ef4056 !important;
        color: #ef4056 !important;
    }

    .mega-menu-content {
        flex: 1 !important;
        padding: 0.85rem !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        background-color: var(--bg-surface) !important;
    }

    .mega-sub-pane {
        height: auto !important;
        min-height: 100% !important;
    }

    .mega-pane-top-row {
        margin-bottom: 0.85rem !important;
        padding-bottom: 0.5rem !important;
    }

    .mega-all-category-link {
        font-size: 0.82rem !important;
    }

    .mega-sub-columns {
        grid-template-columns: 1fr !important;
        gap: 1.1rem !important;
    }

    .mega-col-title {
        font-size: 0.86rem !important;
        padding: 0.25rem 0 !important;
    }

    .mega-col-items {
        gap: 0.35rem !important;
        margin-top: 0.25rem !important;
    }

    .mega-col-items li a {
        font-size: 0.8rem !important;
        padding: 0.25rem 0 !important;
        color: var(--text-muted) !important;
    }
}

/* Small mobile devices (< 480px) */
@media (max-width: 480px) {
    .hide-mobile-sm {
        display: none !important;
    }

    .brand-logo-img {
        max-height: 36px !important;
    }

    .brand-logo-badge {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.15rem !important;
    }

    .brand-title {
        font-size: 1.15rem !important;
    }

    .header-action-btn {
        padding: 0.35rem 0.55rem !important;
        font-size: 0.76rem !important;
    }

    .header-action-btn.cart-header-btn {
        padding-inline: 0.65rem !important;
    }

    .header-user-name {
        max-width: 65px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
    }

    .mega-menu-trigger-btn {
        padding: 0.36rem 0.6rem;
        font-size: 0.8rem;
        gap: 0.35rem;
    }

    .mega-menu-trigger-btn .mega-menu-icon {
        width: 16px;
        height: 16px;
    }
}

/* ==========================================================================
   Shop Catalog & Filter Sidebar Styles
   ========================================================================== */
.shop-cat-item {
    transition: all 0.15s ease;
    color: var(--text-main);
}

.shop-cat-item:hover {
    background-color: #f1f5f9 !important;
    color: var(--primary) !important;
}

.shop-cat-item.active {
    background-color: rgba(79, 70, 229, 0.08) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

@media (max-width: 900px) {
    .shop-grid-layout {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Pagination Styling (Pure CSS)
   ========================================================================== */
nav[role="navigation"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
}

nav[role="navigation"] > div:first-child {
    display: none;
}

nav[role="navigation"] span,
nav[role="navigation"] a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-main);
}

nav[role="navigation"] a:hover {
    background-color: #f1f5f9;
    color: var(--primary);
    border-color: var(--primary);
}

nav[role="navigation"] span[aria-current="page"] > span,
nav[role="navigation"] span[aria-current="page"] {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

nav[role="navigation"] span[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    background-color: #f8fafc;
}

/* ==========================================================================
   Mobile Navigation Trigger & Left Off-Canvas Sidebar Drawer
   ========================================================================== */
.mobile-nav-trigger-btn {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-nav-trigger-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 380px;
    max-width: 92vw;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.32);
    z-index: 100060;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
}

.mobile-nav-drawer.active {
    transform: translateX(0);
}

body.mobile-nav-open {
    overflow: hidden !important;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    flex-shrink: 0;
}

.mobile-nav-close-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-page);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-nav-close-btn:hover {
    background-color: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

.mobile-nav-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.15rem 2.5rem;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.mobile-nav-auth-card {
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.9rem;
    margin-bottom: 0.65rem;
}

.mobile-nav-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.mobile-nav-auth-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-subtle);
}

.mobile-nav-section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    padding-inline: 0.2rem;
}

.mobile-nav-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.8rem;
    border-radius: 9px;
    color: var(--text-main);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.mobile-nav-link:hover {
    background-color: var(--bg-page);
    color: var(--primary);
}

.mobile-nav-link.highlight-red {
    color: #ef4056;
    font-weight: 700;
}
.mobile-nav-link.highlight-red:hover {
    background-color: #fff1f2;
}

.mobile-nav-link.highlight-primary {
    color: var(--primary);
    font-weight: 700;
}
.mobile-nav-link.highlight-primary:hover {
    background-color: rgba(79, 70, 229, 0.08);
}

/* Accordion Categories in Mobile Drawer */
.mobile-cat-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mobile-cat-item {
    border: 1px solid var(--border-color);
    border-radius: 9px;
    overflow: hidden;
    background-color: var(--bg-surface);
    transition: border-color 0.2s ease;
}

.mobile-cat-item.open {
    border-color: #ef4056;
}

.mobile-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
    background-color: var(--bg-page);
    user-select: none;
    transition: background-color 0.15s ease;
}

.mobile-cat-header:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.mobile-cat-item.open .mobile-cat-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-cat-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mobile-cat-name {
    color: var(--text-main);
}

.mobile-cat-item.open .mobile-cat-name {
    color: #ef4056;
    font-weight: 700;
}

.mobile-cat-chevron {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.mobile-cat-item.open .mobile-cat-chevron {
    transform: rotate(180deg);
    color: #ef4056;
}

.mobile-cat-direct-arrow {
    color: var(--text-muted);
    padding: 0.25rem;
}

.pointer-events-none {
    pointer-events: none !important;
}

.mobile-cat-content {
    display: none;
    padding: 0.8rem 1rem;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}

.mobile-cat-item.open > .mobile-cat-content {
    display: block !important;
}

.mobile-cat-all-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.7rem;
    background-color: rgba(79, 70, 229, 0.06);
    border-radius: 7px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.mobile-subcats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mobile-subcat-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.45rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.mobile-subcat-link:hover {
    color: #ef4056;
}

.subcat-bullet {
    color: #ef4056;
    font-weight: 900;
    font-size: 0.85rem;
}

.mobile-nav-footer {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Hero Modern Slider & Horizontal Product Shelf Styles
   ========================================================================== */
.hero-slider-wrapper {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    margin-top: 1.5rem;
    box-shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    background: #0f172a;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-slider-wrapper:hover {
    box-shadow: 0 25px 55px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.hero-slider-track {
    position: relative;
    width: 100%;
    min-height: 320px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(0.97);
    display: flex;
    align-items: center;
    padding: 3rem 4rem;
    color: #ffffff;
    z-index: 1;
    overflow: hidden;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    position: relative;
    z-index: 2;
}

.hero-slide-content {
    max-width: 680px;
    z-index: 3;
    position: relative;
    animation: heroSlideTextFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroSlideTextFade {
    0% { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hero-slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 1rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    letter-spacing: 0.3px;
}

.hero-slide-title {
    font-size: 2.15rem;
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 0.85rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    letter-spacing: -0.5px;
}

.hero-slide-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 560px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.hero-slide-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.hero-slide-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.hero-slide-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
    background: #f8fafc;
    color: #4f46e5;
}

.hero-slide-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.hero-slide-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: #ffffff;
}

.hero-slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-slider-nav-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-slider-nav-btn.prev {
    right: 1.25rem;
}

.hero-slider-nav-btn.next {
    left: 1.25rem;
}

.hero-slider-dots {
    position: absolute;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(12px);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
}

.hero-slider-dot.active {
    width: 28px;
    background: #ffffff;
    box-shadow: 0 0 12px rgba(255,255,255,0.9);
}

@media (max-width: 768px) {
    .hero-slider-wrapper {
        border-radius: 20px;
        margin-top: 1rem;
    }
    .hero-slider-track {
        min-height: 250px;
    }
    .hero-slide {
        padding: 2rem 1.5rem;
    }
    .hero-slide-title {
        font-size: 1.45rem;
    }
    .hero-slide-desc {
        font-size: 0.88rem;
        margin-bottom: 1.2rem;
    }
    .hero-slider-nav-btn {
        display: none;
    }
}

/* Mobile Clean & Compact Hero */
@media (max-width: 768px) {
    .hero-slider-wrapper {
        margin-top: 0.75rem;
        border-radius: var(--radius-lg);
    }
    .hero-slider-track {
        min-height: 185px;
    }
    .hero-slide {
        padding: 1.15rem 1rem 1.85rem 1rem;
        align-items: center;
    }
    .hero-slide-badge {
        font-size: 0.72rem;
        padding: 0.2rem 0.6rem;
        margin-bottom: 0.45rem;
    }
    .hero-slide-title {
        font-size: 1.15rem;
        margin-bottom: 0.35rem;
        line-height: 1.35;
    }
    .hero-slide-desc {
        font-size: 0.78rem;
        line-height: 1.4;
        margin-bottom: 0.65rem;
        -webkit-line-clamp: 1;
    }
    .hero-slide-actions .btn {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }
    .hero-slider-nav-btn {
        display: none; /* Keep mobile clean and uncluttered */
    }
    .hero-slider-dots {
        bottom: 0.45rem;
    }
}

/* Product Showcase Section Header */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2.25rem;
    margin-bottom: 1.15rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.section-link-more {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-decoration: none;
}

.section-link-more:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Products Shelf: Horizontal scroll with mouse drag and touch swipe */
.shelf-nav-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.shelf-arrow-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition);
}

.shelf-arrow-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.hero-slider-wrapper {
    cursor: grab;
    user-select: none;
}

.hero-slider-wrapper.is-dragging {
    cursor: grabbing;
}

.hero-slider-wrapper img,
.hero-slider-wrapper a,
.hero-slider-wrapper h2,
.hero-slider-wrapper p {
    -webkit-user-drag: none;
}

.products-shelf {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 1.15rem;
    padding-bottom: 0.85rem;
    padding-inline: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    cursor: grab;
    user-select: none;
}

.products-shelf.grabbing {
    cursor: grabbing;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
}

.products-shelf * {
    -webkit-user-drag: none;
}

.products-shelf .product-card {
    flex: 0 0 225px;
    width: 225px;
    min-width: 225px;
    scroll-snap-align: start;
    user-select: none;
}

.products-shelf::-webkit-scrollbar {
    height: 5px;
}

.products-shelf::-webkit-scrollbar-track {
    background: transparent;
}

.products-shelf::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 9999px;
}

.products-shelf::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

@media (max-width: 768px) {
    .section-header-row {
        margin-top: 1.5rem;
        margin-bottom: 0.85rem;
        padding-bottom: 0.5rem;
    }
    .section-header-title {
        font-size: 1.05rem;
    }
    .section-link-more {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
    .shelf-nav-controls {
        display: none;
    }
    .products-shelf {
        gap: 0.85rem;
        padding-bottom: 0.75rem;
        padding-inline: 0.15rem;
    }
    .products-shelf .product-card {
        flex: 0 0 190px;
        width: 190px;
        min-width: 190px;
    }
    .products-shelf .product-thumb {
        height: 140px;
    }
    .products-shelf .product-details {
        padding: 0.75rem;
    }
    .products-shelf .product-title {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    .products-shelf .product-vendor-info {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    .products-shelf .product-price-current {
        font-size: 0.95rem;
    }
}

/* =========================================
   Checkout Enhanced Components (Auth, Address, Coupon)
   ========================================= */
.checkout-guest-auth-banner {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.checkout-guest-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.checkout-guest-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.checkout-guest-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.85rem;
}

.checkout-guest-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Selectable Address Cards */
.checkout-address-card {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: var(--bg-surface);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.checkout-address-card:hover {
    border-color: rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.checkout-address-card.selected {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.04);
    box-shadow: 0 0 0 1px var(--primary);
}

.checkout-address-card.new-btn {
    border: 2px dashed var(--border-color);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 120px;
    color: var(--text-main);
}

.checkout-address-card.new-btn:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.04);
}

.checkout-no-address-box {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: rgba(79, 70, 229, 0.04);
    border: 1px dashed var(--primary);
    margin-bottom: 1.5rem;
}

/* Coupon Box in Checkout */
.checkout-coupon-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.checkout-coupon-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
    .checkout-guest-auth-banner {
        padding: 1rem;
    }
    .checkout-guest-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .checkout-guest-title {
        font-size: 0.92rem;
    }
    .checkout-guest-desc {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   Customer Portal Responsive Layout & Components
   ========================================================================== */
.customer-portal-container {
    padding-block: 2rem;
    background: var(--bg-body, #f8fafc);
    min-height: 80vh;
}

.customer-portal-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
    min-width: 0;
    width: 100%;
}

.customer-portal-sidebar {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-lg, 16px);
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-width: 0;
    max-width: 100%;
}

.customer-profile-card {
    text-align: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    margin-bottom: 1.25rem;
}

.customer-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #4f46e5), #0ea5e9);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    flex-shrink: 0;
}

.customer-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.customer-nav-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md, 10px);
    font-size: 0.88rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    transition: all 0.2s;
    background: transparent;
    color: var(--text-main, #1e293b);
    width: 100%;
}

.customer-nav-btn.active {
    background: var(--primary, #4f46e5);
    color: #ffffff;
}

.customer-nav-btn-icon-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.customer-nav-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 12px;
}

.customer-portal-main {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-lg, 16px);
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-height: 520px;
    min-width: 0;
    max-width: 100%;
}

.customer-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    gap: 1rem;
    flex-wrap: wrap;
}

.customer-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    min-width: 0;
}

.customer-stat-card {
    border-radius: var(--radius-md, 12px);
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s;
    min-width: 0;
}

.customer-stat-card .stat-icon {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
}

.customer-stat-card .stat-num {
    font-size: 1.4rem;
    font-weight: 900;
}

.customer-stat-card .stat-label {
    font-size: 0.8rem;
    font-weight: 600;
}

.customer-addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    width: 100%;
    min-width: 0;
}

.customer-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1rem;
    width: 100%;
    min-width: 0;
}

.customer-order-card {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.customer-order-card-header {
    background: var(--bg-body, #f8fafc);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
}

.customer-order-card-body {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.customer-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.customer-modal-dialog {
    background: #ffffff;
    border-radius: var(--radius-lg, 16px);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    padding: 1.75rem;
}

.customer-table-responsive {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.25rem;
}

/* Header logout red accent */
.header-logout-btn {
    color: #ef4444 !important;
}

.header-logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

/* Global Viewport Overflow Fix */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Mobile & Tablet Breakpoint for Customer Portal (<= 992px) */
@media (max-width: 992px) {
    .header-admin-btn,
    .header-action-btn.header-admin-btn,
    .scroll-action-btn.header-admin-btn {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        overflow: hidden !important;
        pointer-events: none !important;
        position: absolute !important;
        opacity: 0 !important;
    }

    .customer-portal-container {
        padding-block: 1rem !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .customer-portal-container .container {
        padding-inline: 0.65rem !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .customer-portal-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 0.85rem !important;
    }

    .customer-portal-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0.85rem 1rem !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .customer-profile-card {
        display: flex !important;
        align-items: center !important;
        text-align: right !important;
        gap: 0.85rem !important;
        padding-bottom: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        width: 100% !important;
    }

    .customer-avatar {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.25rem !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    .customer-profile-info {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .customer-profile-info h2 {
        font-size: 1rem !important;
        margin-bottom: 0.2rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Horizontal scrollable tab menu on mobile */
    .customer-nav-menu {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.45rem !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding-bottom: 0.35rem !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .customer-nav-menu::-webkit-scrollbar {
        display: none !important;
    }

    .customer-nav-btn {
        flex-shrink: 0 !important;
        width: auto !important;
        padding: 0.45rem 0.8rem !important;
        border-radius: 20px !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
    }

    .customer-nav-btn-icon-group {
        display: flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }

    .customer-nav-btn-icon-group i {
        font-size: 0.85rem !important;
        width: auto !important;
    }

    .customer-sidebar-footer {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.4rem !important;
        margin-top: 0.75rem !important;
        padding-top: 0.75rem !important;
        width: 100% !important;
    }

    .customer-sidebar-footer a,
    .customer-sidebar-footer button {
        padding: 0.55rem 0.85rem !important;
        font-size: 0.82rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .customer-portal-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 1rem 0.85rem !important;
        border-radius: 12px !important;
        min-height: auto !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .customer-tab-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem !important;
        margin-bottom: 1rem !important;
        padding-bottom: 0.75rem !important;
        width: 100% !important;
    }

    .customer-tab-header h3 {
        font-size: 1.1rem !important;
    }

    .customer-tab-header p {
        font-size: 0.78rem !important;
        line-height: 1.5 !important;
    }

    .customer-tab-header .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.55rem 1rem !important;
        font-size: 0.84rem !important;
    }

    .customer-stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.6rem !important;
        margin-bottom: 1.25rem !important;
        width: 100% !important;
    }

    .customer-stat-card {
        padding: 0.75rem 0.5rem !important;
        border-radius: 10px !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .customer-stat-card .stat-icon {
        font-size: 1.3rem !important;
        margin-bottom: 0.25rem !important;
    }

    .customer-stat-card .stat-num {
        font-size: 1.15rem !important;
    }

    .customer-stat-card .stat-label {
        font-size: 0.72rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* Mobile Breakpoint (<= 640px) */
@media (max-width: 640px) {
    .customer-addresses-grid {
        grid-template-columns: 1fr !important;
    }

    .customer-form-grid {
        grid-template-columns: 1fr !important;
    }

    .customer-order-card-header {
        padding: 0.75rem 0.85rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .customer-order-card-body {
        padding: 0.85rem !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.85rem !important;
    }

    .customer-order-card-body .order-summary-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding-top: 0.65rem !important;
        border-top: 1px dashed var(--border-color, #e2e8f0) !important;
    }

    .customer-modal-backdrop {
        padding: 0.65rem !important;
    }

    .customer-modal-dialog {
        padding: 1.15rem !important;
        border-radius: 12px !important;
    }
}



