/**
 * Default Theme Stylesheet
 * Store Theme: default
 *
 * Note: CSS custom properties for colors (--color-primary, --color-primary-dark)
 * are defined inline in the template to allow tenant customization.
 */

/* ==========================================================================
   CSS Variables (static defaults)
   ========================================================================== */

:root {
    /* Secondary colors */
    --color-secondary: #64748b;
    --color-accent: #f59e0b;
    --color-success: #10b981;
    --color-error: #ef4444;

    /* Text colors */
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-text-muted: #94a3b8;

    /* Background colors */
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-card: #ffffff;

    /* Border colors */
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    background: var(--color-bg-alt);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    gap: 2rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: var(--color-primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.logo-image {
    height: 2rem;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.logo-name {
    font-weight: 700;
}

.header .logo-name {
    color: var(--color-primary);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    padding: 0.4rem;
    cursor: pointer;
    color: var(--color-text);
}

.nav > a,
.nav > .nav-item > a {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-light);
    border-radius: var(--radius);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.nav > a:hover,
.nav > .nav-item > a:hover {
    color: var(--color-text);
    background: var(--color-bg-alt);
}

/* Dropdown navigation */
.nav-item,
.nav-dropdown-item.has-submenu {
    position: relative;
}

.nav-dropdown-arrow {
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.nav-item:hover > a > .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown,
.nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 0.375rem;
    list-style: none;
    margin: 0;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
}

/* Invisible bridge so the mouse can travel from trigger to dropdown */
.nav-dropdown::before {
    content: "";
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
}

.nav-submenu {
    top: -0.375rem;
    left: calc(100% + 0.25rem);
    transform: translateX(4px);
}

/* Invisible bridge for submenus (covers the gap to the left) */
.nav-submenu::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(-0.25rem - 0.5rem);
    bottom: 0;
    width: calc(0.25rem + 0.5rem);
}

.nav-item:hover > .nav-dropdown,
.nav-dropdown-item.has-submenu:hover > .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown-item.has-submenu:hover > .nav-submenu {
    transform: translateX(0);
}

.nav-dropdown-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
    border-radius: calc(var(--radius) - 2px);
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.nav-dropdown-item > a:hover {
    color: var(--color-text);
    background: var(--color-bg-alt);
}

.nav-submenu-arrow {
    opacity: 0.4;
    margin-left: 0.5rem;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.nav-dropdown-item.has-submenu:hover > a > .nav-submenu-arrow {
    transform: translateX(2px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ==========================================================================
   Header Search
   ========================================================================== */

.header-search {
    position: relative;
    flex: 1;
    max-width: 28rem;
    min-width: 0;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 0 0.75rem;
    gap: 0.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.header-search-form:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.header-search-icon {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.header-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--color-text);
    outline: none;
    min-width: 0;
    font-family: var(--font-sans);
}

.header-search-input::placeholder {
    color: var(--color-text-muted);
}

.header-search-open,
.header-search-close {
    display: none;
}

/* Phones: the field would otherwise squeeze the logo and nav toggle (flex:1,
   max-width 28rem on .header-search above). Collapse to the icon; tapping it
   expands the field over the header's full width instead of sharing the row. */
@media (max-width: 640px) {
    .header-search {
        flex: 0 0 auto;
        max-width: none;
    }

    .header-search-open {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: none;
        background: transparent;
        border-radius: var(--radius);
        color: var(--color-text-light);
        cursor: pointer;
    }

    .header-search-open:hover {
        background: var(--color-bg-alt);
        color: var(--color-text);
    }

    .header-search-form {
        display: none;
    }

    .header-search.is-active {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 150;
        display: flex;
        align-items: center;
        max-width: none;
        padding: 0 1.5rem;
        background: var(--color-bg);
    }

    .header-search.is-active .header-search-open {
        display: none;
    }

    .header-search.is-active .header-search-form {
        display: flex;
        flex: 1;
        min-width: 0;
    }

    .header-search-close {
        display: none;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        border: none;
        background: transparent;
        border-radius: var(--radius);
        color: var(--color-text-light);
        cursor: pointer;
    }

    .header-search-close:hover {
        background: var(--color-border);
        color: var(--color-text);
    }

    .header-search.is-active .header-search-close {
        display: flex;
    }
}

/* Search overlay */
.search-overlay {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}

.search-overlay.open {
    display: block;
}

.search-results {
    max-height: 28rem;
    overflow-y: auto;
    padding: 0.5rem;
}

.search-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem 0.25rem;
}

.search-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.1s ease;
}

.search-item:hover {
    background: var(--color-bg-alt);
}

.search-item-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.search-item-img {
    width: 2rem;
    height: 2rem;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    border: 1px solid var(--color-border-light);
}

.search-item-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
}

.search-item-name {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-no-results {
    padding: 1.25rem 0.75rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.search-view-all {
    display: block;
    padding: 0.625rem 0.75rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--color-border-light);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary);
    text-align: center;
    text-decoration: none;
    transition: background 0.1s ease;
}

.search-view-all:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary-dark);
}

