/* ============================================================
   Premium storefront design system
   Amazon (density/trust) + Myntra (fashion energy) + Apple
   (whitespace/typography) inspired. White base, one confident
   accent color, rounded cards, soft layered shadows.
   ============================================================ */

:root {
    --accent: #B76E79;          /* rose-gold, matches the SS Royal Collections logo */
    --accent-dark: #8E4F58;
    --accent-light: #FBEEF0;
    --ink: #2A1F22;
    --ink-soft: #5A4A4D;
    --muted: #93807F;
    --bg: #FFFFFF;
    --bg-alt: #FBF7F5;
    --border: #F0E5E3;
    --success: #1F9254;
    --star: #D4A574;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(42,31,34,0.06), 0 1px 2px rgba(42,31,34,0.04);
    --shadow-md: 0 8px 24px rgba(42,31,34,0.08), 0 2px 6px rgba(42,31,34,0.05);
    --shadow-lg: 0 20px 50px rgba(42,31,34,0.14);
    --transition: all .25s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 0.95rem;
    line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-dark); text-decoration: none; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}
.section-subtitle { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.75rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.section-head .view-all { font-weight: 600; font-size: 0.88rem; white-space: nowrap; }

.container-fluid-max { max-width: 1360px; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

section.py-section { padding-top: 3rem; padding-bottom: 3rem; }
@media (max-width: 767px) { section.py-section { padding-top: 2rem; padding-bottom: 2rem; } }

/* Skeleton loader shimmer, used while images lazy-load */
.skeleton {
    background: linear-gradient(90deg, #F0F0F3 25%, #F7F7F9 37%, #F0F0F3 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}
@keyframes skeleton-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

img.lazy { opacity: 0; transition: opacity .35s ease; }
img.lazy.loaded { opacity: 1; }

/* ============================================================
   Header
   ============================================================ */
.announcement-bar {
    background: var(--ink);
    color: #fff;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.45rem 1rem;
    letter-spacing: 0.3px;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow .2s ease;
}
.site-header.is-stuck { box-shadow: 0 2px 16px rgba(42,31,34,0.08); }

.site-header .navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.site-header .navbar-brand .accent-dot { color: var(--accent); }

.header-search { position: relative; flex: 1; max-width: 560px; }
.header-search input {
    border-radius: 999px;
    border: 1.5px solid var(--border);
    padding: 0.55rem 1.1rem 0.55rem 2.6rem;
    font-size: 0.88rem;
    background: var(--bg-alt);
    transition: var(--transition);
    width: 100%;
}
.header-search input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px var(--accent-light);
}
.header-search .search-icon {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--muted); pointer-events: none;
}
.search-suggestions {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    border: 1px solid var(--border); overflow: hidden; z-index: 1040; display: none;
}
.search-suggestions.show { display: block; }
.search-suggestions a {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem;
    color: var(--ink); border-bottom: 1px solid var(--border);
}
.search-suggestions a:last-child { border-bottom: none; }
.search-suggestions a:hover { background: var(--bg-alt); }
.search-suggestions img { width: 38px; height: 38px; object-fit: cover; border-radius: 6px; background: var(--bg-alt); }
.search-suggestions .s-name { font-size: 0.85rem; font-weight: 500; }
.search-suggestions .s-price { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-left: auto; }

.header-icon-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%; color: var(--ink); font-size: 1.2rem;
    transition: var(--transition);
}
.header-icon-btn:hover { background: var(--bg-alt); color: var(--accent); }
.header-icon-btn .badge-count {
    position: absolute; top: 2px; right: 2px; background: var(--accent); color: #fff;
    font-size: 0.62rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
    border: 2px solid #fff;
}

.category-nav { background: var(--bg-alt); border-bottom: 1px solid var(--border); position: relative; }
.category-nav .nav { flex-wrap: wrap; }
.category-nav .nav-link {
    color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; padding: 0.65rem 1rem;
    transition: var(--transition); white-space: nowrap; display: flex; align-items: center; gap: 4px;
}
.category-nav .nav-link:hover { color: var(--accent); }
.mega-menu-caret { font-size: 0.65rem; transition: transform 0.15s; }

/* Mega-menu: a wide panel with a wrapping grid of columns, each column
   being one second-level category with its own children listed below.
   Scales to any number of columns instead of assuming a fixed 3. */
.mega-menu-item { /* positioning context is .category-nav above, not this narrow li — so the panel can span the full page width */ }
.mega-menu-panel {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    max-height: 70vh;
    max-width: 100vw;
    overflow-y: auto;
    overflow-x: hidden;
}
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 100%;
    overflow-x: hidden;
}
.mega-menu-column { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; overflow-wrap: break-word; }
.mega-menu-column-title {
    font-weight: 700; color: var(--ink); font-size: 0.88rem;
    margin-bottom: 0.3rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border);
    overflow-wrap: break-word;
}
.mega-menu-column a { color: var(--ink-soft); font-size: 0.82rem; text-decoration: none; overflow-wrap: break-word; white-space: normal; }
.mega-menu-column a:hover { color: var(--accent); text-decoration: underline; }

