/* Femi By Jojo - Main Stylesheet - Matching Live Site Design */

/* ===== CSS Variables ===== */
:root {
    /* Colors - Live site palette */
    --color-green: #1b5e20;
    --color-green-light: #2e7d32;
    --color-green-dark: #1a4a1a;
    --color-purple: #3d1a5e;
    --color-purple-light: #7b1fa2;
    --color-purple-accent: #5e35b1;

    --color-text: #222222;
    --color-text-light: #555555;
    --color-text-muted: #999999;

    --color-bg: #faf8f6;
    --color-bg-white: #ffffff;
    --color-bg-lavender: #f3eef8;

    --color-border: #e8e4e0;
    --color-border-light: #f0ece8;

    --color-red: #e53935;
    --color-badge-green: #1b5e20;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 5rem;

    /* Layout */
    --container-max: 1200px;
    --header-height: 70px;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 50px;
    --transition: 0.3s ease;
}

/* ===== Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

ul, ol {
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===== Utilities ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-sm);
    color: var(--color-purple);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1rem;
    margin-bottom: var(--space-2xl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.loading {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-text-muted);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    transition: all var(--transition);
    cursor: pointer;
    text-align: center;
    border: none;
    letter-spacing: 0.02em;
}

.btn-primary {
    background-color: var(--color-green);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-green-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-purple);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--color-purple-light);
    transform: translateY(-1px);
}

.btn-outline {
    border: 2px solid var(--color-text);
    color: var(--color-text);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--color-text);
    color: white;
}

.btn-outline-green {
    border: 2px solid var(--color-green);
    color: var(--color-green);
    background: transparent;
}

.btn-outline-green:hover {
    background-color: var(--color-green);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===== Promo Banner ===== */
.promo-banner {
    background-color: var(--color-green);
    color: white;
    text-align: center;
    padding: 10px var(--space-lg);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.promo-banner span {
    margin-right: 6px;
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border-light);
    height: var(--header-height);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    text-transform: lowercase;
}

/* Branded logo image (swaps in when branding.logo_url is set) */
.logo-img {
    max-height: 44px;
    width: auto;
    display: block;
}
/* When the logo image is active, hide the text fallback */
.logo:has(.logo-img:not([hidden])) .logo-text { display: none; }

.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: var(--space-2xl);
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-green);
    transition: width var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Nav submenus
   --------------------------------------------------------------------------
   The parent stays a link -- "Accessories" still goes to the Accessories
   collection -- and the caret is a separate button. On a desktop the submenu
   opens on hover AND on keyboard focus, so it is reachable by tabbing; the
   caret is then just a signal that there is more underneath. On a phone
   there is no hover, so the caret is the way in and the submenu expands in
   place rather than floating.

   The dropdown sits flush against the parent (top: 100%, no margin) on
   purpose: a gap between them is a strip where the pointer leaves both and
   the menu closes on its way down. */
.nav-menu .has-submenu {
    position: relative;
}

.nav-menu .submenu-toggle {
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0 0 0 4px;
    font-size: 0.85rem;
    line-height: 1;
    color: var(--color-text);
    opacity: 0.55;
    transform: rotate(90deg);
    transform-origin: center;
    transition: opacity var(--transition);
}

.nav-menu .submenu-toggle:hover {
    opacity: 1;
}

.nav-menu .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm, 4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    padding: var(--space-sm) 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity var(--transition), transform var(--transition),
                visibility var(--transition);
    z-index: 200;
}

.nav-menu .has-submenu:hover > .submenu,
.nav-menu .has-submenu:focus-within > .submenu,
.nav-menu .has-submenu.open > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .submenu a {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    white-space: nowrap;
    font-weight: 400;
}

/* The sliding underline belongs to the top row; inside a dropdown it reads
   as a stray line, so rows highlight with a background instead. */
.nav-menu .submenu a::after {
    display: none;
}

.nav-menu .submenu a:hover {
    background-color: var(--color-bg-alt, rgba(0, 0, 0, 0.04));
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: var(--transition);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* While the page's words are swapped into the visitor's language
   (js/i18n.js); never more than two seconds. */
html.i18n-pending body { visibility: hidden; }

/* Show prices in: the visitor's currency (js/locale.js); and the
   language (js/i18n.js), styled the same. */
.currency-select,
.lang-select {
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-purple);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 4px 6px;
    cursor: pointer;
}
.currency-select:hover,
.currency-select:focus-visible,
.lang-select:hover,
.lang-select:focus-visible {
    border-color: var(--color-purple-light);
}

/* Checkout: the visitor's currency beside the CAD total. */
.total-approx {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--color-text-light);
    text-align: right;
}

.cart-btn {
    position: relative;
    padding: var(--space-sm);
    color: var(--color-purple);
}

