/**
 * ==============================================
 * BASE THEME CSS TOKENS
 * Override-friendly: low specificity, CSS custom properties
 * Themes (classic/modern) can override these in their own styles
 * ==============================================
 */
:root {
    /* Colors - Primary */
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-primary-light: #eef2ff;
    
    /* Colors - Secondary */
    --color-secondary: #64748b;
    --color-secondary-hover: #475569;
    
    /* Colors - Status */
    --color-success: #16a34a;
    --color-success-light: #dcfce7;
    --color-danger: #dc2626;
    --color-danger-light: #fef2f2;
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    
    /* Colors - Neutral */
    --color-text: #111827;
    --color-text-muted: #6b7280;
    --color-text-light: #9ca3af;
    --color-bg: #f9fafb;
    --color-bg-white: #ffffff;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;

    /* Header Specifics */
    --color-header-promo-bg: #000080; /* Navy Blue - Theme variable */
    --color-header-promo-text: #ffffff;
    --color-header-bg: #ffffff;
    --color-header-search-bg: #f3f4f6;
    --color-header-nav-text: #374151; /* Gray 700 */
    --color-header-nav-hover: #4f46e5; /* Primary */
}

/**
 * ==============================================
 * UTILITY CLASSES (Low Specificity)
 * ==============================================
 */
.text-primary { color: var(--color-primary); }
.bg-primary { background-color: var(--color-primary); }
.border-primary { border-color: var(--color-primary); }

/**
 * ==============================================
 * CARD BASE
 * ==============================================
 */
.card-base {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
}
.card-base:hover {
    box-shadow: var(--shadow-md);
}

/**
 * ==============================================
 * BADGES
 * ==============================================
 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
}
.badge-sale {
    background: var(--color-danger);
    color: white;
}
.badge-new {
    background: var(--color-success);
    color: white;
}
/* category badge removed for scope */

/**
 * ==============================================
 * PRODUCT CARD
 * Entirely clickable card with image zoom on hover
 * ==============================================
 */
.product-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Image container */
.product-card__image-wrap {
    display: block;
    position: relative;
    aspect-ratio: var(--ratio-card-home, 4/3);
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-color: var(--placeholder-bg, #F5F5F5);
}

.product-card__image-wrap:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

/* Image with subtle hover zoom (1.02-1.03, 200-250ms) */
.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: var(--fit-card-home, cover);
    transition: transform 220ms ease-out;
}

.product-card:hover .product-card__image {
    transform: scale(1.02);
}

/* Badges */
.product-card__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.product-card__badge--sale {
    background: var(--color-danger);
    color: white;
}

.product-card__badge--new {
    background: var(--color-success);
    color: white;
}

/* Content Area */
.product-card__content {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Title */
.product-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
}

.product-card__title a {
    text-decoration: none;
    color: inherit;
}

/* Subtitle (microcopy secondaria) */
.product-card__subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.25;
}

/* Bottom Row: Price & Actions */
.product-card__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

/* Price */
.product-card__price-box {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.product-card__price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.product-card__price--old {
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-decoration: line-through;
}

/* Actions Right */
.product-card__actions {
    display: flex;
    gap: 0.5rem;
}

.product-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem; /* Slightly more rounded like generic iOS/Modern */
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}
.product-card__btn:active {
    transform: scale(0.95);
}

/* Cart: Solid Primary, White Icon */
.product-card__btn--cart {
    background-color: var(--color-primary);
    color: white;
}
.product-card__btn--cart:hover {
    background-color: var(--color-primary-hover);
}

/* Wishlist: Light Primary, Black/Dark Icon */
.product-card__btn--wishlist {
    background-color: var(--color-primary-light);
    color: var(--color-text);
}
.product-card__btn--wishlist:hover {
    background-color: #dbeafe; /* Manual tint or define a token later */
}

/**
 * ==============================================
 * SITE HEADER
 * ==============================================
 */