/* ==========================================================================
   Header User Link
   ========================================================================== */

.header-user-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    border-radius: var(--radius);
    transition: all 0.15s ease;
    text-decoration: none;
}

.header-user-link:hover {
    background: var(--color-bg-alt);
}

.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.header-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-user-email {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .header-user-info {
        display: none;
    }

    .header-user-link {
        padding: 0.25rem;
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-light);
}

.btn-ghost:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

main {
    min-height: calc(100vh - 12rem);
    padding: 2rem 0;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all 0.2s ease;
}

.card:hover {
    border-color: var(--color-text-muted);
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 1.25rem;
}

/* ==========================================================================
   Product Card
   ========================================================================== */

.product-card {
    display: flex;
    flex-direction: column;
}

.product-card .product-image {
    aspect-ratio: 1;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border-light);
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .product-info {
    padding: 1rem 1.25rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .product-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.375rem;
    color: var(--color-text);
    line-height: 1.4;
}

.product-card .product-desc {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0 0 0.75rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
}

.product-card .product-price-old {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

/* ==========================================================================
   Category Card
   ========================================================================== */

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
}

.category-card .category-icon {
    width: 4rem;
    height: 4rem;
    background: var(--color-bg-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.category-card .category-photo {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg-alt);
}

.category-card .category-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-card .category-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.category-card .category-desc {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin: 0;
}

/* ==========================================================================
   Grid
   ========================================================================== */

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

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

    /* The inline nav folds into a hamburger panel under the header. */
    .nav { display: none; }
    .nav-toggle { display: inline-flex; }
    .header { position: relative; }
    .header.nav-open .nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg, 0 12px 24px rgba(0, 0, 0, 0.12));
        padding: 0.5rem 1rem 1rem;
        z-index: 60;
    }
    .header.nav-open .nav > a,
    .header.nav-open .nav .nav-item > a {
        display: block;
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid var(--color-border);
    }
    .header.nav-open .nav .nav-dropdown {
        position: static;
        display: block;
        box-shadow: none;
        border: 0;
        padding-left: 1rem;
    }
}

@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text);
}

.section-link {
    font-size: 0.9375rem;
    color: var(--color-primary);
    font-weight: 500;
}

.section-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    border-radius: var(--radius-xl);
    padding: 4rem 3rem;
    margin-bottom: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.hero-shop-name {
    background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.75) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.01em;
    position: relative;
    display: inline-block;
    padding-bottom: 0.15em;
}

.hero-shop-name::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
}

.hero-desc {
    font-size: 1.125rem;
    opacity: 0.9;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: white;
    color: var(--color-primary);
}

.hero .btn-primary:hover {
    background: rgba(255,255,255,0.9);
}

.hero .btn-secondary {
    background: transparent;
    border-color: rgba(255,255,255,0.4);
    color: white;
}

.hero .btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.page-header {
    margin-bottom: 2rem;
}

.page-header-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    color: #fff;
    overflow: hidden;
    aspect-ratio: 1920 / 300;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* The fixed aspect-ratio leaves zero content height once the box's computed
   height (from that ratio) drops below its own vertical padding -- on a
   phone, breadcrumb/title/desc all get clipped by the overflow:hidden
   above. Height grows with content instead of forcing the wide-screen ratio. */
@media (max-width: 640px) {
    .page-header-banner {
        aspect-ratio: unset;
    }
}

.page-header-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.75));
    z-index: 0;
}

.page-header-banner > * {
    position: relative;
    z-index: 1;
}