.cart-btn:hover {
    color: var(--color-purple-light);
}

.cart-btn svg {
    stroke: var(--color-purple);
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -4px;
    background-color: var(--color-purple);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Hero ===== */
.hero {
    background-color: var(--color-bg);
    padding: var(--space-4xl) var(--space-lg);
    text-align: center;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 400;
    font-style: italic;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.hero-content .hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
    font-weight: 300;
    letter-spacing: 0.02em;
}

.hero-content .btn {
    padding: 14px 40px;
    font-size: 1rem;
}

/* ===== Image Carousel =====
   Continuous GPU-accelerated marquee. The track holds TWO copies of
   every image; we animate transform: translateX from 0 → -50% so the
   second copy lands exactly where the first started — a seamless loop.
   Pure CSS keeps it buttery on the compositor thread (no JS timer
   jitter, no layout thrash). Pauses on hover. Honors reduced-motion. */
.image-carousel {
    padding: var(--space-xl) 0;
    overflow: hidden;
    background-color: var(--color-bg);
    position: relative;
}

.carousel-track {
    display: flex;
    gap: var(--space-md);
    width: max-content;                 /* total width = sum of duplicated images */
    animation: carouselScroll 60s linear infinite;
    will-change: transform;
    /* Tiny GPU layer hint — avoids repaint churn on some older Chromiums. */
    transform: translate3d(0, 0, 0);
    padding-left: var(--space-md);      /* first image not flush against edge */
}

.image-carousel:hover .carousel-track {
    animation-play-state: paused;
}

.carousel-track a {
    display: block;
    flex-shrink: 0;
    border-radius: var(--radius-md);
}

.carousel-track a:focus-visible {
    outline: 2px solid var(--color-primary, currentColor);
    outline-offset: 3px;
}

.carousel-track img {
    display: block;
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
}

@keyframes carouselScroll {
    from { transform: translate3d(0, 0, 0); }
    /* -50% walks exactly one copy of the image set, so the second set
       is now where the first set was — no visible seam. */
    to   { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .carousel-track { animation: none; }
}

/* ===== Checkmarks Row ===== */
.trust-bar {
    text-align: center;
    padding: var(--space-lg) 0;
    background-color: var(--color-bg);
    font-size: 0.95rem;
    color: var(--color-text-light);
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}

.trust-bar .trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.trust-bar .checkmark {
    color: var(--color-green);
    font-weight: 700;
}

/* ===== Value Props ===== */
.value-props {
    padding: var(--space-2xl) 0;
    background-color: var(--color-bg);
}

.value-props-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

.value-prop-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.value-prop-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.value-prop-icon {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.value-prop-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.value-prop-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ===== Collections Grid ===== */
.collections-section {
    background-color: var(--color-bg);
    padding: var(--space-3xl) 0;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-lg);
}

.collection-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.collection-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.collection-image {
    aspect-ratio: 1;
    overflow: hidden;
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.collection-card:hover .collection-image img {
    transform: scale(1.05);
}

.collection-card h3 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: var(--space-md) var(--space-sm) var(--space-sm);
    color: var(--color-text);
}

.collection-card .product-count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding-bottom: var(--space-md);
    display: block;
}

/* ===== Products Grid ===== */
.products-section {
    background-color: var(--color-bg);
    padding: var(--space-3xl) 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-xl);
}

.product-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background-color: var(--color-bg);
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--color-badge-green);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    z-index: 2;
    letter-spacing: 0.02em;
    /* A ribbon is her own text; a long one stays on the picture. */
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info {
    padding: var(--space-md) var(--space-lg);
}

.product-info h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
    line-height: 1.4;
}

.product-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

/* The deal a product is in, under its price ("Buy 3 for $10"), the way Wix
   showed it. Added by js/deals.js to cards and to the product page. */
.product-deal {
    margin-top: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-purple-light);
    letter-spacing: 0.01em;
}

.product-deal-note {
    margin: var(--space-sm) 0 var(--space-md);
    padding: 10px 14px;
    background-color: var(--color-bg-lavender);
    border-radius: var(--radius-sm);
}

.product-deal-note .product-deal {
    display: block;
    margin: 0;
    font-size: 0.95rem;
}

.product-deal-line {
    display: block;
    margin-top: 2px;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.section-cta {
    text-align: center;
    margin-top: var(--space-2xl);
}

/* ===== A row of products that scrolls sideways (homepage New Arrivals) =====
   Every product in New Arrival is in it (about 67), so it is one row rather
   than a grid that would make the homepage 67 cards long. Cards snap into
   place; phones swipe it, computers get the arrow buttons. */
.product-row {
    position: relative;
}

.product-row-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 260px;
    gap: var(--space-xl);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    /* Room above for the hover lift and below for the card shadow, which
       a scrolling box would otherwise cut off. The snap allows for the 2px
       at the sides, so the row's start is scroll position 0. */
    padding: var(--space-sm) 2px var(--space-lg);
    scroll-padding-inline: 2px;
}