@media (hover: hover) {
    .mega-menu-item:hover .mega-menu-panel { display: block; }
    .mega-menu-item:hover .mega-menu-caret { transform: rotate(180deg); }
}
/* Touch devices can't hover — handled as a mobile accordion instead, see below */
.mega-menu-item.mega-menu-open .mega-menu-panel { display: block; }

/* Mobile: the horizontal bar + wide grid panel doesn't work on a phone
   screen, so it collapses into a toggle button + accordion-style list —
   tap a category to expand its columns stacked vertically instead of
   side by side. */
.mobile-nav-toggle {
    display: none;
    width: 100%; text-align: left; padding: 0.65rem 1rem;
    background: none; border: none; font-weight: 600; color: var(--ink);
}
@media (max-width: 991px) {
    .mobile-nav-toggle { display: block; }
    .category-nav .nav {
        display: none; flex-direction: column; flex-wrap: nowrap; overflow-x: visible;
        max-height: 75vh; overflow-y: auto;
    }
    .category-nav .nav.mobile-nav-open { display: flex; }
    .category-nav .nav-item { width: 100%; }
    .category-nav .nav-link { padding: 0.7rem 1rem; border-top: 1px solid var(--border); justify-content: space-between; }
    .mega-menu-panel {
        display: none; position: static; border: none; box-shadow: none; max-height: none;
        background: var(--bg-alt);
    }
    .mega-menu-item.mega-menu-open .mega-menu-panel { display: block; }
    .mega-menu-grid { grid-template-columns: 1fr; gap: 0; padding: 0; }
    .mega-menu-column { padding: 0.5rem 1rem 0.5rem 2rem; border-top: 1px solid var(--border); }
    .mega-menu-column a { padding: 0.25rem 0; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero-carousel { border-radius: var(--radius-lg); overflow: hidden; margin-top: 1.5rem; box-shadow: var(--shadow-md); }
.hero-slide {
    background-size: cover; background-position: center;
    min-height: 340px; display: flex; align-items: center;
    padding: 3rem;
    position: relative;
}
.hero-slide::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(42,31,34,0.55) 0%, rgba(42,31,34,0.15) 55%, transparent 100%);
}
.hero-slide-content { position: relative; z-index: 2; color: #fff; max-width: 480px; }
.hero-slide-content .eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #FFD1EC; margin-bottom: 0.6rem; }
.hero-slide-content h1, .hero-slide-content p { color: #fff; } /* a direct rule always wins over inherited color, regardless of specificity — without this, the global h1-h6 heading color rule (a dark ink color, meant for normal body text) was overriding the white intended here, making hero headings nearly invisible against a dark background */
.hero-slide-content h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.1; margin-bottom: 0.9rem; }
.hero-slide-content p { font-size: 1rem; opacity: 0.92; margin-bottom: 1.5rem; }
@media (max-width: 767px) { .hero-slide { min-height: 260px; padding: 1.75rem; } .hero-slide-content h1 { font-size: 1.6rem; } }

.carousel-indicators [data-bs-target] { background: rgba(255,255,255,0.55); width: 8px; height: 8px; border-radius: 50%; }
.carousel-indicators .active { background: #fff; }

/* ============================================================
   Category chips
   ============================================================ */
.category-chip {
    display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
    text-align: center; color: var(--ink); transition: var(--transition);
}
.category-chip .chip-icon {
    width: 76px; height: 76px; border-radius: 50%; background: var(--accent-light);
    display: flex; align-items: center; justify-content: center; font-size: 1.9rem;
    transition: var(--transition); border: 2px solid transparent;
}
.category-chip:hover { color: var(--accent); }
.category-chip:hover .chip-icon { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-sm); }
.category-chip span.chip-label { font-size: 0.82rem; font-weight: 600; }

/* ============================================================
   Product cards
   ============================================================ */
.product-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); position: relative;
    transition: var(--transition); height: 100%; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }

.product-card .img-wrap { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: var(--bg-alt); }
.product-card .img-wrap img {
    width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0;
    transition: opacity .35s ease, transform .5s ease;
}
.product-card .img-wrap img.img-hover { opacity: 0; }
.product-card:hover .img-wrap img.img-primary { opacity: 0; }
.product-card:hover .img-wrap img.img-hover { opacity: 1; }
.product-card:hover .img-wrap img { transform: scale(1.04); }

.product-card .badge-discount {
    position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff;
    font-size: 0.7rem; font-weight: 700; padding: 0.3em 0.6em; border-radius: 6px; z-index: 2;
}
.product-card .badge-outofstock {
    position: absolute; top: 10px; left: 10px; background: var(--ink); color: #fff;
    font-size: 0.68rem; font-weight: 700; padding: 0.3em 0.6em; border-radius: 6px; z-index: 2;
}

.product-card .btn-wishlist {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-soft); box-shadow: var(--shadow-sm); border: none;
    transition: var(--transition);
}
.product-card .btn-wishlist:hover { color: var(--accent); transform: scale(1.08); }
.product-card .btn-wishlist.active { color: var(--accent); }
.product-card .btn-wishlist.active i::before { content: "\f415"; } /* bi-heart-fill */

.product-card .btn-quickview {
    position: absolute; left: 50%; bottom: 10px; transform: translate(-50%, 12px);
    background: rgba(42,31,34,0.88); color: #fff; font-size: 0.76rem; font-weight: 600;
    padding: 0.45rem 1rem; border-radius: 999px; white-space: nowrap;
    opacity: 0; transition: var(--transition); z-index: 2; border: none;
}
.product-card:hover .btn-quickview { opacity: 1; transform: translate(-50%, 0); }

.product-card .card-body-custom { padding: 0.9rem 1rem 1.1rem; flex: 1; display: flex; flex-direction: column; }
.product-card .p-name {
    font-size: 0.86rem; font-weight: 600; color: var(--ink); margin-bottom: 0.3rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.4em;
}
.product-card .p-rating { display: flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; color: var(--muted); margin-bottom: 0.4rem; }
.product-card .p-rating .stars { color: var(--star); }
.product-card .p-price-row { display: flex; align-items: baseline; gap: 0.5rem; margin-top: auto; margin-bottom: 0.75rem; }
.product-card .p-price { font-size: 1.02rem; font-weight: 800; color: var(--ink); }
.product-card .p-price-old { font-size: 0.8rem; color: var(--muted); text-decoration: line-through; }
.product-card .p-discount-pct { font-size: 0.78rem; color: var(--success); font-weight: 700; }

.product-card .btn-add-cart {
    width: 100%; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.82rem;
    background: var(--ink); color: #fff; border: none; padding: 0.55rem;
    transition: var(--transition);
}
.product-card .btn-add-cart:hover { background: var(--accent); }
.product-card .btn-add-cart:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