.page-header-banner .breadcrumb,
.page-header-banner .breadcrumb a,
.page-header-banner .breadcrumb-sep,
.page-header-banner .page-title,
.page-header-banner .page-desc {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.page-header-banner .breadcrumb a,
.page-header-banner .breadcrumb-sep {
    color: rgba(255, 255, 255, 0.75);
}

.page-header-banner .page-title {
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.page-header-banner .breadcrumb a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.page-header .breadcrumb-current {
    color: var(--color-primary);
    font-weight: 500;
}

.page-header-banner .breadcrumb-current {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.page-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.page-header .breadcrumb a:hover {
    color: var(--color-primary);
}

.page-header .breadcrumb-sep {
    color: var(--color-text-muted);
}

/* A five-level Erkado product breadcrumb wraps into a multi-line block on a
   phone. header-breadcrumb.js marks the middle crumbs and inserts the
   ellipsis toggle; these rules only decide how those hooks render. Desktop
   keeps the full path, so the ellipsis defaults to hidden outside the phone
   query -- a <button> is display:inline-block by default, so this base rule
   has to exist unscoped or desktop would show it too. */
.breadcrumb-ellipsis {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0 0.25rem;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 700;
    color: inherit;
    cursor: pointer;
    flex: none;
}

@media (max-width: 640px) {
    /* A breadcrumb must never wrap to a second line on a phone -- unscoped
       here (not just .is-collapsed) because even a trail short enough that
       header-breadcrumb.js leaves it uncollapsed still must not wrap once
       its current crumb happens to be long (a bare category/product name,
       no ellipsis-worthy ancestors to hide). */
    .breadcrumb {
        flex-wrap: nowrap;
        overflow: hidden;
    }

    /* Structural crumbs (Home, ancestor links, separators) keep their
       natural width -- only the current crumb gives up space. */
    .breadcrumb > a,
    .breadcrumb-sep {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* The current crumb is always the last child, whether it carries
       .breadcrumb-current (category.html) or is a bare <span>
       (product/contact/blog) -- it is the one allowed to shrink, and it
       truncates with an ellipsis instead of wrapping or getting clipped
       mid-character by the container's overflow:hidden above. */
    .breadcrumb > span:last-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 2.5rem;
        flex-shrink: 1;
    }

    .breadcrumb.is-collapsed .breadcrumb-ellipsis {
        display: inline-flex;
    }

    .breadcrumb.is-collapsed .breadcrumb-collapse-hidden {
        display: none;
    }

    .breadcrumb.is-collapsed.is-expanded {
        flex-wrap: wrap;
        overflow: visible;
    }

    .breadcrumb.is-collapsed.is-expanded .breadcrumb-collapse-hidden {
        display: inline;
    }

    .breadcrumb.is-collapsed.is-expanded .breadcrumb-ellipsis {
        display: none;
    }

    /* header-breadcrumb.js measures fit by forcing every child to its
       natural, non-wrapping, non-shrinking width for one layout pass and
       comparing scrollWidth to clientWidth -- normal flex-shrink lets a
       child's text wrap internally instead of overflowing, which would
       make that comparison always read "fits". Equal selector specificity
       to the span:last-child rule above, so this wins on source order and
       overrides its shrink/ellipsis for the duration of the measurement. */
    .breadcrumb.is-measuring > a,
    .breadcrumb.is-measuring > span,
    .breadcrumb.is-measuring > button {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.page-desc {
    font-size: 1rem;
    color: var(--color-text-light);
    margin: 0;
}

/* ==========================================================================
   Badge
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
    background: var(--color-bg-alt);
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
}

.badge-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.badge-success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--color-text);
    color: white;
    margin-top: 4rem;
}

/* Newsletter Banner - Top of footer */
.footer-newsletter-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    padding: 3rem 0;
}

.footer-newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-newsletter-content {
    flex: 1;
    min-width: 280px;
}

.footer-newsletter-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: white;
}

.footer-newsletter-content p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
    color: white;
}

.footer-newsletter-form {
    flex: 1;
    min-width: 320px;
    max-width: 480px;
}

.footer-newsletter-form form {
    display: flex;
    gap: 0.75rem;
}

.footer-newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.1);
    color: white;
    outline: none;
    transition: all 0.15s ease;
}

.footer-newsletter-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.6);
}

.footer-newsletter-form input[type="email"]:focus {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.15);
}

.footer-newsletter-form button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    color: var(--color-primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.footer-newsletter-form button:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-1px);
}

