/* =========== Shop Navigation =========== */
.shop-nav {
    background: #16324f;
    color: #fff;
    padding: 0 24px;
    height: 60px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}
.shop-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.shop-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #a9d3f5;
    text-decoration: none;
    letter-spacing: 0.5px;
}
.shop-brand:hover { color: #cfe4fb; }
.shop-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}
.shop-nav-links a {
    color: #cfe4fb;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s;
}

/* =========== Nav Search Bar =========== */
.nav-search-form { display: flex; align-items: center; }
.nav-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.nav-search-icon {
    position: absolute;
    left: 11px;
    color: #a9d3f5;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 1;
}
.nav-search-input {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 20px;
    color: #fff;
    font-size: 0.9rem;
    padding: 9px 16px 9px 34px;
    width: 260px;
    outline: none;
    transition: background 0.2s, border-color 0.2s, width 0.3s;
    -webkit-appearance: none;
}
.nav-search-input::placeholder { color: rgba(200,230,201,0.55); }
.nav-search-input:focus {
    background: rgba(255,255,255,0.18);
    border-color: rgba(168,213,186,0.6);
    width: 320px;
}
/* hide browser's native clear "×" button */
.nav-search-input::-webkit-search-cancel-button { display: none; }


.nav-currency-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(255, 255, 255, 0.12);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9d3f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 6px 28px 6px 28px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.nav-currency-select:hover, .nav-currency-select:focus {
    background-color: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.nav-currency-select option {
    background-color: #16324f;
    color: #fff;
    padding: 8px;
    font-weight: 500;
}
.cart-link { position: relative; }
.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #e67e22;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}
.shop-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
}

/* =========== Category Nav Bar =========== */
.shop-cat-nav {
    background: #2d4258;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.shop-cat-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.shop-cat-link {
    display: inline-block;
    color: #cfe4fb;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.shop-cat-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.shop-cat-link.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
    font-weight: 600;
}

/* =========== Category Mega-Menu =========== */
.cat-item {
    position: relative;
}
.cat-item > .shop-cat-link {
    display: flex;
    align-items: center;
    gap: 5px;
}
.cat-chevron {
    font-size: 0.65rem;
    opacity: 0.7;
    transition: transform 0.2s;
}
.cat-item:hover .cat-chevron {
    transform: rotate(180deg);
}
.cat-megamenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #d7e3f0;
    border-top: 2px solid #2f7bd6;
    border-radius: 0 0 8px 8px;
    min-width: 320px;
    /* Grows with the viewport instead of a fixed cap, so wider pages fit
       more categories per row (via the auto-fill grid below) and narrower
       ones naturally fit fewer — no hardcoded breakpoints needed. */
    width: min(94vw, 1400px);
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 300;
    padding: 20px;
    box-sizing: border-box;
}
.cat-item:hover .cat-megamenu,
.cat-item.open .cat-megamenu {
    display: block;
}
/* Sections stack top-to-bottom (one per subcategory); each section's own
   items wrap into rows of ~10 instead of a single tall vertical list, so
   the panel stays wide-and-short instead of tall enough to scroll the page. */