/* List view (Product Listing page toggle) */
.product-list-row {
    display: flex; gap: 1.25rem; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; transition: var(--transition);
}
.product-list-row:hover { box-shadow: var(--shadow-md); }
.product-list-row .img-wrap { width: 160px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1/1; background: var(--bg-alt); position: relative; }
.product-list-row .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-list-row .row-body { flex: 1; display: flex; flex-direction: column; }
.product-list-row .row-desc { font-size: 0.84rem; color: var(--muted); margin: 0.5rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   Offers banner / brand strip / testimonials
   ============================================================ */
.offer-banner {
    border-radius: var(--radius-lg); overflow: hidden; position: relative;
    background: linear-gradient(120deg, var(--accent), var(--accent-dark));
    color: #fff; padding: 2.5rem; display: flex; align-items: center; justify-content: space-between;
}
.offer-banner h3 { color: #fff; font-size: 1.6rem; margin-bottom: 0.4rem; }
.offer-banner p { opacity: 0.9; margin-bottom: 0; }

.brand-strip { display: flex; align-items: center; justify-content: space-around; flex-wrap: wrap; gap: 2rem; }
.brand-strip .brand-logo {
    font-weight: 800; font-size: 1.15rem; color: var(--ink); opacity: 0.35;
    letter-spacing: -0.02em; transition: var(--transition);
}
.brand-strip .brand-logo:hover { opacity: 0.9; color: var(--accent); }

.testimonial-card {
    background: var(--bg-alt); border-radius: var(--radius); padding: 1.75rem; height: 100%;
    border: 1px solid var(--border);
}
.testimonial-card .stars { color: var(--star); margin-bottom: 0.75rem; font-size: 0.85rem; }
.testimonial-card p.quote { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 1.25rem; font-style: italic; }
.testimonial-card .author { display: flex; align-items: center; gap: 0.75rem; }
.testimonial-card .avatar {
    width: 42px; height: 42px; border-radius: 50%; background: var(--accent);
    color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem;
}
.testimonial-card .author-name { font-size: 0.85rem; font-weight: 700; }
.testimonial-card .author-role { font-size: 0.76rem; color: var(--muted); }

/* ============================================================
   Newsletter
   ============================================================ */
.newsletter-section { background: var(--ink); border-radius: var(--radius-lg); padding: 3rem; text-align: center; color: #fff; }
.newsletter-section h3 { color: #fff; font-size: 1.6rem; margin-bottom: 0.5rem; }
.newsletter-section p { color: #C7C6D1; margin-bottom: 1.75rem; }
.newsletter-form { max-width: 460px; margin: 0 auto; display: flex; gap: 0.6rem; }
.newsletter-form input {
    flex: 1; min-width: 0; border-radius: 999px; border: none; padding: 0.75rem 1.25rem; font-size: 0.9rem;
}
.newsletter-form input:focus { outline: none; box-shadow: 0 0 0 4px rgba(183,110,121,0.35); }
.newsletter-form button {
    border-radius: 999px; background: var(--accent); color: #fff; border: none;
    padding: 0.75rem 1.75rem; font-weight: 700; font-size: 0.88rem; transition: var(--transition);
}
.newsletter-form button:hover { background: var(--accent-dark); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: #241619; color: #C9B8BA; padding-top: 3.5rem; }
.site-footer h6 { color: #fff; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1.1rem; }
.site-footer a { color: #C9B8BA; font-size: 0.86rem; overflow-wrap: break-word; word-break: break-word; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer ul li { margin-bottom: 0.6rem; overflow-wrap: break-word; word-break: break-word; }
.site-footer .footer-brand { font-weight: 800; font-size: 1.3rem; color: #fff; margin-bottom: 0.75rem; }
.site-footer .social-icons a {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08);
    display: inline-flex; align-items: center; justify-content: center; margin-right: 0.5rem;
    transition: var(--transition);
}
.site-footer .social-icons a:hover { background: var(--accent); }
.payment-icons { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.payment-icons span {
    background: rgba(255,255,255,0.08); border-radius: 6px; padding: 0.35rem 0.65rem; font-size: 0.72rem; font-weight: 600; color: #fff;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 2.5rem; padding: 1.25rem 0; font-size: 0.8rem; text-align: center; }

/* ============================================================
   Product Listing page (filters + grid)
   ============================================================ */
.filter-sidebar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.active-filters-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
    margin-bottom: 1rem;
}
.active-filter-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent-light); color: var(--accent-dark);
    border: 1px solid var(--accent); border-radius: 999px;
    padding: 0.3rem 0.8rem; font-size: 0.8rem; text-decoration: none;
    transition: var(--transition);
}
.active-filter-chip:hover { background: var(--accent); color: #fff; text-decoration: none; }
.active-filter-clear { font-size: 0.8rem; color: var(--ink-soft); text-decoration: underline; margin-left: 4px; }
.filter-apply-sticky {
    position: sticky; top: 0.75rem; z-index: 5;
    background: #fff; padding-bottom: 0.75rem; margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.filter-sidebar .filter-group { border-bottom: 1px solid var(--border); padding-bottom: 1.1rem; margin-bottom: 1.1rem; }
.filter-sidebar .filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-sidebar .filter-title { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 0.75rem; }
.filter-sidebar .form-check { margin-bottom: 0.4rem; }
.filter-sidebar .form-check-label { font-size: 0.85rem; color: var(--ink-soft); cursor: pointer; }

/* "Show more" — any filter list can have more than 10 options (a color
   attribute with 50 values, a large category group, etc.). Items past
   the 10th are hidden by default (JS adds this class) with a toggle
   link to reveal the rest, matching the familiar Amazon-style pattern
   rather than dumping a huge checkbox list on the page at once. */
.filter-options-hidden { display: none; }
.filter-show-more-link {
    display: inline-block; font-size: 0.8rem; color: var(--accent);
    text-decoration: underline; cursor: pointer; margin-top: 0.2rem;
}
.filter-sidebar .category-tree a { display: block; font-size: 0.85rem; color: var(--ink-soft); padding: 0.25rem 0; }
.filter-sidebar .category-tree a:hover, .filter-sidebar .category-tree a.active { color: var(--accent); font-weight: 600; }
.filter-sidebar .category-tree .sub { padding-left: 0.9rem; }

/* Category accordion — a group like "Bangles & Bracelets" only shows
   its full child list expanded when it contains the currently selected
   item; every other group collapses to just its clickable label, so
   picking one sub-category doesn't bury it under every other
   unrelated group's full list (see products/index.php for the PHP
   logic, front.js for the click-to-toggle). */
.category-group { margin-bottom: 0.15rem; }
.category-group-header { position: relative; cursor: pointer; }
.category-group-toggle {
    position: absolute; right: 0; top: 0.2rem; font-size: 0.7rem;
    color: var(--ink-soft); transition: transform 0.15s ease; cursor: pointer;
}
.category-group-collapsed .category-group-toggle { transform: rotate(-90deg); }
.category-group-body {
    padding-left: 0;
    max-height: 800px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}
.category-group-hidden {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.15s ease;
}

.color-swatch {
    display: inline-block; width: 26px; height: 26px; border-radius: 50%; margin: 0 6px 6px 0;
    border: 2px solid var(--border); cursor: pointer; transition: var(--transition); position: relative;
}
.color-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
.color-swatch-label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; margin-bottom: 0.4rem; }

.sort-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.view-toggle button { width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; color: var(--muted); }
.view-toggle button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.mobile-filter-toggle { display: none; }
@media (max-width: 991px) {
    .filter-sidebar { position: fixed; top: 0; left: -320px; width: 300px; height: 100vh; z-index: 1050; overflow-y: auto; transition: left .3s ease; border-radius: 0; }
    .filter-sidebar.show { left: 0; box-shadow: var(--shadow-lg); }
    .filter-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1045; }
    .filter-backdrop.show { display: block; }
    .mobile-filter-toggle { display: inline-flex; }
}

/* ============================================================
   Product Detail page
   ============================================================ */
.pd-gallery-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 1/1; position: relative; background: var(--bg-alt); cursor: zoom-in; }
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.pd-gallery-main.zoomed img { transform: scale(1.9); }
.pd-thumbs { display: flex; gap: 0.6rem; margin-top: 0.75rem; flex-wrap: wrap; }
.pd-thumbs img {
    width: 68px; height: 68px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid var(--border);
    cursor: pointer; transition: var(--transition);
}
.pd-thumbs img.active, .pd-thumbs img:hover { border-color: var(--accent); }

.pd-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.pd-rating { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.pd-rating .stars { color: var(--star); }
.pd-price-row { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 0.25rem; }
.pd-price { font-size: 1.9rem; font-weight: 800; }
.pd-price-old { font-size: 1.05rem; color: var(--muted); text-decoration: line-through; }
.pd-discount { color: var(--success); font-weight: 700; font-size: 0.92rem; }
.pd-stock { font-size: 0.85rem; font-weight: 600; margin-bottom: 1.25rem; }
.pd-stock.in { color: var(--success); }
.pd-stock.out { color: #C53030; }

.option-swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.size-option {
    min-width: 44px; height: 44px; padding: 0 0.75rem; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: var(--transition); background: #fff;
}
.size-option.active, .size-option:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.qty-selector { display: inline-flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-selector button { width: 40px; height: 42px; border: none; background: #fff; font-size: 1.1rem; color: var(--ink); }
.qty-selector button:hover { background: var(--bg-alt); }
.qty-selector input { width: 50px; height: 42px; border: none; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty-selector input::-webkit-outer-spin-button, .qty-selector input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn-buy-now { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; border-radius: var(--radius-sm); }
.btn-buy-now:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-add-cart-lg { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; border-radius: var(--radius-sm); }
.btn-add-cart-lg:hover { background: #2a2a33; border-color: #2a2a33; color: #fff; }
.btn-icon-outline {
    width: 48px; height: 48px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
    display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); background: #fff;
    transition: var(--transition);
}
.btn-icon-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon-outline.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

.pd-tabs .nav-link { color: var(--muted); font-weight: 600; font-size: 0.9rem; border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 0.85rem 1.25rem; }
.pd-tabs .nav-link.active { color: var(--ink); border-bottom-color: var(--accent); background: transparent; }
.spec-table th { width: 220px; color: var(--muted); font-weight: 600; font-size: 0.85rem; background: var(--bg-alt); }
.spec-table td { font-size: 0.88rem; }

.review-item { border-bottom: 1px solid var(--border); padding: 1.25rem 0; }
.review-item:last-child { border-bottom: none; }
.review-item .stars { color: var(--star); font-size: 0.85rem; }
.review-item .review-author { font-weight: 700; font-size: 0.88rem; }
.review-item .review-date { color: var(--muted); font-size: 0.78rem; }

/* Share buttons */
.share-buttons a {
    width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-alt); color: var(--ink-soft); margin-right: 0.4rem; transition: var(--transition);
}
.share-buttons a:hover { background: var(--accent); color: #fff; }

/* Generic content card — used by cart/checkout/auth pages (distinct from .product-card,
   which is specifically the shop-grid product tile with its image-wrap/badge structure). */
.summary-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.cart-line { display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.cart-line img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-alt); flex-shrink: 0; }
.cart-line .flex-fill { min-width: 0; } /* flex items default to refusing to shrink below their content's natural width — without this, a long order number/date could force the whole row wider than the screen */
.cart-line .flex-fill > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line:last-child { border-bottom: none; }
@media (max-width: 575px) {
    .cart-line { gap: 0.6rem; flex-wrap: wrap; }
    .cart-line img { width: 56px; height: 56px; }
    .cart-line .fw-bold[style*="width:90px"] { width: 64px !important; font-size: 0.85rem; }
    .cart-line .fw-bold[style*="width:100px"] { width: auto !important; font-size: 0.85rem; margin-left: auto; }
    .cart-line .btn { padding: 0.3rem 0.8rem; font-size: 0.78rem; }
}


.badge-mini { font-size: 0.72rem; padding: 0.3em 0.6em; border-radius: 6px; font-weight: 600; }

/* Toast (add-to-cart / wishlist feedback) */
.toast-mini {
    position: fixed; bottom: 24px; right: 24px; background: var(--ink); color: #fff;
    padding: 0.85rem 1.4rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
    font-size: 0.86rem; font-weight: 600; z-index: 2000; display: flex; align-items: center; gap: 0.6rem;
    transform: translateY(20px); opacity: 0; transition: var(--transition); pointer-events: none;
}
.toast-mini.show { transform: translateY(0); opacity: 1; }

/* Focus visibility for accessibility (WCAG) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---- Store profile hero (public /shop/{slug} page) ---- */
.store-hero { margin-bottom: 2rem; }
.store-hero-cover {
    height: 220px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
    position: relative;
}
.store-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 100%);
    border-radius: var(--radius-sm);
}
.store-hero-content {
    display: flex; align-items: flex-end; gap: 1.25rem;
    margin-top: -56px; padding: 0 1.5rem;
    position: relative;
    flex-wrap: wrap;
}
.store-hero-logo {
    width: 104px; height: 104px; flex-shrink: 0;
    border-radius: 50%; border: 4px solid #fff;
    background: var(--accent-light);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.store-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-hero-logo span { font-size: 2.4rem; font-weight: 700; color: var(--accent-dark); }
.store-hero-info { flex: 1; min-width: 200px; padding-bottom: 0.4rem; }
.store-hero-info h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.2rem; color: var(--ink); }
.store-hero-bio { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 0.3rem; max-width: 560px; }
.store-hero-meta { font-size: 0.82rem; color: var(--muted); }
.btn-bulk-enquiry {
    background: var(--ink); color: #fff; border: none;
    padding: 0.65rem 1.4rem; border-radius: 999px;
    font-size: 0.88rem; font-weight: 600;
    margin-bottom: 0.4rem;
    transition: background 0.15s ease;
}
.btn-bulk-enquiry:hover { background: var(--accent-dark); }
@media (max-width: 576px) {
    .store-hero-content { margin-top: -44px; padding: 0 1rem; }
    .store-hero-logo { width: 80px; height: 80px; }
    .btn-bulk-enquiry { width: 100%; }
}