.footer-newsletter-message {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

.footer-newsletter-message.success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.footer-newsletter-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.footer-newsletter-gdpr {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    opacity: 0.7;
}

.footer-newsletter-gdpr a {
    color: white;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-newsletter-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-newsletter-form {
        width: 100%;
        max-width: 100%;
    }

    .footer-newsletter-form form {
        flex-direction: column;
    }

    .footer-newsletter-form button {
        width: 100%;
    }
}

/* Footer Main Content */
.footer-main {
    padding: 3rem 0 2rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

.footer-brand {
    font-size: 0.9375rem;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 1rem;
}

.footer-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.625rem;
}

.footer-links a {
    font-size: 0.9375rem;
    opacity: 0.75;
    transition: opacity 0.15s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    opacity: 0.5;
}

@media (max-width: 480px) {
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    color: var(--color-text);
    transition: all 0.15s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 0.375rem;
}

/* ==========================================================================
   Alert
   ========================================================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.empty-state-desc {
    margin: 0 0 1.5rem;
}

/* ==========================================================================
   Product Detail
   ========================================================================== */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* Grid children default to min-width:auto; a long thumbnail strip would
       otherwise blow the 1fr/1fr split and squeeze the info column. */
    min-width: 0;
}

.gallery-main {
    aspect-ratio: 1;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    cursor: zoom-in;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Thumbnail carousel (horizontal, inside product-info-detail) --- */

.product-info-detail {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gallery-thumbs-wrap {
    margin-top: auto;
    padding-top: 1.5rem;
    position: relative;
    overflow: visible;
}

.gallery-thumbs-swiper {
    width: 100%;
    overflow: hidden;
}

.gallery-thumbs-swiper .swiper-slide {
    width: auto !important;
}

.gallery-thumbs-prev,
.gallery-thumbs-next {
    position: absolute;
    top: calc(50% + 0.75rem);
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.gallery-thumbs-prev {
    left: -14px;
}

.gallery-thumbs-next {
    right: -14px;
}

.gallery-thumbs-prev:hover,
.gallery-thumbs-next:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.gallery-thumbs-prev.swiper-button-disabled,
.gallery-thumbs-next.swiper-button-disabled {
    opacity: 0.3;
    pointer-events: none;
}

.gallery-thumb {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: var(--radius);
    border: 2px solid var(--color-border);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: var(--color-bg);
    transition: border-color 0.15s ease;
}

.gallery-thumb:hover {
    border-color: var(--color-text-muted);
}

.gallery-thumb.active {
    border-color: var(--color-primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Product carousels (related / similar) --- */
.products-carousel-wrap {
    position: relative;
    overflow: visible;
}

.products-carousel-swiper {
    width: 100%;
    overflow: hidden;
}

.products-carousel-swiper .swiper-slide {
    height: auto;
}

.products-carousel-swiper .product-card {
    height: 100%;
}

.products-carousel-swiper .product-card .product-image {
    aspect-ratio: 4 / 3;
}

.products-carousel-swiper .product-card .product-info {
    padding: 0.625rem 0.75rem 0.75rem;
}

.products-carousel-swiper .product-card .product-name {
    font-size: 0.8125rem;
    margin: 0 0 0.25rem;
}

.products-carousel-swiper .product-card .product-desc {
    font-size: 0.75rem;
    margin: 0 0 0.375rem;
}

.products-carousel-swiper .product-card .product-price {
    font-size: 0.875rem;
}

.products-carousel-prev,
.products-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.products-carousel-prev {
    left: -14px;
}

.products-carousel-next {
    right: -14px;
}

.products-carousel-prev:hover,
.products-carousel-next:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.products-carousel-prev.swiper-button-disabled,
.products-carousel-next.swiper-button-disabled {
    opacity: 0.3;
    pointer-events: none;
}

.product-info-detail .product-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.product-info-detail .product-sku {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin: 0 0 0.75rem;
    font-family: monospace;
}

.product-info-detail .product-desc {
    color: var(--color-text-light);
    margin: 0 0 1.5rem;
    line-height: 1.7;
}

.product-info-detail .product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.product-info-detail .product-stock {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.product-info-detail .product-stock.in-stock {
    color: var(--color-success);
}

.product-info-detail .product-stock.out-of-stock {
    color: var(--color-error);
}

.product-info-detail .product-stock.made-to-order {
    color: var(--color-primary);
}

.product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
}

/* ==========================================================================
   Attributes
   ========================================================================== */

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.attribute-item {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
}

.attribute-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.attribute-value {
    font-weight: 600;
    color: var(--color-text);
}

/* ==========================================================================
   Product Sections (tabs)
   ========================================================================== */

.section-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.section-tab {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    font: inherit;
    font-weight: 500;
    color: var(--color-text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s ease;
}

.section-tab:hover {
    color: var(--color-text);
}

.section-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.section-panel {
    display: none;
}

.section-panel.active {
    display: block;
}

/* --- Spec Accordion --- */

.spec-accordion {
    border-bottom: 1px solid var(--color-border);
}

.spec-accordion:first-child {
    border-top: 1px solid var(--color-border);
}

.spec-accordion-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    background: var(--color-bg-alt);
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: background 0.15s ease;
}

.spec-accordion-header:hover {
    background: var(--color-border-light);
}

.spec-accordion-icon::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1;
}

.spec-accordion.open .spec-accordion-icon::before {
    content: '\2212';
}

.spec-accordion-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-primary);
}

.spec-accordion-body {
    display: none;
}

.spec-accordion.open .spec-accordion-body {
    display: block;
}

/* --- Spec Table --- */

.spec-table {
    width: 100%;
}

.spec-row {
    display: flex;
}

.spec-row:nth-child(odd) {
    background: var(--color-bg);
}

.spec-row:nth-child(even) {
    background: var(--color-bg-alt);
}

.spec-label {
    flex: 0 0 40%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.spec-value {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

@media (max-width: 768px) {
    .spec-label {
        flex: 0 0 50%;
    }
}

/* --- Spec Files & HTML --- */

.spec-files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.spec-file {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-primary);
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.spec-file:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-primary);
}

.spec-html {
    margin-top: 1.25rem;
    line-height: 1.7;
}

/* ==========================================================================
   Cart - Header Icon
   ========================================================================== */

.header-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    color: var(--color-text-light);
    transition: all 0.15s ease;
}

.header-cart:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.header-cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--color-primary);
    color: white;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-cart-count:empty,
