/* ==========================================================================
   Adhunik World Bazar — front-end stylesheet
   One file for every public page. Page-specific rules are scoped with the
   body class (page-home, page-shop, page-product, page-cart, page-checkout,
   page-thankyou, page-tracking) so nothing leaks between pages.
   ========================================================================== */

:root {
    --brand:        #6c5ce7;
    --brand-dark:   #5b4cdb;
    --brand-alt:    #764ba2;
    --accent:       #e84393;
    --success:      #00b894;
    --success-dark: #00a382;
    --ink:          #2d3436;
    --ink-soft:     #636e72;
    --muted:        #b2bec3;
    --line:         #f1f2f6;
    --line-strong:  #dfe6e9;
    --surface:      #f8f9fa;
    --radius:       16px;
    --shadow-sm:    0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md:    0 10px 25px rgba(0, 0, 0, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    color: var(--ink);
}

/* Pages with a sticky footer need the column layout */
body.page-cart,
body.page-thankyou {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar { background: white; border-bottom: 1px solid var(--line); padding: 15px 0; }
.navbar-brand {
    font-weight: 700; font-size: 24px; color: var(--brand);
    text-decoration: none; display: inline-flex; align-items: center;
}
.navbar-brand:hover { color: var(--brand); }
.navbar-brand img { height: 40px; width: auto; display: block; }
.nav-link { color: var(--ink-soft); font-weight: 500; margin: 0 10px; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--brand); }
.desktop-home-link { margin: 0 15px 0 0 !important; }

.cart-icon { position: relative; }
.cart-count {
    position: absolute; top: -8px; right: -10px;
    background: var(--accent); color: white; border-radius: 50%;
    width: 18px; height: 18px; font-size: 10px;
    display: flex; align-items: center; justify-content: center;
}

@media (max-width: 991.98px) {
    .navbar { padding: 8px 0; }
    .navbar > .container { position: relative; min-height: 46px; }

    .navbar-toggler {
        border: none; padding: 4px 6px; font-size: 24px;
        color: var(--ink); line-height: 1;
    }
    .navbar-toggler:focus { box-shadow: none; outline: none; }

    .mobile-center-brand {
        position: absolute; left: 50%; top: 50%;
        transform: translate(-50%, -50%);
        margin: 0; max-width: 55%; text-align: center;
        pointer-events: auto;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .mobile-center-brand img { max-height: 34px; width: auto; }

    .mobile-cart-btn {
        position: relative;
        display: inline-flex; align-items: center; justify-content: center;
        padding: 4px 6px !important; margin-left: auto;
        color: var(--ink); font-size: 22px; text-decoration: none;
        background: none; border: none;
    }
    .mobile-cart-btn:hover { color: var(--brand); }
    .mobile-cart-btn .cart-count { top: -2px; right: -6px; }
}

/* ==========================================================================
   Toast notification
   ========================================================================== */
.toast-notification {
    position: fixed; top: 20px; right: 20px;
    background: white; padding: 15px 20px; border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999; display: none; max-width: 350px;
}

/* ==========================================================================
   Page header banner (shop, order tracking)
   ========================================================================== */
.page-header {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-alt) 100%);
    color: white; padding: 44px 0; text-align: center;
    margin-bottom: 30px; border-radius: 0 0 20px 20px;
}
.page-header h1 { font-size: 28px; font-weight: 600; margin-bottom: 6px; }
.page-header p { opacity: 0.9; margin-bottom: 0; font-size: 14px; }

/* ==========================================================================
   Product cards (home + shop grid, and related products on a product page)
   ========================================================================== */
.product-card {
    position: relative;
    background: white; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.product-badge {
    position: absolute; top: 8px; left: 8px;
    display: flex; gap: 4px; flex-wrap: wrap; z-index: 2;
}
.badge-new, .badge-sale {
    padding: 3px 8px; border-radius: 12px;
    font-size: 10px; font-weight: 600; letter-spacing: 0.2px;
}
.badge-new  { background: var(--success); color: white; }
.badge-sale { background: var(--accent);  color: white; }

/* A square that scales with the card instead of a fixed pixel height, so the
   picture grows on a phone rather than sitting small inside a 180px box.
   The backdrop is white because product photos are usually cut out on white —
   against grey, every letterbox bar showed. */
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
    display: block;
}

.product-color-icons { display: flex; gap: 5px; padding: 8px 12px 0; flex-wrap: wrap; }
.product-color-icon {
    width: 18px; height: 18px; border-radius: 6px; object-fit: cover;
    border: 1px solid var(--line-strong); background: var(--surface); padding: 1px;
    transition: border-color 0.2s, box-shadow 0.2s; cursor: pointer;
}
.product-color-icon:hover { border-color: var(--brand); }
.product-color-icon.active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.25); }