/* Top Promo Bar */
.header-promo {
    background-color: var(--color-header-promo-bg);
    color: var(--color-header-promo-text);
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

/* Main Header (Logo, Search, Icons) */
.header-main {
    background-color: var(--color-header-bg);
    padding: 1rem 0;
}

/* Search Bar */
.header-search {
    background-color: var(--color-header-search-bg);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: box-shadow 0.2s;
}
.header-search:focus-within {
    box-shadow: 0 0 0 2px var(--color-primary-light);
}
.header-search input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    color: var(--color-text);
}

/* Navigation */
.header-nav {
    background-color: var(--color-header-bg);
    border-bottom: 1px solid var(--color-border-light);
}

.nav-link {
    color: var(--color-header-nav-text);
    font-weight: 500;
    text-transform: uppercase;
    padding: 1rem 0;
    position: relative;
    cursor: pointer;
    transition: color 0.15s;
}
.nav-link:hover {
    color: var(--color-header-nav-hover);
}

/* Mega Menu / Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 200px;
    background: white;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-light);
    border-top: none;
    z-index: 50;
    padding: 1rem;
    display: none; /* Controlled by Alpine x-show */
}

/* Icons Button Reset */
.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-text);
    transition: color 0.2s;
}
.icon-btn:hover {
    color: var(--color-primary);
}


/* Category Card */
.category-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: var(--ratio-card-category, 1/1);
    background-color: var(--placeholder-bg, #F5F5F5);
}

.category-card__img {
    width: 100%;
    height: 100%;
    object-fit: var(--fit-card-category, cover);
    transition: transform 0.5s ease;
}

.category-card:hover .category-card__img {
    transform: scale(1.05);
}

.category-card__label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--color-primary);
    color: white;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    text-transform: capitalize;
    z-index: 10;
    font-size: 1.5rem; /* Larger font */
    min-width: 60%;
    text-align: center;
}


/* ============================================== */
/* SHOP LAYOUT (Added for Category Page Step)     */
/* ============================================== */

/* Main Grid Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 1024px) {
    .shop-layout {
        grid-template-columns: 260px 1fr;
        align-items: start;
    }
    
    /* Ensure Sidebar is left, Content is right on Desktop */
    .shop-sidebar {
        grid-column: 1;
        grid-row: 1;
    }
    
    .shop-main {
        grid-column: 2;
        grid-row: 1;
    }
}

/* Sidebar & Filters */
.shop-sidebar {
    /* Mobile: Sidebar below content by default if placed after/inside grid */
}

.filter-section {
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-lg);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    display: block;
}

/* Simple List */
.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-item {
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
}

.filter-link {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    display: block;
    width: 100%;
}

.filter-link:hover, .filter-link.active {
    color: var(--color-primary);
    font-weight: 500;
}

/* Checkbox Placeholder */
.filter-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-right: var(--space-sm);
    background: white;
    appearance: none;
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-label {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    cursor: not-allowed;
}

/* Color Swatches */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.color-swatch {
    width: 2rem;
    height: 2rem;
    border-radius: 50%; /* Circle */
    border: 1px solid var(--color-border);
    cursor: not-allowed;
    opacity: 0.8;
}

.color-swatch:hover {
    transform: scale(1.1);
}

/* Dynamic Attribute Filter: Color Swatches */
.attr-color-swatch {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    outline: none;
    padding: 0;
}

.attr-color-swatch:hover {
    transform: scale(1.15);
}

.attr-color-swatch--active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light), 0 0 0 3px var(--color-primary);
    transform: scale(1.1);
}

/* Dynamic Attribute Filter: Select Boxes */
.attr-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.attr-select-box {
    padding: 0.5rem 0.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-white);
    cursor: pointer;
    font-size: 0.875rem;
    text-align: center;
    color: var(--color-text);
    transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
    outline: none;
    line-height: 1.4;
}

.attr-select-box:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.attr-select-box--active {
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}