.cat-megamenu-cols {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cat-megamenu-col {
    min-width: 0;
}
.cat-megamenu-col-title {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: #16324f;
    text-decoration: none;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}
.cat-megamenu-col-title:hover { color: #2f7bd6; }
.cat-megamenu-col-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    /* Column count isn't fixed — it grows/shrinks to whatever fits the
       panel's actual width (about 10 per row at the full 1400px width,
       fewer on the narrower sidebar flyout or a smaller viewport). */
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px 14px;
}
.cat-megamenu-col-list a {
    font-size: 0.8rem;
    color: #375a7f;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.cat-megamenu-col-list a:hover { color: #2f7bd6; }

/* =========== Shop Main & Footer =========== */
.shop-main { min-height: calc(100vh - 60px - 80px); padding-bottom: 40px; }
.shop-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.shop-footer {
    background: #16324f;
    color: #7f93ab;
    padding: 20px;
    text-align: center;
}
.shop-footer-inner { max-width: 1200px; margin: 0 auto; }

/* =========== Hero =========== */
.shop-hero {
    background: linear-gradient(135deg, #16324f 0%, #2f7bd6 100%);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}
.shop-hero h1 { color: #fff; font-size: 2.2rem; margin-bottom: 8px; }
.shop-hero p { color: rgba(255,255,255,0.85); font-size: 1.1rem; }

/* =========== Shop Layout (sidebar + products) =========== */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.shop-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}
/* Direct subcategories of the category currently being browsed, as image
   tiles in a wrapping row — lets the shopper narrow further before the
   (much longer) product grid below. Sized at roughly half the product
   tile's footprint (.product-grid uses minmax(240px,1fr) + a 180px image;
   here it's minmax(120px,1fr) + a 90px image), stacked like a product card
   so the (sometimes long, e.g. "Mobiles & Accessories") name gets its own
   full-width line to wrap into instead of being squeezed next to an icon. */
.shop-subcategories { margin-bottom: 20px; }
.subcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.subcat-card {
    background: #fff;
    border: 1px solid #e8ebe5;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.subcat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.subcat-img {
    width: 100%;
    height: 90px;
    background: #f2f7fc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c8cec5;
    font-size: 1.6rem;
    overflow: hidden;
}
.subcat-name {
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #16324f;
    text-align: center;
    white-space: normal;
}
.shop-sidebar { position: sticky; top: 80px; align-self: start; z-index: 10; }

/* Left-nav attribute filters — category browsing lives in the header nav */
.filter-list { list-style: none; padding: 0; margin: 0 0 12px; }
.filter-list li { margin-bottom: 2px; }
.filter-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 5px;
    color: #27496d;
    text-decoration: none;
    font-size: 0.88rem;
    transition: background 0.15s;
}
.filter-link:hover { background: #e5f0fb; }
.filter-link.active { background: #dbeafe; color: #1d4e89; font-weight: 500; }
.filter-check {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 1px solid #b7c9dd;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #1d4e89;
    background: #fff;
}
.filter-link.active .filter-check { background: #1d4e89; border-color: #1d4e89; color: #fff; }
.filter-name { flex: 1; }
.filter-count { color: #7d93ab; font-size: 0.8rem; }
.filter-link.active .filter-count { color: #4c6a8a; }
.filter-empty { font-size: 0.85rem; }
.filter-show-more {
    display: inline-block;
    margin: 2px 0 8px;
    padding: 5px 10px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #1d4e89;
    text-decoration: none;
    border-radius: 5px;
}
.filter-show-more:hover { background: #e5f0fb; text-decoration: underline; }
.filter-show-more-count { color: #7d93ab; font-weight: 400; }
.filter-clear {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: #c0392b;
    text-decoration: underline;
}
.filter-clear:hover { color: #96281b; }

/* Selected-filter value breakdown — shown atop the product grid, e.g.
   selecting "Audience" shows "Audience: Men (12) Women (8) Kids (5)" */
.selected-filter-values {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f6fafd;
    border: 1px solid #dcebf9;
    border-radius: 8px;
}
.sfv-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.sfv-label { font-weight: 600; color: #16324f; font-size: 0.88rem; }
.sfv-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #cbdcf0;
    border-radius: 999px;
    font-size: 0.82rem;
    color: #27496d;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.sfv-badge:hover { background: #eaf4fc; border-color: #b9d7ee; }
.sfv-badge.active { background: #1d4e89; border-color: #1d4e89; color: #fff; }
.sfv-badge-count { color: #7d93ab; font-size: 0.76rem; }
.sfv-badge.active .sfv-badge-count { color: #cfe0f2; }

/* Header category mega menu — flies out below the nav item */
.cat-nav-item { position: relative; }
.cat-nav-item > a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cat-nav-chevron { font-size: 0.7rem; opacity: 0.6; }
.cat-nav-megamenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 8px;
    background: #fff;
    border: 1px solid #d7e3f0;
    border-left: 2px solid #2f7bd6;
    border-radius: 8px;
    min-width: 320px;
    /* Grows with the viewport (clamped so it can't run past the right edge
       of the screen), same as the header menu — more room fits more
       categories per row automatically via the auto-fill grid. */
    width: min(70vw, 900px);
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 300;
    padding: 20px;
    box-sizing: border-box;
}
.cat-nav-item:hover .cat-nav-megamenu,
.cat-nav-item.open .cat-nav-megamenu {
    display: block;
}

/* =========== Product Grid =========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.product-card {
    background: #fff;
    border: 1px solid #e8ebe5;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.product-img {
    height: 180px;
    background: #f2f7fc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c8cec5;
    font-size: 3rem;
    position: relative;
}
.product-badge {
    position: absolute;
    top: 10px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.product-badge.sale { right: 10px; background: #c0392b; color: #fff; }
.product-badge.featured { left: 10px; background: #e67e22; color: #fff; }
.product-info { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-category { font-size: 0.75rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.product-name { font-size: 0.95rem; font-weight: 600; color: #16324f; margin: 4px 0 2px; }
.product-sku  { font-size: 0.72rem; color: #aaa; letter-spacing: 0.3px; margin-bottom: 5px; display: block; font-family: monospace; }
.product-desc { font-size: 0.82rem; color: #666; margin-bottom: 8px; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { margin-top: auto; }
.price-current { font-size: 1.1rem; font-weight: 700; color: #1d4e89; }
.price-old { font-size: 0.88rem; color: #999; text-decoration: line-through; margin-left: 6px; }
.price-save { font-size: 0.78rem; color: #c0392b; font-weight: 600; margin-left: 6px; }

/* =========== Pagination =========== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.page-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 6px;
    background: #fff; border: 1px solid #d7e3f0;
    color: #333; text-decoration: none; font-size: 0.88rem;
    transition: all 0.2s;
}
.page-link:hover { background: #e5f0fb; }
.page-link.active { background: #2f7bd6; color: #fff; border-color: #2f7bd6; }

/* =========== Product Detail =========== */
.pdp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #718096;
}
.pdp-breadcrumb a {
    color: #1d4e89;
    text-decoration: none;
}
.pdp-breadcrumb a:hover { text-decoration: underline; }
.pdp-breadcrumb .pdp-breadcrumb-sep { color: #b0bac5; }
.pdp-breadcrumb .pdp-breadcrumb-current {
    color: #4a5568;
    /* Long product names shouldn't push the breadcrumb to wrap the whole
       row awkwardly — clip to one line with an ellipsis instead. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
@media (max-width: 600px) {
    .pdp-breadcrumb { font-size: 0.78rem; }
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.product-detail-img {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.product-img-large {
    height: 400px;
    background: #f2f7fc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #c8cec5;
    position: relative;
}

/* =========== PDP Image Carousel =========== */
.pdp-thumb-carousel {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pdp-thumb-track {
    display: flex;
    gap: 10px;
    flex: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 2px;
    scrollbar-width: thin;
    scrollbar-color: #c8cec5 transparent;
}
.pdp-thumb-track::-webkit-scrollbar { height: 6px; }
.pdp-thumb-track::-webkit-scrollbar-track { background: transparent; }
.pdp-thumb-track::-webkit-scrollbar-thumb { background: #c8cec5; border-radius: 4px; }
.pdp-thumb {
    flex: 0 0 auto;
    width: 68px;
    height: 68px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #f2f7fc;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}
.pdp-thumb:hover { border-color: #b9d7ee; transform: translateY(-1px); }
.pdp-thumb.active { border-color: #2f7bd6; }
.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pdp-thumb-nav {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #c8cec5;
    background: #fff;
    color: #4a4a4a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.pdp-thumb-nav:hover { background: #2f7bd6; color: #fff; border-color: #2f7bd6; }
@media (max-width: 480px) {
    .pdp-thumb { width: 56px; height: 56px; }
    .pdp-thumb-nav { width: 28px; height: 28px; }
}

.product-detail-price { margin: 16px 0; }
.product-detail-price .price-current { font-size: 1.6rem; }
.product-detail-price .price-old { font-size: 1.1rem; }
.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #c8cec5;
    border-radius: 5px;
    overflow: hidden;
}
.qty-control button {
    width: 36px; height: 36px; border: none; background: #f0f2f5;
    font-size: 1rem; cursor: pointer; transition: background 0.2s;
}
.qty-control button:hover { background: #e0e2e5; }
.qty-control input {
    width: 50px; text-align: center; border: none; border-left: 1px solid #c8cec5;
    border-right: 1px solid #c8cec5; font-size: 0.95rem; padding: 6px;
}
.qty-control input:focus { outline: none; }
.product-description { border-top: 1px solid #e8ebe5; padding-top: 16px; }
.product-description p { color: #555; line-height: 1.7; }

/* =========== Product Attributes (PDP) =========== */
.product-attributes { border-top: 1px solid #e8ebe5; padding-top: 24px; }
.attr-group-card { margin-bottom: 0; }
.attr-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2f7bd6;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8ebe5;
}
.attr-list { margin: 0; }
.attr-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid #e8ebe5;
    font-size: 0.9rem;
}
.attr-row:last-child { border-bottom: none; }
.attr-key { margin: 0; color: #888; }
.attr-value { margin: 0; color: #16324f; font-weight: 500; text-align: right; }
.attr-show-more {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    background: none;
    border: none;
    color: #2f7bd6;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.attr-show-more:hover { color: #1f5a94; text-decoration: underline; }
.attr-show-more i { font-size: 0.75rem; }

/* =========== Cart =========== */
.cart-layout { display: grid; grid-template-columns: 1fr 350px; gap: 24px; margin-top: 16px; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.95rem; }
.summary-total { font-size: 1.1rem; }

/* =========== Checkout =========== */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; margin-top: 16px; align-items: start; }
.checkout-summary { position: sticky; top: 24px; }
.checkout-item {
    display: flex; justify-content: space-between; padding: 8px 0;
    font-size: 0.9rem; border-bottom: 1px solid #f0f2f5;
}

/* =========== Order Status Badges =========== */
.badge-pending { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #d1ecf1; color: #0c5460; }
.badge-processing { background: #cce5ff; color: #004085; }
.badge-shipped { background: #d4edda; color: #155724; }
.badge-delivered { background: #c3e6cb; color: #155724; }
.badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-returned { background: #e2e3e5; color: #383d41; }

/* =========== Customer Auth Box =========== */
.auth-box {
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #d7e3f0;
    border-radius: 10px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.auth-box h1 { text-align: center; margin-bottom: 4px; }
.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e8ebe5;
    font-size: 0.9rem;
}

/* =========== Responsive =========== */
@media (max-width: 992px) {
    .shop-layout { grid-template-columns: 180px 1fr; gap: 16px; }
    .product-detail { grid-template-columns: 1fr 1fr; gap: 20px; }
    .cart-layout { grid-template-columns: 1fr 280px; }
    .checkout-layout { grid-template-columns: 1fr 300px; }
}
@media (max-width: 768px) {
    .shop-nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0;
        background: #16324f; flex-direction: column; padding: 16px; gap: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
    .shop-nav-links.open { display: flex; }
    .shop-nav-toggle { display: block; }
    .nav-search-form { width: 100%; }
    .nav-search-wrap { width: 100%; }
    .nav-search-input { width: 100%; border-radius: 20px; }
    .nav-search-input:focus { width: 100%; }
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { position: static; display: block; }
    .shop-sidebar form { width: 100%; }
    .filter-list { display: flex; flex-wrap: wrap; gap: 4px; }
    .filter-list li { margin-bottom: 0; }
    .product-detail { grid-template-columns: 1fr; }
    .product-img-large { height: 250px; }
    .cart-layout { grid-template-columns: 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
    .auth-box { padding: 20px; }
    .shop-hero { padding: 40px 16px; }
    .shop-hero h1 { font-size: 1.6rem; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .product-img { height: 140px; font-size: 2rem; }
    .product-info { padding: 10px; }
    .product-name { font-size: 0.85rem; }
    .price-current { font-size: 0.95rem; }

    /* Category mega menus: hover doesn't exist on touch, so opening is
       tap-driven (the chevron's onclick toggles .open — see shop-layout.php
       / shop/index.php). Both flyouts also drop the floating/absolute
       panel in favor of flowing inline, full width, right under the tapped
       item — a floating panel sized for desktop would otherwise overflow
       a phone screen. */
    .cat-item.open, .cat-nav-item.open { flex: 1 0 100%; }
    .cat-item.open .cat-megamenu,
    .cat-nav-item.open .cat-nav-megamenu {
        position: static;
        width: 100%;
        max-width: none;
        margin: 8px 0 0;
        box-shadow: none;
    }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-img { height: 120px; }
    .product-detail-price .price-current { font-size: 1.3rem; }
}

/* =========== Utility =========== */
.mt-48 { margin-top: 48px; }

/* =========== Featured Products Carousel =========== */
/* Overrides .mt-48's default 48px specifically for these carousel-style
   sections (Featured Products, You May Also Like, People Also Interested,
   Trending Now — the only things that ever pair "mt-48" with
   "featured-section") — .mt-48 on its own keeps its normal 48px for any
   other, non-carousel use. Kept deliberately small on both sides (top AND
   .featured-section's own margin-bottom below): two of these stacked back
   to back sit inside plain block flow with nothing between them but an
   inline <script> tag (which isn't a rendered box, so it doesn't stop
   margin collapsing) — so the actual gap could be as small as
   max(top, bottom) if the browser collapses them, or their sum if
   something ever stops that from happening. Sizing both halves small
   keeps the visible gap tight either way, rather than betting on which
   one actually applies. */
.mt-48.featured-section {
    margin-top: 12px;
}
.featured-section {
    background: linear-gradient(135deg, #f6fafd 0%, #eaf4fc 100%);
    border: 1px solid #dcebf9;
    border-radius: 14px;
    padding: 20px 20px 18px;
    margin-bottom: 12px;
}
.featured-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}
.featured-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #16324f;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.featured-star-icon { color: #e67e22; font-size: 1.2rem; }
.featured-subtitle { font-size: 0.88rem; color: #6f93b8; margin: 0; }
.featured-nav-btns { display: flex; gap: 8px; flex-shrink: 0; }
.feat-nav-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1.5px solid #b8d4ee;
    background: #fff;
    color: #234f7c;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.18s, border-color 0.18s, transform 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.feat-nav-btn:hover {
    background: #2f7bd6;
    color: #fff;
    border-color: #2f7bd6;
    transform: scale(1.08);
}

/* Carousel viewport */
.featured-carousel-wrap { overflow: hidden; }
.featured-carousel { overflow: hidden; }
.featured-track {
    display: flex;
    gap: 20px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Each slide is sized to show 4 cards on desktop */
.featured-slide {
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: 0;
    display: flex; /* lets a stretched slide's height reach .carousel-product-card below */
}
.featured-slide .product-card { width: 100%; }

/* Applied by initCarousel() (see _people-interested.php) when a track has
   fewer products than fit in one row at the current viewport — instead of
   each slide reserving its usual fixed quarter-width (leaving a visible
   gap for however many are missing), they stretch to fill the row evenly. */
.featured-track.no-scroll {
    transform: none !important;
}
.featured-track.no-scroll .featured-slide {
    flex: 1 1 0;
}

/* Explicit modifier for every carousel's product cards (Featured
   Products, You May Also Like, Recently Viewed, Trending Now) — added in
   markup alongside .product-card (class="product-card carousel-product-card"),
   not scoped off .featured-slide, so it's unambiguous at the HTML level
   which cards get this treatment. Deliberately NOT applied to the plain
   .product-grid listing/category page, which keeps using bare
   .product-card, completely untouched by any of this.
   - height: 100% — fills the row's full stretched height (flex's default
     cross-axis stretch already equalizes .featured-slide heights within
     one visible row; without this, .product-card only ever sized to its
     own content, leaving cards with a long product-name visibly taller
     than their neighbors).
   - product-name is clamped to 2 lines with an ellipsis (same pattern
     already used for .product-desc above) so a long name can no longer
     be what makes one card taller than another in the first place. */
.carousel-product-card {
    height: 100%;
}
.carousel-product-card .product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.85rem;
}

/* Smaller tile — less image height, tighter padding/text — than a plain
   .product-grid listing card (untouched, see the comment above). A
   carousel already page through many products at once, so each one
   doesn't need to carry the same visual weight a lone listing card does. */
.carousel-product-card .product-img {
    height: 130px;
}
.carousel-product-card .product-info {
    padding: 10px;
}
.carousel-product-card .product-sku {
    font-size: 0.68rem;
    margin-bottom: 3px;
}
.carousel-product-card .price-current {
    font-size: 0.95rem;
}
.carousel-product-card .price-old {
    font-size: 0.78rem;
}

/* Dot indicators */
.featured-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 12px;
}
.feat-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    background: #cbdcf0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, width 0.2s;
    padding: 0;
}
.feat-dot.active {
    background: #2f7bd6;
    width: 22px;
    border-radius: 4px;
    transform: scaleY(1.1);
}
.feat-dot:hover { background: #5b9bd9; }

/* Responsive slide counts */
@media (max-width: 1100px) {
    .featured-slide { flex: 0 0 calc((100% - 40px) / 3); }
}
@media (max-width: 900px) {
    .featured-slide { flex: 0 0 calc((100% - 20px) / 2); }
    .featured-section { padding: 16px 16px 14px; }
}
@media (max-width: 600px) {
    .featured-slide { flex: 0 0 100%; }
    .featured-title { font-size: 1.05rem; }
}