.product-row-track > * {
    scroll-snap-align: start;
}

.product-row-track:focus-visible {
    outline: 2px solid var(--color-purple);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.product-row-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-bg-white);
    color: var(--color-text);
    box-shadow: var(--shadow-md);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: opacity var(--transition);
}

.product-row-arrow.prev { left: -22px; }
.product-row-arrow.next { right: -22px; }

.product-row-arrow:hover {
    border-color: var(--color-text);
}

.product-row-arrow:focus-visible {
    outline: 2px solid var(--color-purple);
    outline-offset: 2px;
}

/* At its end of the row an arrow has nothing to do. Disabled buttons also
   drop out of the keyboard's Tab order. */
.product-row-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

/* Touch screens and narrow windows swipe; the arrows would only cover
   the cards. */
@media (hover: none), (max-width: 768px) {
    .product-row-arrow {
        display: none;
    }
}

/* ===== Contact Section ===== */
.contact-section {
    background-color: var(--color-bg-lavender);
    padding: var(--space-3xl) 0;
}

.contact-section .section-title {
    color: var(--color-purple);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.contact-form .form-group {
    margin-bottom: var(--space-md);
}

.contact-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--color-bg-white);
    transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-purple-light);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== Placeholder Images ===== */
.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg);
    color: var(--color-text-muted);
}

.placeholder-image span {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* ===== Footer ===== */
.site-footer {
    background-color: var(--color-purple);
    color: white;
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand .footer-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    text-transform: lowercase;
}

.footer-brand p {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-contact p,
.footer-contact a {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-contact a:hover {
    color: white;
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
}

/* ===== Cart Sidebar ===== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    background-color: var(--color-bg-white);
    z-index: 200;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
}

.cart-sidebar.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.cart-header h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.close-cart {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    padding: 4px;
}

.close-cart:hover {
    color: var(--color-text);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
}

.empty-cart {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--space-2xl);
}

.cart-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--color-bg);
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.cart-item-info .price {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition);
}

.cart-item-qty button:hover {
    background-color: var(--color-bg);
}

.cart-item-qty span {
    min-width: 24px;
    text-align: center;
    font-size: 0.9rem;
}

.cart-item-qty .remove-item {
    margin-left: auto;
    color: var(--color-red);
    border-color: transparent;
}

.cart-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--color-border);
    background-color: var(--color-bg);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

/* Subtotal, one line per deal, and tax above the total, from the server's
   quote (js/cart.js). Dimmed for the moment a new answer is on its way. */
.cart-summary {
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 3px 0;
    color: var(--color-text-light);
}

.cart-summary-row.is-deal {
    color: var(--color-green);
    font-weight: 600;
}

.cart-summary.is-updating,
#cartTotal.is-updating {
    opacity: 0.55;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .value-props-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .trust-bar {
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--color-bg);
        flex-direction: column;
        gap: 0;
        padding: var(--space-lg);
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
        z-index: 99;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--color-border-light);
    }

    .nav-menu a {
        display: block;
        padding: var(--space-md) 0;
    }

    /* No hover on a phone, so the caret is the only way in. It sits on the
       right of the row, clear of the label, so tapping the name still goes
       to the category. */
    .nav-menu .submenu-toggle {
        position: absolute;
        right: 0;
        top: var(--space-md);
        padding: 4px 8px;
        font-size: 1rem;
        opacity: 0.7;
    }

    .nav-menu .has-submenu.open > .submenu-toggle {
        transform: rotate(270deg);
    }

    /* In the flow, not floating: a dropdown pinned over a full-screen menu
       would cover the items below it. */
    .nav-menu .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        border: 0;
        box-shadow: none;
        padding: 0 0 var(--space-sm) var(--space-lg);
        min-width: 0;
        background: none;
    }

    .nav-menu .has-submenu.open > .submenu {
        display: block;
    }

    .nav-menu .submenu li {
        border-bottom: 0;
    }

    .nav-menu .submenu a {
        padding: var(--space-sm) 0;
        white-space: normal;
    }

    .hero {
        min-height: 40vh;
        padding: var(--space-2xl) var(--space-lg);
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        grid-column: 1;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .promo-banner {
        font-size: 0.8rem;
        padding: 8px var(--space-md);
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
    }

    .carousel-track img {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    /* About two cards across, with the edge of the next one showing so it
       is plain the row goes on. */
    .product-row-track {
        grid-auto-columns: 44%;
        gap: var(--space-md);
    }

    .product-info {
        padding: var(--space-sm) var(--space-md);
    }

    .product-info h3 {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 0.9rem;
    }

    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .trust-bar {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
    }
}