/* Range Slider Placeholder */
.range-slider-mock {
    width: 100%;
    height: 4px;
    background: var(--color-border-light);
    border-radius: var(--radius-full);
    position: relative;
    margin: 1.5rem 0 1rem 0;
}

.range-slider-mock::before {
    content: '';
    position: absolute;
    left: 0;
    width: 40%;
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

.range-handle {
    width: 1rem;
    height: 1rem;
    background: var(--color-primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    cursor: not-allowed;
    box-shadow: 0 0 0 2px white, 0 2px 4px rgba(0,0,0,0.1);
}

.range-inputs {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Header Areas */
.shop-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: var(--space-md);
}

/**
 * ==============================================
 * FORM ELEMENTS
 * Reusable inputs/selects sharing theme styles
 * ==============================================
 */
.select-minimal {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    background-color: var(--color-header-search-bg, #f3f4f6);
    border: none;
    border-radius: var(--radius-md, 0.5rem);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 0.75rem;
    
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23111827' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7' /%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem 1rem;
    
    font-size: 0.875rem;
    color: var(--color-text, #111827);
    font-weight: 500;
    cursor: pointer;
    min-width: 140px;
    transition: box-shadow var(--transition-fast);
}

.select-minimal:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-light, #eef2ff);
}

/* Pagination Minimal */
.pagination-minimal {
    display: flex;
    justify-content: flex-end; /* Ensures Bottom Right */
    align-items: center;
    gap: 1.5rem; /* Space between arrows and text */
    margin-top: 1rem;
    width: 100%;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--color-text);
    border-radius: 50%;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    background: transparent;
}

.pagination-btn:hover:not(.disabled) {
    background-color: var(--color-bg-white);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.pagination-btn.disabled {
    color: var(--color-text-light);
    cursor: default;
    opacity: 0.5;
}

.pagination-info {
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 500;
}

/* ==============================================
 * CART PAGE
 * ============================================== */

/* Layout: items left, summary right */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}
@media (min-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr 380px;
        align-items: start;
    }
}

/* ── Cart Item Card ── */
.cart-item {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    transition: opacity var(--transition-normal), max-height var(--transition-slow);
}
@media (max-width: 639px) {
    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: var(--space-md);
    }
    .cart-item__actions {
        grid-column: 1 / -1;
    }
}

.cart-item__image-wrap {
    display: block;
    aspect-ratio: 0.8; /* slightly portrait/taller than square */
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
}
.cart-item__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-border-light);
}

.cart-item__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.cart-item__category {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}
.cart-item__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}
.cart-item__name a {
    color: inherit;
    text-decoration: none;
}
.cart-item__name a:hover {
    color: var(--color-primary);
}
.cart-item__price {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}
.cart-item__price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}
.cart-item__price-old {
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-decoration: line-through;
}
.cart-item__meta {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 2px;
}

.cart-item__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-md);
}

/* ── Qty Controls ── */
.cart-qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 4px;
    width: 100px; /* fixed width for consistency */
    background: var(--color-bg-white);
}
.cart-qty__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}
/* Minus button - grey/neutral */
.cart-qty__btn[aria-label="−"] {
    background: var(--color-bg);
    color: var(--color-text-muted);
}
.cart-qty__btn[aria-label="−"]:hover {
    background: var(--color-border);
    color: var(--color-text);
}
/* Plus button - primary color */
.cart-qty__btn[aria-label="+"] {
    background: var(--color-primary);
    color: #fff;
}
.cart-qty__btn[aria-label="+"]:hover {
    background: var(--color-primary-hover);
}

.cart-qty__value {
    flex: 1;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1;
}

/* ── Icon Action Buttons ── */
.cart-item__icon-actions {
    display: flex;
    gap: var(--space-sm);
}
.cart-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg-white);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.cart-icon-btn:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}
.cart-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.cart-icon-btn--danger:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
    background: var(--color-danger-light);
}