.header-cart-count[data-cart-count="0"] {
    display: none;
}

/* ==========================================================================
   Cart - Sidebar
   ========================================================================== */

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    visibility: hidden;
    pointer-events: none;
}

.cart-sidebar.open {
    visibility: visible;
    pointer-events: auto;
}

.cart-sidebar-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.cart-sidebar.open .cart-sidebar-overlay {
    opacity: 1;
}

.cart-sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.cart-sidebar.open .cart-sidebar-content {
    transform: translateX(0);
}

.cart-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.cart-sidebar-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.cart-sidebar-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-text-light);
    background: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cart-sidebar-close:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-alt);
    flex-shrink: 0;
}

/* Cart Empty State */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-light);
}

.cart-empty-icon {
    margin-bottom: 1rem;
    opacity: 0.3;
}

.cart-empty p {
    margin: 0 0 1.5rem;
    font-size: 1rem;
}

/* Cart Items */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
}

a.cart-item-name {
    color: inherit;
    text-decoration: none;
}

a.cart-item-name:hover {
    text-decoration: underline;
}

.cart-item-option {
    font-size: 0.75rem;
    color: var(--color-text-light, #6b7280);
    line-height: 1.35;
}

.cart-item-price {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.cart-item-qty .qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    transition: all 0.15s ease;
}

.cart-item-qty .qty-btn:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.cart-item-qty .qty-value {
    min-width: 24px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.cart-item-remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cart-item-remove:hover {
    background: #fef2f2;
    color: var(--color-error);
}

/* Cart Summary */
.cart-summary {
    margin-bottom: 1rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.cart-summary-row.cart-discount {
    color: var(--color-success);
}

.cart-summary-row.cart-total {
    font-weight: 600;
    font-size: 1.125rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
    margin-top: 0.5rem;
}

/* Cart Voucher */
.cart-voucher {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cart-voucher input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
}

.cart-voucher input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.cart-voucher-applied {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cart-voucher-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    background: #dcfce7;
    color: #166534;
    border-radius: var(--radius);
}

.cart-voucher-tag button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 1rem;
    line-height: 1;
    background: none;
    border: none;
    color: #166534;
    cursor: pointer;
    opacity: 0.7;
}

.cart-voucher-tag button:hover {
    opacity: 1;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   Cart - Product Card Actions
   ========================================================================== */

.product-card {
    position: relative;
}

.product-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.product-card-actions {
    padding: 0 1.25rem 1.25rem;
}

.btn-add-to-cart {
    width: 100%;
    gap: 0.375rem;
}

.btn-add-to-cart svg {
    flex-shrink: 0;
}

.btn-add-to-cart.loading .btn-text,
.btn-add-to-cart.loading span:not(.btn-loading) {
    display: none;
}

.btn-add-to-cart.loading .btn-loading {
    display: inline-flex !important;
}

.btn-add-to-cart.added {
    background: var(--color-success);
}

.product-out-of-stock,
.product-in-stock,
.product-made-to-order {
    display: block;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8125rem;
    border-radius: var(--radius);
}

.product-out-of-stock {
    color: var(--color-error);
    background: #fef2f2;
}

.product-in-stock {
    color: var(--color-success);
    background: #f0fdf4;
}

.product-made-to-order {
    color: var(--color-primary);
    background: #eff6ff;
}

/* ==========================================================================
   Cart - Product Page Quantity
   ========================================================================== */

.product-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-quantity label {
    font-weight: 500;
    color: var(--color-text);
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.quantity-input .qty-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 500;
    background: var(--color-bg-alt);
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    transition: all 0.15s ease;
}

.quantity-input .qty-btn:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.quantity-input input {
    width: 60px;
    height: 40px;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    background: var(--color-bg);
    -moz-appearance: textfield;
}

.quantity-input input::-webkit-outer-spin-button,
.quantity-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input input:focus {
    outline: none;
}

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

.add-to-cart-btn,
.product-sticky-bar-btn {
    position: relative;
}

.add-to-cart-btn .btn-loading,
.product-sticky-bar-btn .btn-loading {
    display: none;
}

.add-to-cart-btn .btn-added,
.product-sticky-bar-btn .btn-added {
    display: none;
}

.add-to-cart-btn.loading .btn-text,
.product-sticky-bar-btn.loading .btn-text {
    display: none;
}

.add-to-cart-btn.loading .btn-loading,
.product-sticky-bar-btn.loading .btn-loading {
    display: inline-flex !important;
}

.add-to-cart-btn.added .btn-text,
.product-sticky-bar-btn.added .btn-text {
    display: none;
}

.add-to-cart-btn.added .btn-added,
.product-sticky-bar-btn.added .btn-added {
    display: inline !important;
}

.add-to-cart-btn.added,
.product-sticky-bar-btn.added {
    background: var(--color-success);
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Blog
   ========================================================================== */

.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* Hero slider (homepage hero_type=slider) */
.hero-slider {
    position: relative;
}

.hero-slider .swiper-slide {
    height: clamp(280px, 45vw, 520px);
}

.hero-slide {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-slide-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3.5rem clamp(1.25rem, 6vw, 5rem) 2rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.65));
    color: #fff;
}

.hero-slide-title {
    font-size: clamp(1.4rem, 3.5vw, 2.4rem);
    margin: 0 0 0.5rem;
}

.hero-slide-cta {
    display: inline-block;
    font-weight: 600;
    border-bottom: 2px solid currentColor;
    padding-bottom: 2px;
}

.hero-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.6;
}

.hero-slider .swiper-pagination-bullet-active {
    opacity: 1;
}

.contact-directions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.contact-directions .btn {
    flex: 1 1 auto;
    justify-content: center;
    white-space: nowrap;
}

/* Static content pages: a reading column, not a product card. */
.page-prose {
    max-width: 70ch;
    margin: 0 auto 3rem;
    color: var(--color-text);
    line-height: 1.75;
    overflow-wrap: break-word;
}

.page-prose > :first-child {
    margin-top: 0;
}

.page-prose h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 2.5rem 0 0.75rem;
}

.page-prose h3 {
    font-size: 1.175rem;
    line-height: 1.4;
    margin: 2rem 0 0.5rem;
}

.page-prose p {
    margin: 0 0 1.1rem;
}

.page-prose ul,
.page-prose ol {
    margin: 0 0 1.1rem;
    padding-left: 1.4rem;
}

.page-prose li {
    margin-bottom: 0.4rem;
}

.page-prose a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

.page-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.5rem;
}

.page-prose th,
.page-prose td {
    border: 1px solid var(--color-border);
    padding: 0.6rem 0.75rem;
    text-align: left;
}

@media (max-width: 640px) {
    .page-prose h2 {
        font-size: 1.3rem;
        margin-top: 2rem;
    }
}