.product-info { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.product-title {
    font-size: 14px; font-weight: 600; color: var(--ink);
    text-decoration: none; margin-bottom: 8px; flex: 1; line-height: 1.3;
}
.product-title:hover { color: var(--brand); }
.product-price { font-size: 16px; font-weight: 700; color: var(--brand); margin-bottom: 10px; }
.old-price { font-size: 12px; text-decoration: line-through; color: var(--muted); margin-left: 8px; font-weight: 400; }

.product-actions { display: flex; gap: 8px; }
.btn-add-cart, .btn-buy-now {
    flex: 1; padding: 8px 4px; border-radius: 8px; border: none;
    font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.btn-add-cart { background: var(--brand);   color: white; }
.btn-add-cart:hover { background: var(--brand-dark); }
.btn-buy-now  { background: var(--success); color: white; }
.btn-buy-now:hover { background: var(--success-dark); }
.btn-outstock { background: var(--muted) !important; cursor: not-allowed; }

/* ==========================================================================
   Variant picker modal
   ========================================================================== */
.variant-modal .modal-dialog { max-width: 550px; }
.variant-modal .option-group { margin-bottom: 18px; }
.variant-modal .option-group > label {
    font-weight: 600; display: block; margin-bottom: 8px;
    font-size: 14px; color: var(--ink);
}
.variant-modal .option-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-modal .option-buttons .btn { min-width: 60px; border-radius: 10px; font-weight: 500; }
.variant-modal .option-buttons .btn.active {
    background: var(--brand); color: #fff; border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.25);
}
.btn-confirm-variant { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-confirm-variant:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-confirm-variant:disabled { background: var(--brand); border-color: var(--brand); color: #fff; opacity: 0.65; }
#variantInfo { font-size: 14px; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer { background: var(--ink); color: #dfe6e9; padding: 50px 0 20px; }
body.page-cart footer,
body.page-thankyou footer { flex-shrink: 0; }
body.page-product footer { margin-top: 50px; }

.footer-logo { font-size: 24px; font-weight: 700; color: white; text-decoration: none; }
.footer-links h5 { color: white; margin-bottom: 15px; font-size: 16px; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links ul li { margin-bottom: 8px; }
.footer-links ul li a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-links ul li a:hover { color: var(--brand); }

.social-icons a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; background: rgba(255, 255, 255, 0.1);
    border-radius: 50%; color: white; margin-right: 8px; transition: background 0.2s;
}
.social-icons a:hover { background: var(--brand); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px; padding-top: 20px; text-align: center;
}
.footer-copy { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.footer-dev { color: #dfe6e9; font-size: 13px; margin-bottom: 0; }
.footer-dev strong { color: #dfe6e9; font-weight: 500; }
.footer-dev a { color: #a29bfe; text-decoration: none; font-weight: 600; transition: color 0.2s; }
.footer-dev a:hover { color: var(--brand); text-decoration: underline; }

/* ==========================================================================
   Floating contact buttons + WhatsApp popup
   ========================================================================== */
.floating-actions {
    position: fixed; bottom: 25px; right: 25px;
    display: flex; flex-direction: column; gap: 12px; z-index: 9998;
}
.floating-btn {
    width: 55px; height: 55px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; color: #fff !important; font-size: 26px;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 0; line-height: 1;
}
.floating-btn:hover, .floating-btn:focus {
    transform: scale(1.08); color: #fff !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25); outline: none;
}
.floating-whatsapp  { background: #25D366; }
.floating-whatsapp:hover  { box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5); }
.floating-call      { background: var(--brand); }
.floating-call:hover      { box-shadow: 0 8px 25px rgba(108, 92, 231, 0.5); }
.floating-messenger { background: #0084FF; }
.floating-messenger:hover { box-shadow: 0 8px 25px rgba(0, 132, 255, 0.5); }

.whatsapp-popup {
    position: fixed; bottom: 215px; right: 25px;
    width: 320px; max-width: calc(100vw - 50px);
    background: #fff; border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    z-index: 9999; overflow: hidden;
    opacity: 0; transform: translateY(20px) scale(0.95);
    pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.whatsapp-popup.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.whatsapp-popup-header {
    background: #25D366; color: #fff; padding: 14px 16px;
    display: flex; align-items: center; gap: 10px;
    font-weight: 600; font-size: 15px;
}
.whatsapp-popup-header i { font-size: 22px; }
.whatsapp-popup-header span { flex: 1; }
.whatsapp-popup-close {
    background: transparent; border: none; color: #fff;
    font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px;
}
.whatsapp-popup-body { padding: 18px; font-size: 14px; color: var(--ink); }
.whatsapp-popup-body p { margin: 0 0 10px; line-height: 1.5; }
.whatsapp-start-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #25D366; color: #fff !important;
    padding: 10px 20px; border-radius: 25px;
    text-decoration: none; font-weight: 600; font-size: 14px;
    transition: background 0.2s;
}
.whatsapp-start-btn:hover { background: #1da851; color: #fff; }

@media (max-width: 480px) {
    .whatsapp-popup { right: 12px; left: 12px; width: auto; max-width: none; bottom: 190px; }
    .floating-actions { right: 12px; bottom: 12px; gap: 10px; }
    .floating-btn { width: 50px; height: 50px; font-size: 24px; }
}

/* ==========================================================================
   HOME PAGE
   ========================================================================== */
.hero-carousel-wrap { margin-top: 20px; }
.hero-carousel {
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08); background: var(--surface);
}
.hero-carousel-img { width: 100%; height: 480px; object-fit: cover; display: block; }
.hero-caption {
    background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0) 100%);
    left: 0; right: auto; bottom: 0; top: 0;
    text-align: left; padding: 40px 50px;
    display: flex; flex-direction: column; justify-content: center;
    max-width: 60%;
}
.hero-caption h2 { font-size: 2.4rem; font-weight: 700; margin-bottom: 10px; color: #fff; }
.hero-subtitle { font-size: 1.15rem; margin-bottom: 8px; color: #fff; opacity: 0.95; }
.hero-desc { font-size: 0.95rem; color: #fff; opacity: 0.9; margin-bottom: 16px; }
.hero-btn {
    display: inline-block; background: var(--brand); color: #fff !important;
    padding: 10px 28px; border-radius: 30px;
    font-weight: 600; text-decoration: none; align-self: flex-start;
    transition: background 0.2s, transform 0.2s;
}
.hero-btn:hover { background: var(--brand-dark); transform: translateY(-2px); color: #fff; }
.hero-carousel .carousel-indicators [data-bs-target] {
    width: 10px; height: 10px; border-radius: 50%; background: #fff; opacity: 0.5;
}
.hero-carousel .carousel-indicators .active { opacity: 1; background: var(--brand); }

@media (max-width: 991.98px) {
    .hero-carousel-wrap { margin-top: 12px; padding-left: 10px; padding-right: 10px; }
    .hero-carousel { border-radius: 14px; }
    .hero-carousel-img {
        height: auto; aspect-ratio: 16 / 10; object-fit: contain;
        background: linear-gradient(135deg, #f4f0ff 0%, #eef2ff 100%);
        padding: 4px;
    }
    .hero-caption {
        position: absolute !important;
        top: auto; bottom: 0; left: 0; right: 0;
        max-width: 100%; padding: 14px 16px;
        background: linear-gradient(0deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.30) 65%, rgba(0,0,0,0) 100%);
        text-align: left;
    }
    .hero-caption h2 { font-size: 1.15rem; margin-bottom: 4px; line-height: 1.25; }
    .hero-subtitle { font-size: 0.85rem; margin-bottom: 4px; }
    .hero-desc { font-size: 0.76rem; margin-bottom: 10px; line-height: 1.35; }
    .hero-btn { padding: 7px 18px; font-size: 0.82rem; }
    .hero-carousel .carousel-indicators { bottom: 6px; }
}
@media (max-width: 480px) {
    .hero-caption h2 { font-size: 1rem; }
    .hero-subtitle { font-size: 0.78rem; }
    .hero-desc { display: none; }
}

/* --- Category grid --- */
.category-section { margin-top: 50px; }
.category-section-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; flex-wrap: wrap; gap: 10px;
}
.category-section-title { font-weight: 700; font-size: 26px; color: var(--ink); margin: 0; }
.category-section-sub { font-size: 13px; color: var(--ink-soft); margin: 4px 0 0; }
.category-view-all {
    color: var(--brand); font-weight: 600; font-size: 14px; text-decoration: none;
    display: inline-flex; align-items: center; gap: 4px;
    transition: color 0.2s, transform 0.2s;
}
.category-view-all:hover { color: var(--brand-dark); transform: translateX(3px); }

.category-card {
    display: flex; align-items: center; gap: 14px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px; text-decoration: none; color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    height: 100%;
}
.category-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-md);
    border-color: var(--brand); color: inherit;
}
.category-avatar {
    flex: 0 0 auto; width: 54px; height: 54px; border-radius: 14px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-alt) 100%);
    color: #fff; font-weight: 700; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    letter-spacing: 0.5px; box-shadow: 0 4px 12px rgba(108, 92, 231, 0.25);
}
.category-info { min-width: 0; flex: 1; }
.category-name {
    font-size: 15px; font-weight: 600; color: var(--ink);
    margin: 0 0 3px 0; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.category-card:hover .category-name { color: var(--brand); }
.category-count { font-size: 12px; color: var(--muted); font-weight: 500; display: inline-block; }

@media (max-width: 576px) {
    .category-section { margin-top: 35px; }
    .category-section-title { font-size: 20px; }
    .category-card { padding: 12px; gap: 10px; }
    .category-avatar { width: 46px; height: 46px; font-size: 18px; border-radius: 12px; }
    .category-name { font-size: 13px; }
    .category-count { font-size: 11px; }
}

/* --- Featured products --- */
.featured-section { margin-top: 50px; }
.featured-title { font-weight: 700; font-size: 26px; color: var(--ink); margin: 0 0 24px 0; }
@media (max-width: 576px) {
    .featured-section { margin-top: 35px; }
    .featured-title { font-size: 20px; }
}

/* --- Features strip --- */
.features-strip { background: var(--brand); color: white; padding: 30px 0; margin: 30px 0; }
.feature-item { display: flex; align-items: center; gap: 15px; }
.feature-icon { font-size: 30px; }
.feature-text h5 { font-size: 14px; margin: 0; }
.feature-text p { font-size: 12px; opacity: 0.8; margin: 0; }

/* ==========================================================================
   SHOP PAGE
   ========================================================================== */
.filter-card {
    background: white; border-radius: var(--radius); padding: 20px;
    margin-bottom: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.filter-title {
    font-size: 16px; font-weight: 600; margin-bottom: 14px;
    padding-bottom: 10px; border-bottom: 2px solid var(--brand);
}
.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li a {
    color: var(--ink); text-decoration: none; display: block;
    padding: 8px 0; font-size: 14px;
    transition: color 0.2s, padding-left 0.2s;
    border-bottom: 1px dashed var(--line);
}
.category-list li:last-child a { border-bottom: none; }
.category-list li a:hover,
.category-list li a.active { color: var(--brand); padding-left: 4px; }

.price-inputs { display: flex; gap: 8px; margin-bottom: 12px; }
.price-inputs input {
    flex: 1; min-width: 0; padding: 8px 12px;
    border: 1px solid var(--line-strong); border-radius: 8px;
    font-size: 13px; transition: border-color 0.2s;
}
.price-inputs input:focus { outline: none; border-color: var(--brand); }

.filter-card .btn-primary { background: var(--brand); border-color: var(--brand); }
.filter-card .btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.filter-card .btn-outline-secondary { border-radius: 25px; }
.filter-card .btn-pill { border-radius: 25px; font-size: 13px; padding: 8px; }

.sort-bar {
    background: white; border-radius: var(--radius); padding: 14px 20px;
    margin-bottom: 20px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.results-count { font-size: 13px; color: var(--ink-soft); }
.sort-label { font-size: 13px; color: var(--ink-soft); margin: 0; }
.sort-select {
    padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 20px;
    background: white; cursor: pointer; font-size: 13px; color: var(--ink);
    transition: border-color 0.2s;
}
.sort-select:focus { outline: none; border-color: var(--brand); }

.mobile-filter-btn {
    display: none; background: var(--brand); color: white; border: none;
    padding: 9px 18px; border-radius: 20px; font-size: 13px;
    margin-bottom: 15px; cursor: pointer;
}
.mobile-filter-btn:hover { background: var(--brand-dark); }
@media (max-width: 991px) {
    .mobile-filter-btn { display: inline-block; }
    .sidebar-col { display: none; }
    .sidebar-col.show { display: block !important; }
}

.loading-indicator { text-align: center; padding: 20px; display: none; }
.loading-indicator.active { display: block; }
.loading-indicator .spinner-border { color: var(--brand) !important; }

body.page-shop .empty-state .btn-primary { background: var(--brand); border-color: var(--brand); }

/* ==========================================================================
   PRODUCT PAGE
   ========================================================================== */
body.page-product .product-card { display: block; }

.breadcrumb { background: transparent; padding: 0; font-size: 13px; margin-bottom: 12px; }
.breadcrumb a { color: var(--brand); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--ink-soft); }

/* The frame hugs the picture rather than forcing it into a fixed box, so a
   tall photo shows tall and a wide one shows wide — no grey bars either side.
   max-height keeps it on screen so the Add to Cart button stays reachable. */
.product-image-frame {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 8px;
}
.product-main-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
}

/* Thumbnails fill their square so the strip looks even, whatever shape
   the photos are. The full picture is never cropped in the main frame. */
.thumbnail {
    width: 70px; height: 70px; object-fit: cover; border-radius: 10px;
    cursor: pointer; margin: 5px; border: 2px solid transparent;
    background: #fff; transition: border-color 0.2s;
}
.thumbnail:hover, .thumbnail.active { border-color: var(--brand); }

.price { font-size: 28px; font-weight: 700; color: var(--brand); }
.price .old-price { text-decoration: line-through; color: var(--muted); font-size: 18px; margin-left: 10px; font-weight: 400; }
.product-heading { font-size: 2rem; font-weight: 600; }

body.page-product .option-group { margin-top: 14px; }
body.page-product .option-label {
    display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft);
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.4px;
}
body.page-product .option-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.option-btn {
    padding: 8px 18px; border: 1px solid var(--line-strong); background: white;
    border-radius: 25px; cursor: pointer; transition: all 0.2s;
    font-size: 14px; color: var(--ink);
    display: inline-flex; align-items: center; gap: 8px;
}
.option-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.option-btn.active { background: var(--brand); color: white; border-color: var(--brand); }
.option-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.option-btn.color-btn { padding: 5px 14px 5px 5px; border-radius: 14px; gap: 10px; min-height: 78px; }
.option-btn.color-btn .color-img {
    width: 66px; height: 66px; object-fit: contain; border-radius: 10px;
    border: 2px solid transparent; flex: 0 0 auto;
    background: var(--surface); padding: 3px; transition: border-color 0.2s;
}
.option-btn.color-btn .color-swatch {
    width: 66px; height: 66px; border-radius: 10px;
    border: 2px solid var(--line-strong); background: transparent;
    flex: 0 0 auto; transition: border-color 0.2s;
}
.option-btn.color-btn.active { background: #f4f0ff; color: var(--brand); border-color: var(--brand); }
.option-btn.color-btn.active .color-img,
.option-btn.color-btn.active .color-swatch { border-color: var(--brand); }
.option-btn.color-btn .color-name { display: none; font-weight: 500; white-space: nowrap; }
.option-btn.color-btn:hover .color-name,
.option-btn.color-btn.active .color-name { display: inline; }
@media (hover: none) { .option-btn.color-btn .color-name { display: inline; } }

body.page-product .btn-add-cart {
    background: var(--brand); color: white; border: none;
    padding: 12px 30px; border-radius: 30px; font-weight: 600;
    flex: none; font-size: 1rem; transition: background 0.2s;
}
body.page-product .btn-add-cart:hover { background: var(--brand-dark); }
body.page-product .btn-buy-now {
    background: var(--success); color: white; border: none;
    padding: 12px 30px; border-radius: 30px; font-weight: 600;
    flex: none; font-size: 1rem; transition: background 0.2s;
}
body.page-product .btn-buy-now:hover { background: var(--success-dark); }

.quantity-input {
    width: 70px; text-align: center;
    border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px;
}

.nav-tabs { border-bottom: 1px solid var(--line); }
.nav-tabs .nav-link { color: var(--ink-soft); font-weight: 500; border: none; }
.nav-tabs .nav-link:hover { color: var(--brand); }
.nav-tabs .nav-link.active { color: var(--brand); border-bottom: 2px solid var(--brand); background: transparent; }
.tab-content { padding: 20px 0; }

.specs-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.specs-table th, .specs-table td { padding: 10px 12px; border: 1px solid var(--line); }
.specs-table th { background: var(--surface); width: 40%; font-weight: 600; }

.card-img-top {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
    padding: 5px;
    display: block;
}
.product-card .price { font-size: 18px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand); }

@media (max-width: 768px) {
    .price { font-size: 22px; }
    body.page-product .action-buttons { flex-direction: column; gap: 10px !important; }
    body.page-product .btn-add-cart,
    body.page-product .btn-buy-now { width: 100%; padding: 14px 20px; font-size: 15px; }
    .option-btn.color-btn { min-height: 66px; padding: 4px 12px 4px 4px; }
    .option-btn.color-btn .color-img,
    .option-btn.color-btn .color-swatch { width: 56px; height: 56px; }
    .option-btn { padding: 8px 16px; font-size: 13px; }
    .option-btn.color-btn .color-name { display: inline; }
    .quantity-input { width: 60px; }
}
@media (max-width: 420px) {
    .option-btn.color-btn { min-height: 60px; padding: 4px 10px 4px 4px; }
    .option-btn.color-btn .color-img,
    .option-btn.color-btn .color-swatch { width: 50px; height: 50px; }
    .option-btn.color-btn .color-name { font-size: 13px; }
}

/* ==========================================================================
   CART PAGE
   ========================================================================== */
body.page-cart .main-content { flex: 1 0 auto; padding: 40px 0 80px; }
.page-title { font-weight: 700; font-size: 28px; color: var(--ink); margin-bottom: 24px; }

.cart-container {
    background: white; border-radius: var(--radius); border: 1px solid var(--line);
    box-shadow: var(--shadow-sm); overflow: hidden;
}
.cart-table { table-layout: fixed; width: 100%; }
.cart-table th {
    background: var(--surface); color: var(--ink-soft); padding: 16px 12px;
    font-weight: 600; text-transform: uppercase; font-size: 12px;
    border-bottom: 1px solid var(--line);
}
.cart-table td { padding: 20px 12px; vertical-align: middle; border-bottom: 1px solid var(--line); }

.product-img {
    width: 54px; height: 54px; background: var(--surface); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.product-name { font-weight: 600; color: var(--ink); text-decoration: none; }
.product-name:hover { color: var(--brand); }
.product-variant { font-size: 12px; margin-top: 2px; }
.product-variant .regular-price { text-decoration: line-through; color: var(--muted); }
.product-weight { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.variant-badge {
    display: inline-block; background: var(--line); color: var(--ink);
    padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500;
}
.na-text { color: var(--muted); font-size: 13px; }

.qty-wrapper { display: inline-flex; align-items: center; background: var(--line); padding: 4px; border-radius: 8px; }
.qty-btn {
    width: 28px; height: 28px; border-radius: 6px; border: none;
    background: white; color: var(--ink); font-weight: 600; cursor: pointer;
}
.qty-btn:hover { background: var(--brand); color: white; }
.qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.qty-value { min-width: 34px; text-align: center; font-weight: 600; font-size: 14px; }

.remove-item { color: var(--muted); background: none; border: none; font-size: 20px; cursor: pointer; }
.remove-item:hover { color: var(--accent); }

.cart-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.btn-continue { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.btn-continue:hover { color: var(--brand); }
.btn-clear {
    border: 1px solid var(--line); color: var(--accent);
    padding: 10px 20px; border-radius: 10px; text-decoration: none; font-weight: 600;
}
.btn-clear:hover { background: #fef2f2; }

body.page-cart .summary-card {
    background: white; border-radius: var(--radius); padding: 24px;
    border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.summary-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 12px 0; font-size: 14px; color: var(--ink-soft); }
.summary-row.total {
    border-top: 2px solid var(--line); margin-top: 12px; padding-top: 20px;
    font-size: 18px; font-weight: 700; color: var(--ink);
}
.btn-checkout {
    background: var(--brand); color: white; border: none; padding: 14px;
    border-radius: 12px; width: 100%; font-weight: 600; margin-top: 24px;
    text-decoration: none; display: inline-flex; align-items: center;
    justify-content: center; gap: 8px;
}
.btn-checkout:hover { background: var(--brand-dark); color: white; }

.empty-cart {
    text-align: center; padding: 80px 40px; background: white;
    border-radius: var(--radius); border: 1px solid var(--line);
}
.empty-icon { font-size: 64px; color: var(--muted); margin-bottom: 16px; }
.btn-shop {
    background: var(--brand); color: white; padding: 12px 28px;
    border-radius: 10px; text-decoration: none; font-weight: 600;
    display: inline-block; margin-top: 16px;
}
.btn-shop:hover { background: var(--brand-dark); color: white; }

@media (max-width: 768px) {
    .cart-table thead { display: none; }
    .cart-table tr { display: block; padding: 16px; border-bottom: 1px solid var(--line); }
    .cart-table td { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border: none; }
    .cart-table td::before { content: attr(data-label); font-weight: 600; font-size: 13px; color: var(--ink-soft); }
    .cart-actions { flex-direction: column; gap: 16px; }
    .btn-clear { width: 100%; text-align: center; }
}

/* ==========================================================================
   CHECKOUT PAGE
   ========================================================================== */
.checkout-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.checkout-card {
    background: white; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--line); overflow: hidden;
}
.checkout-header { background: var(--brand); color: white; padding: 25px 30px; }
.checkout-header h2 { margin: 0; font-weight: 600; }
.checkout-body { padding: 30px; }

.form-section { margin-bottom: 30px; }
.form-section-title {
    font-size: 18px; font-weight: 600; margin-bottom: 20px;
    padding-bottom: 10px; border-bottom: 2px solid var(--brand); color: var(--ink);
}
body.page-checkout .form-label { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 5px; }
body.page-checkout .form-control {
    border: 1px solid var(--line-strong); border-radius: 10px;
    padding: 12px 15px; font-size: 14px; transition: border-color 0.2s;
}
body.page-checkout .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1); }

body.page-checkout .summary-card {
    background: var(--surface); border-radius: var(--radius);
    padding: 20px; border: 1px solid var(--line);
}
.summary-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e9ecef; }
.summary-item.subtotal { border-bottom: 1px solid #e9ecef; }
.summary-item.total {
    border-top: 2px solid var(--brand); border-bottom: none;
    margin-top: 10px; padding-top: 15px;
    font-size: 18px; font-weight: 700; color: var(--brand);
}
.summary-item.product-discount { color: var(--success); }

.btn-place-order {
    background: var(--brand); color: white; border: none; padding: 14px;
    border-radius: 12px; width: 100%; font-weight: 600; font-size: 16px;
    margin-top: 20px; transition: background 0.2s;
}
.btn-place-order:hover { background: var(--brand-dark); color: white; }

.payment-method {
    border: 1px solid var(--line-strong); border-radius: 10px;
    padding: 15px; margin-bottom: 10px; cursor: pointer; transition: border-color 0.2s;
}
.payment-method:hover { border-color: var(--brand); }
.payment-method.selected { border-color: var(--brand); background: #f0f4ff; }
.delivery-note {
    background: #e8f0fe; border-left: 4px solid var(--brand);
    padding: 12px; border-radius: 8px; margin-top: 15px; font-size: 13px;
}
@media (max-width: 768px) { body.page-checkout .summary-card { margin-top: 30px; } }

/* ==========================================================================
   THANK-YOU PAGE
   ========================================================================== */
body.page-thankyou .main-content {
    flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 60px 20px;
}
.thankyou-card {
    background: white; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    max-width: 600px; width: 100%; padding: 40px; text-align: center;
}
.check-icon { font-size: 64px; color: var(--success); margin-bottom: 20px; }
.thankyou-title { font-size: 28px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.thankyou-message { color: var(--ink-soft); margin-bottom: 25px; font-size: 14px; }
.order-detail { background: var(--surface); border-radius: 12px; padding: 20px; margin-bottom: 20px; text-align: left; }
.order-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e9ecef; }
.order-row:last-child { border-bottom: none; }
.order-row span:first-child { font-weight: 500; color: var(--ink-soft); }
.order-row span:last-child { font-weight: 600; color: var(--ink); }
.btn-home {
    background: var(--brand); color: white; padding: 12px 28px;
    border-radius: 10px; text-decoration: none; font-weight: 600;
    display: inline-block; margin-top: 10px; transition: background 0.2s;
}
.btn-home:hover { background: var(--brand-dark); color: white; }

.order-success-popup-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none; align-items: center; justify-content: center;
    z-index: 10000; padding: 20px; opacity: 0; transition: opacity 0.25s ease;
}
.order-success-popup-overlay.show { display: flex; opacity: 1; }
.order-success-popup {
    background: #fff; border-radius: 20px; padding: 40px 30px;
    max-width: 420px; width: 100%; text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95); transition: transform 0.3s ease;
}
.order-success-popup-overlay.show .order-success-popup { transform: translateY(0) scale(1); }
.order-success-popup-icon { font-size: 72px; color: var(--success); margin-bottom: 15px; display: inline-block; }
.order-success-popup-title { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 12px; line-height: 1.5; }
.order-success-popup-text { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }
.order-success-popup-text strong { color: var(--ink); font-weight: 700; }
.order-success-popup-btn {
    background: var(--brand); color: #fff !important; border: none;
    padding: 12px 36px; border-radius: 30px; font-weight: 600; font-size: 15px;
    cursor: pointer; transition: background 0.2s, transform 0.2s;
    text-decoration: none; display: inline-block;
}
.order-success-popup-btn:hover { background: var(--brand-dark); color: #fff !important; transform: translateY(-2px); }

/* ==========================================================================
   ORDER TRACKING PAGE
   ========================================================================== */
.search-card {
    background: white; border-radius: var(--radius); padding: 40px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    margin-top: -30px; position: relative; z-index: 2;
}
.search-card h3 { font-weight: 600; color: var(--ink); }
.search-card .form-control { border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 15px; }
.search-card .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1); }
.btn-track {
    background: var(--brand); color: white; border: none; padding: 12px 30px;
    border-radius: 10px; font-weight: 600; transition: background 0.2s;
}
.btn-track:hover { background: var(--brand-dark); color: white; }

.order-card {
    background: white; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line); margin-top: 30px;
}
.order-header { background: var(--brand); color: white; padding: 25px 30px; }
.order-number { font-size: 24px; font-weight: 700; }
.order-date { opacity: 0.8; font-size: 14px; }

.status-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 20px; border-radius: 50px; font-weight: 600; font-size: 14px;
}
.status-pending    { background: #fff3cd; color: #856404; }
.status-confirmed  { background: #cce5ff; color: #004085; }
.status-processing { background: #cce5ff; color: #004085; }
.status-shipped    { background: #d1ecf1; color: #0c5460; }
.status-delivered  { background: #d4edda; color: #155724; }
.status-returned   { background: #f8d7da; color: #721c24; }
.status-cancelled  { background: #f8d7da; color: #721c24; }
.payment-paid      { background: #d4edda; color: #155724; }
.payment-pending   { background: #fff3cd; color: #856404; }
.payment-failed    { background: #f8d7da; color: #721c24; }

.timeline { padding: 30px 20px; position: relative; }
.timeline-step { display: flex; align-items: flex-start; margin-bottom: 30px; position: relative; }
.timeline-icon {
    width: 50px; height: 50px; background: #e8e8e8; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-right: 20px; z-index: 2; flex-shrink: 0;
}
.timeline-icon i { font-size: 22px; color: #999; }
.timeline-icon.completed { background: var(--success); box-shadow: 0 0 0 5px rgba(0, 184, 148, 0.2); }
.timeline-icon.completed i { color: white; }
.timeline-icon.active { background: var(--brand); box-shadow: 0 0 0 5px rgba(108, 92, 231, 0.3); animation: pulse 1.5s infinite; }
.timeline-icon.active i { color: white; }
.timeline-icon.returned,
.timeline-icon.cancelled { background: var(--accent); box-shadow: 0 0 0 5px rgba(232, 67, 147, 0.2); }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4); }
    70%  { box-shadow: 0 0 0 10px rgba(108, 92, 231, 0); }
    100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
}
.timeline-content { flex: 1; background: var(--surface); padding: 15px 20px; border-radius: 12px; }
.timeline-title { font-weight: 700; font-size: 16px; }
.timeline-desc { font-size: 13px; color: var(--ink-soft); }
.timeline-date { font-size: 12px; color: var(--muted); margin-top: 5px; }
.timeline-step:not(:last-child)::before {
    content: ''; position: absolute; left: 24px; top: 50px;
    width: 2px; height: calc(100% + 10px); background: #e8e8e8; z-index: 1;
}

.info-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
    padding: 20px; background: var(--surface); border-radius: 12px; margin: 20px;
}
.info-item { display: flex; align-items: center; gap: 12px; }
.info-icon {
    width: 40px; height: 40px; background: rgba(108, 92, 231, 0.1);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--brand); flex-shrink: 0;
}
.info-label { font-size: 12px; color: var(--ink-soft); }
.info-value { font-weight: 600; color: var(--ink); }

.items-table { width: 100%; border-collapse: collapse; }
.items-table th { background: var(--surface); padding: 15px; font-weight: 600; }
.items-table td { padding: 15px; border-bottom: 1px solid var(--line); }

.price-summary { background: var(--surface); padding: 20px; border-radius: 12px; margin: 20px; }
.price-row { display: flex; justify-content: space-between; padding: 8px 0; }
.price-row.total {
    border-top: 2px solid var(--line-strong); margin-top: 8px; padding-top: 12px;
    font-size: 18px; font-weight: 700; color: var(--brand);
}

.order-card .action-buttons {
    display: flex; gap: 15px; justify-content: center;
    padding: 20px; border-top: 1px solid var(--line);
}
.btn-download {
    background: var(--brand); color: white; padding: 10px 25px;
    border-radius: 40px; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px; transition: background 0.2s;
}
.btn-download:hover { background: var(--brand-dark); color: white; }
.btn-print {
    background: var(--ink-soft); color: white; padding: 10px 25px;
    border-radius: 40px; text-decoration: none; border: none; cursor: pointer;
}
.btn-print:hover { background: #4a5056; }

.cod-alert {
    background: #d4edda; border-left: 5px solid var(--success);
    padding: 15px 20px; border-radius: 12px; margin: 20px;
}

@media (max-width: 768px) {
    .page-header h1 { font-size: 24px; }
    .info-grid { grid-template-columns: 1fr; }
    .order-card .action-buttons { flex-direction: column; }
}