/* ── Inline Spinner (override-friendly) ── */
@keyframes cart-spin {
    to { transform: rotate(360deg); }
}
.cart-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: cart-spin .5s linear infinite;
    vertical-align: middle;
}
/* Row-level pending state — applied via JS */
.cart-item--pending {
    pointer-events: none;
}
.cart-item--pending .cart-qty__btn,
.cart-item--pending .cart-icon-btn {
    opacity: 0.5;
    cursor: wait;
}

/* ── Badges ── */
.cart-badge {
    display: inline-flex; /* Better centering */
    align-items: center;
    width: fit-content; /* Prevent stretching in flex column */
    font-size: 0.75rem;
    font-weight: 600;
    /* text-transform: uppercase; Removed to match screen 2 (Title Case) */
    padding: 4px 10px;
    border-radius: 6px; /* Slightly more rounded than radius-sm */
    line-height: 1.2;
}
.cart-badge--success {
    background: var(--color-success);
    color: #ffffff;
}
.cart-badge--danger {
    background: var(--color-danger);
    color: #ffffff;
}
.cart-badge--warning {
    background: #f59e0b;
    color: #ffffff;
}

/* ── Issue highlight on cart line ── */
.cart-item--issue {
    border-left: 3px solid var(--color-danger);
    background: #fef2f216;
}

/* ── Summary Sidebar ── */
.cart-summary {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: sticky;
    top: var(--space-lg);
}
.cart-summary__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
}
.cart-summary__rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.cart-summary__row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-text);
}
.cart-summary__row dt {
    color: var(--color-text-muted);
}
.cart-summary__row dd {
    font-weight: 500;
}
.cart-summary__row--muted dd {
    color: var(--color-text-light);
}
.cart-summary__placeholder {
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: var(--space-sm);
    margin-bottom: var(--space-md);
}

/* ── Coupon ── */
.cart-coupon-wrap {
    border-top: 1px solid var(--color-border-light);
    padding-top: var(--space-md);
    margin-top: var(--space-md);
}
.cart-coupon {
    display: flex;
    gap: var(--space-xs);
}
.cart-coupon__input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    background: var(--color-bg-white);
    color: var(--color-text);
}
.cart-coupon__input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--color-bg);
}
.cart-coupon__btn {
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--color-bg-white);
    color: var(--color-text);
    cursor: pointer;
    white-space: nowrap;
}
.cart-coupon__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Total ── */
.cart-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 2px solid var(--color-text);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.cart-summary__vat {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: var(--space-xs);
    margin-bottom: var(--space-lg);
}
.cart-summary__row--vat {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--color-border-light);
}

/* ── Buttons ── */
.cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.cart-btn--primary {
    background: var(--color-primary);
    color: #fff;
}
.cart-btn--primary:hover {
    background: var(--color-primary-hover);
}
.cart-btn--outline {
    background: var(--color-bg-white);
    color: var(--color-text);
    border-color: var(--color-border);
}
.cart-btn--outline:hover {
    border-color: var(--color-text-muted);
}
.cart-btn--secondary {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: transparent;
}
.cart-btn--secondary:hover {
    background: var(--color-primary-light); /* keep background, maybe slightly darker? or opacity change */
    color: var(--color-primary-hover);
    filter: brightness(0.95);
}
.cart-btn--warning {
    background: var(--color-warning);
    color: #fff;
    border-color: var(--color-warning);
}
.cart-btn--warning:hover {
    opacity: 0.9;
}
.cart-btn--full {
    width: 100%;
}

/* ── Empty State ── */
.cart-empty {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
}
.cart-empty__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    color: var(--color-text-light);
}
.cart-empty__title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}
.cart-empty__text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}


/**
 * ==============================================
 * FORM ELEMENTS
 * Consistent style for inputs, selects, textareas, checkboxes
 * Matching visual style of .select-minimal
 * ==============================================
 */
.form-input,
.form-textarea,
.form-select {
    background-color: var(--color-bg-light, #f3f4f6);
    border: 1px solid transparent;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    transition: all var(--transition-fast);
    color: var(--color-text);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    background-color: var(--color-bg-white);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-checkbox {
    appearance: none;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: inline-block;
    vertical-align: middle;
    width: 1.25em;
    height: 1.25em;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.form-checkbox:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

.form-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
/* ============================================== */
/* ACCOUNT AREA                                   */
/* ============================================== */

/* Layout Grid */
.account-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}
@media (min-width: 1024px) {
    .account-layout {
        grid-template-columns: 280px 1fr;
        align-items: start;
    }
}

/* Sidebar Menu */
.account-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.account-nav__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.account-nav__item:hover, .account-nav__item.active {
    /* For the active state, let's keep it simple as in screenshot: no background change, just icon color or nothing if neutral */
    /* Screenshot shows they look like normal buttons but text is clear. We'll use border color on hover */
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.account-nav__item-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.account-nav__icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-text-muted);
}

.account-nav__item:hover .account-nav__icon, .account-nav__item.active .account-nav__icon {
    color: var(--color-text);
}

.account-nav__badge {
    background-color: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
}

/* Section Titles */
.account-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
}

.account-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}
.account-section-header.bordered {
    margin-bottom: var(--space-lg);
}

.account-section-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
}

/* Addresses */
.account-address-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}
@media (min-width: 640px) {
    .account-address-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.account-address-card {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    display: flex;
    flex-direction: column;
}

.account-address-card--default {
    border-color: var(--color-primary);
}

.account-address-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.account-address-badge {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.account-address-card__actions .account-link {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.account-address-card__title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.account-address-card__body {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    flex-grow: 1;
}

/* ── Checkout Address Selection & Carousel ── */
.checkout-addr-selectable {
    transition: border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
}
.checkout-addr-selectable:hover {
    border-color: var(--color-primary-light);
}
.checkout-addr-selected {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* In checkout context, default address should NOT have primary border unless selected */
[data-checkout-addresses] .account-address-card--default {
    border-color: var(--color-border);
}
[data-checkout-addresses] .account-address-card--default.checkout-addr-selected {
    border-color: var(--color-primary) !important;
}

/* Carousel container */
.checkout-addr-carousel {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
}

/* Scroll track */
.checkout-addr-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding: var(--space-xs) 0;
    flex: 1;
    min-width: 0;
}
.checkout-addr-scroll::-webkit-scrollbar {
    display: none;
}

/* Each wrapper inside the scroll is a snap item */
.checkout-addr-scroll > .checkout-addr-wrapper {
    flex: 0 0 280px;
    scroll-snap-align: start;
    min-width: 280px;
    max-width: 280px;
}
@media (min-width: 640px) {
    .checkout-addr-scroll > .checkout-addr-wrapper {
        flex: 0 0 320px;
        min-width: 320px;
        max-width: 320px;
    }
}

/* Arrow buttons \u2014 bare arrows, no box */
.checkout-addr-arrow {
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color 0.15s;
    z-index: 2;
    padding: 0;
}
.checkout-addr-arrow:hover {
    color: var(--color-primary);
}
.checkout-addr-arrow--left {
    margin-right: var(--space-xs);
}
.checkout-addr-arrow--right {
    margin-left: var(--space-xs);
}
.checkout-addr-arrow-icon {
    width: 1.25rem;
    height: 1.25rem;
}
/* Show arrows only on non-touch / desktop */
@media (min-width: 640px) {
    .checkout-addr-arrow {
        display: flex;
    }
}

/* Card content extras */
.checkout-addr-phone {
    margin-top: var(--space-xs);
    font-size: 0.85rem;
}
.checkout-addr-notes {
    margin-top: var(--space-xs);
    font-size: 0.8rem;
    font-style: italic;
    color: var(--color-text-muted);
    word-break: break-word;
}

/* Edit / new form panels */
.checkout-addr-edit-panel {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    width: 100%;
    box-shadow: var(--shadow-md);
}
.checkout-addr-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}
.checkout-addr-edit-header .checkout-addr-edit-title {
    margin-bottom: 0;
}
.checkout-addr-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0.25rem;
    transition: color 0.15s;
}
.checkout-addr-close:hover {
    color: var(--color-text);
}
.checkout-addr-close-icon {
    width: 1.25rem;
    height: 1.25rem;
}
.checkout-addr-new-panel {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}
.checkout-addr-edit-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
}
.checkout-addr-form-actions {
    margin-top: var(--space-md);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* Primary button (filled) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-primary);
    background-color: var(--color-primary);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s;
}
.btn-primary:hover {
    opacity: 0.9;
}

/* "Add address" toggle button icon */
.checkout-addr-icon-sm {
    width: 1rem;
    height: 1rem;
}
.checkout-addr-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Actions in card header */
.account-address-card__actions {
    display: flex;
    gap: var(--space-sm);
}

/* Orders */
.account-order-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.account-order-card {
    background-color: #faf9ff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.account-order-card__header {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.account-order-card__header-left {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.account-order-card__header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.account-order-card__id {
    font-weight: 700;
    color: var(--color-text);
    font-size: 1rem;
}

.account-order-card__date {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.account-order-card__price {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-text);
}

.account-order-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.account-order-badge--processing {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.account-order-badge--rejected {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
}

.account-order-badge--success {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.account-order-card__content {
    padding: 0 var(--space-lg) var(--space-md);
    display: flex;
    gap: var(--space-lg);
}

.account-order-card__details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.account-order-card__meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.account-order-card__footer {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    gap: var(--space-md);
    border-top: 1px solid var(--color-border-light);
}

.account-order-card__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    background-color: var(--color-bg-white);
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.account-order-card__btn:hover {
    background-color: var(--color-bg);
    border-color: var(--color-text-muted);
}

/* ── Order Detail Page ── */

.order-detail {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.order-detail__header {
    padding: var(--space-lg);
    padding-bottom: 0;
}

.order-detail__order-number {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
}

.order-detail__meta-row {
    padding: var(--space-sm) var(--space-lg) var(--space-lg);
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.order-detail__meta-block {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.order-detail__meta-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
}

.order-detail__meta-value {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.order-detail__lines {
    padding: 0 var(--space-lg) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.order-detail__line {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.order-detail__line-price {
    margin-left: auto;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
    white-space: nowrap;
}

.order-detail__line-image {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    background-color: var(--color-bg-white);
}

.order-detail__line-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-detail__line-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg);
}

.order-detail__line-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.order-detail__line-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
}

.order-detail__line-variant {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.order-detail__line-qty {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.order-detail__summary {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border-light);
}

.order-detail__summary-title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.order-detail__addresses {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.order-detail__address-block {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.order-detail__address-title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--color-text);
}

.order-detail__address-body {
    font-style: normal;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.order-detail__footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.order-detail__actions {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    gap: var(--space-md);
}

.order-detail__actions .account-order-card__btn {
    gap: var(--space-xs);
    border-color: var(--color-text-muted);
}

.order-detail__actions .account-order-card__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.order-detail__back-link {
    font-size: 0.875rem;
    color: var(--color-primary);
    text-decoration: none;
}

.order-detail__back-link:hover {
    text-decoration: underline;
}

.order-detail__help {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.order-detail__contact-link {
    color: var(--color-primary);
    text-decoration: none;
}

.order-detail__contact-link:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-white);
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}
.btn-outline:hover {
    background: var(--color-bg);
    border-color: var(--color-text-muted);
}

/* Main Dashboard Overview Area */
.account-overview-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}
.account-overview-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

/**
 * ==============================================
 * SEARCH AUTOCOMPLETE DROPDOWN
 * ==============================================
 */
.search-ac {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 0.25rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-height: 28rem;
    overflow-y: auto;
}

.search-ac__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    text-decoration: none;
    color: var(--color-text);
    transition: background var(--transition-fast);
    cursor: pointer;
    border-bottom: 1px solid var(--color-border-light);
}
.search-ac__item:last-of-type {
    border-bottom: none;
}
.search-ac__item:hover,
.search-ac__item--active {
    background: var(--color-primary-light);
}

.search-ac__img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--color-border-light);
}
.search-ac__img--placeholder {
    display: block;
}

.search-ac__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.search-ac__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-ac__cat {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-ac__price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text);
    flex-shrink: 0;
    white-space: nowrap;
}

.search-ac__prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 0;
    line-height: 1.2;
}

.search-ac__price--old {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-light);
    text-decoration: line-through;
    white-space: nowrap;
}

.search-ac__img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-ac__img--placeholder svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-text-light);
}

.search-ac__all {
    display: block;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    background: var(--color-border-light);
    transition: background var(--transition-fast);
}
.search-ac__all:hover {
    background: var(--color-primary-light);
}

/**
 * ==============================================
 * SHIPPING METHODS SELECTOR (Checkout)
 * ==============================================
 */
.shipping-methods-selector {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.shipping-methods-selector__option {
    display: flex;
    align-items: center;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--color-bg-white);
}

.shipping-methods-selector__option:hover {
    border-color: var(--color-primary);
}

.shipping-methods-selector__option--selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
    background: var(--color-primary-light);
}

.shipping-methods-selector__radio {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--color-primary);
    margin: 0;
}

.shipping-methods-selector__content {
    display: flex;
    align-items: center;
    flex: 1;
    gap: var(--space-md);
    margin-left: var(--space-md);
}

.shipping-methods-selector__logo {
    width: 40px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.shipping-methods-selector__info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.shipping-methods-selector__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.shipping-methods-selector__days {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.shipping-methods-selector__threshold-info {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 500;
}

.shipping-methods-selector__price {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    flex-shrink: 0;
}

.shipping-methods-selector__free {
    color: var(--color-success);
    font-weight: 600;
}

/* Responsive: stacking su mobile */
@media (max-width: 480px) {
    .shipping-methods-selector__content {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    .shipping-methods-selector__price {
        width: 100%;
        text-align: right;
    }
}

/* === LAYOUT FOTO CATALOGO === */

/*
 * Queste regole usano le CSS variables iniettate dal backend:
 * --ratio-card-home, --ratio-card-results, --ratio-card-product,
 * --ratio-card-category, --placeholder-bg
 * --fit-card-home, --fit-card-results, --fit-card-product, --fit-card-category
 *
 * I selettori principali (.product-card__image-wrap, .category-card)
 * sono aggiornati sopra. Qui sotto le regole per contesti specifici.
 */

/* Card risultati ricerca (product-card nel contesto search) */
.product-card--search .product-card__image-wrap,
.product-card__image-wrap--search {
    aspect-ratio: var(--ratio-card-results, 3/2);
}

/* Adattamento immagine per contesto search */
.product-card--search .product-card__image-wrap img,
.product-card__image-wrap--search img {
    object-fit: var(--fit-card-results, cover);
}

/* Immagine principale scheda prodotto */
.product-detail__image-wrap {
    aspect-ratio: var(--ratio-card-product, 2/3);
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-color: var(--placeholder-bg, #F5F5F5);
}

.product-detail__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: var(--fit-card-product, cover);
}

/* Placeholder vuoto (nessuna immagine, nessun PNG caricato) */
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--placeholder-bg, #F5F5F5);
    color: var(--color-text-light, #9ca3af);
}

/*
 * Placeholder PNG — centrato come un logo, con margine ~20%
 * Non deve riempire tutto lo stage: rimane centrato con padding.
 */
.image-placeholder-png {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20%;
    background-color: var(--placeholder-bg, #F5F5F5);
}

.image-placeholder-png img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ==============================================
 * UTILITIES
 * ============================================== */

/* Hide scrollbar for cross-browser native carousels */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.no-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}
