/* ============================================================
   Annalynn's Personalized Gifts — theme.css
   ============================================================ */

/* ─── Google Fonts (loaded via PHP enqueue) ───────────────── */

/* ─── CSS Custom Properties ───────────────────────────────── */
:root {
    /* These are OVERRIDDEN by wp_add_inline_style with Customizer values */
    --color-primary:    #C47A2E;
    --color-accent:     #4D8C5A;
    --color-background: #FAFAF8;
    --color-foreground: #2A2218;
    --color-card:       #FFFFFF;
    --color-secondary:  #EFF0ED;
    --color-muted:      #EAEAE7;
    --color-border:     #E0DDD8;
    --color-wood-brown: #7A5230;

    --color-primary-fg: #FFFFFF;
    --color-accent-fg:  #FFFFFF;
    --color-muted-fg:   #888580;
    --color-secondary-fg: #6B6560;

    /* Tokens equivalentes a React: warm-amber, sage-green */
    --warm-amber: hsl(30 60% 45%);
    --sage-green: hsl(140 30% 45%);
    --wood-brown-hsl: hsl(25 30% 35%);

    /* Sombras dinámicas con var(--color-primary) para Customizer */
    --shadow-soft: 0 4px 24px -4px color-mix(in srgb, var(--color-primary) 8%, transparent);
    --shadow-elevated: 0 8px 40px -8px rgba(0,0,0,0.10);
    --shadow-warm: 0 8px 40px color-mix(in srgb, var(--color-primary) 10%, transparent);
    --transition: cubic-bezier(0.4, 0, 0.2, 1);

    --font-display: 'Lora', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
}

/* ─── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { cursor: pointer; background: none; border: none; font-family: inherit; }
ul, ol { list-style: none; }
textarea, input, select { font-family: inherit; }

/* ─── Layout ───────────────────────────────────────────────── */
.container-wide {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}
@media (min-width: 1024px) {
    .container-wide { padding-inline: 2rem; }
}

/* ─── Buttons ───────────────────────────────────────────────── */
.theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s var(--transition);
    white-space: nowrap;
    cursor: pointer;
    border: none;
}
.theme-btn-warm {
    background-color: var(--color-primary);
    color: var(--color-primary-fg);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.theme-btn-warm:hover {
    opacity: 0.9;
    box-shadow: 0 8px 30px color-mix(in srgb, var(--color-primary) 30%, transparent);
    transform: translateY(-1px);
}
.theme-btn-warm:active { transform: translateY(0); }
.theme-btn-outline {
    background: transparent;
    color: var(--color-foreground);
    border: 1.5px solid rgba(42,34,24,0.2);
}
.theme-btn-outline:hover {
    border-color: rgba(42,34,24,0.4);
    background: rgba(42,34,24,0.03);
}
.theme-btn-outline-white {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.7);
}
.theme-btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}
.theme-btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-secondary-fg);
}
.theme-btn-secondary:hover { opacity: 0.85; }

/* ─── Section Shared ────────────────────────────────────────── */
.theme-section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.theme-section-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}
.theme-section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-foreground);
}
.scroll-mt-24 { scroll-margin-top: 6rem; }

/* ─── Soft Border Card ──────────────────────────────────────── */
.soft-border {
    border: 1px solid color-mix(in srgb, var(--color-primary) 12%, transparent);
    border-radius: var(--radius-lg);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.soft-border:hover {
    border-color: color-mix(in srgb, var(--color-primary) 25%, transparent);
    box-shadow: var(--shadow-soft);
}

/* ─── Link underline (match React .link-underline) ──────────── */
.link-underline {
    position: relative;
    display: inline-block;
}
.link-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.3s var(--transition);
}
.link-underline:hover::after { transform: scaleX(1); }

/* ─── Animations (match React) ─────────────────────────────── */
.animate-fade-in {
    animation: themeFadeIn 0.6s var(--transition) forwards;
}
.animate-slide-up {
    animation: themeSlideUp 0.6s var(--transition) forwards;
}
@keyframes themeFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes themeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Scroll Reveal Animations ─────────────────────────────── */
.reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
    transition-delay: var(--delay, 0s);
}
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.is-visible {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}

/* ─── HEADER ────────────────────────────────────────────────── */
.theme-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: 4rem;
    transition: background-color 0.3s var(--transition),
                border-color 0.3s var(--transition),
                box-shadow 0.3s var(--transition);
}
@media (min-width: 1024px) { .theme-header { height: 5rem; } }
.theme-header.is-scrolled {
    background-color: color-mix(in srgb, var(--color-background) 95%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.theme-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.theme-logo-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}
.theme-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}
.theme-logo-text {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: #fff;
    transition: color 0.3s;
    white-space: nowrap;
}
.theme-header.is-scrolled .theme-logo-text,
.theme-no-hero .theme-logo-text { color: var(--color-primary); }
.theme-nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}
@media (min-width: 768px) { .theme-nav-desktop { display: flex; } }
.theme-nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    transition: color 0.2s;
    position: relative;
}
.theme-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 100%; height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--transition);
}
.theme-nav-link:hover::after { transform: scaleX(1); }
.theme-header.is-scrolled .theme-nav-link,
.theme-no-hero .theme-nav-link { color: var(--color-foreground); }
.theme-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.theme-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: rgba(255,255,255,0.9);
    transition: color 0.2s;
    border-radius: 50%;
    padding: 0;
}
.theme-header.is-scrolled .theme-cart-btn,
.theme-no-hero .theme-cart-btn { color: var(--color-foreground); }
.theme-cart-btn:hover { color: var(--color-primary); }
.theme-cart-count {
    position: absolute;
    top: 0; right: 0;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.theme-cart-count:empty { display: none; }
.theme-mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.9);
    width: 2.5rem;
    height: 2.5rem;
    transition: color 0.2s;
    border-radius: var(--radius);
}
@media (min-width: 768px) { .theme-mobile-menu-btn { display: none; } }
.theme-header.is-scrolled .theme-mobile-menu-btn,
.theme-no-hero .theme-mobile-menu-btn { color: var(--color-foreground); }
#theme-mobile-menu[hidden] { display: none !important; }
.theme-mobile-menu {
    background: rgba(250,250,248,0.97);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: slideDown 0.25s var(--transition);
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.theme-mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-foreground);
    border-bottom: 1px solid var(--color-border);
    transition: color 0.2s;
}
.theme-mobile-nav-link:last-child { border-bottom: none; }
body:not(.theme-no-hero) .theme-header:not(.is-scrolled) .theme-mobile-menu {
    background: rgba(42,34,24,0.96);
    border-top-color: rgba(255,255,255,0.2);
}
body:not(.theme-no-hero) .theme-header:not(.is-scrolled) .theme-mobile-nav-link {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.2);
}
body:not(.theme-no-hero) .theme-header:not(.is-scrolled) .theme-mobile-nav-link:hover {
    color: rgba(255,255,255,0.8);
}
.theme-header.is-scrolled .theme-mobile-nav-link:hover,
.theme-no-hero .theme-mobile-nav-link:hover { color: var(--color-primary); }
@media (min-width: 768px) {
    #theme-mobile-menu { display: none !important; }
}

/* ─── HERO ──────────────────────────────────────────────────── */
.theme-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.theme-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.theme-hero-overlay {
    position: absolute;
    inset: 0;
    background: hsl(25 40% 15% / 0.6);
    z-index: 1;
}
.theme-hero-content {
    position: relative;
    z-index: 2;
    padding-top: 5rem;
    padding-bottom: 5rem;
    text-align: center;
}
.theme-hero-text,
.theme-hero-eyebrow { text-align: center; }
.theme-hero-title { text-align: center; }
.theme-hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1rem;
}
.theme-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}
.theme-hero-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
    margin-bottom: 2rem;
}
.theme-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}
.theme-hero-scroll-arrow {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}
.theme-hero-scroll-arrow a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    animation: bounceDown 1s ease-in-out infinite;
    transition: color 0.2s;
}
.theme-hero-scroll-arrow a:hover { color: #fff; }
@keyframes bounceDown {
    0%, 100% { transform: translateY(-25%); }
    50%       { transform: translateY(0); }
}

/* ─── ABOUT ─────────────────────────────────────────────────── */
.theme-about {
    padding: 5rem 0;
}
.theme-about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 1024px) {
    .theme-about-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
.theme-about-img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: var(--shadow-elevated);
    object-fit: cover;
    aspect-ratio: 4/5;
}
.theme-about-para {
    color: var(--color-muted-fg);
    margin-bottom: 1rem;
    line-height: 1.75;
}
.theme-about-para:last-of-type { margin-bottom: 1.5rem; }
.theme-about-quote {
    border-left: 3px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
    padding-left: 1.25rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--color-foreground);
    line-height: 1.65;
    margin-top: 1.5rem;
}
.theme-about-content-col .theme-section-eyebrow { text-align: left; }
.theme-about-content-col .theme-section-title { text-align: left; margin-bottom: 1.5rem; }

/* ─── FEATURED / SHOP PRODUCT GRID ─────────────────────────── */
.theme-featured,
.theme-shop { padding: 5rem 0; }
.theme-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-items: start;
}
@media (min-width: 768px) {
    .theme-product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .theme-shop-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
    .theme-featured-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
.theme-shop-product-wrap {
    min-height: 0;
}

/* ─── PRODUCT CARD (match React ProductCard) ─────────────────── */
.theme-product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s var(--transition);
}
.theme-product-card:hover {
    transform: translateY(-6px);
}
.theme-product-card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    min-height: 0;
    background: var(--color-secondary);
    display: block;
    border-radius: 1rem;
}
.theme-product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--transition);
    border-radius: 1rem;
    display: block;
}
.theme-related .theme-product-card-body { margin-top: 1rem; }
.theme-product-card:hover .theme-product-card-img { transform: scale(1.03); }
.theme-product-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}
.theme-product-card:hover .theme-product-card-overlay { opacity: 1; }
.theme-product-card-overlay-desc {
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transform: translateY(0.5rem);
    transition: transform 0.5s, opacity 0.5s;
}
.theme-product-card:hover .theme-product-card-overlay-desc {
    transform: translateY(0);
}
.theme-product-badge {
    position: absolute;
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 0.5rem;
}
@media (min-width: 768px) {
    .theme-product-badge {
        top: 0.75rem;
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}
.theme-badge-sold-out {
    top: 0.5rem;
    left: 0.5rem;
    background: var(--color-muted);
    color: var(--color-muted-fg);
}
@media (min-width: 768px) {
    .theme-badge-sold-out { top: 0.75rem; left: 0.75rem; }
}
.theme-badge-customizable,
.theme-badge-sale {
    top: 0.5rem;
    right: 0.5rem;
    background: var(--color-accent);
    color: #fff;
}
.theme-badge-sale { background: var(--color-primary); }
@media (min-width: 768px) {
    .theme-badge-customizable,
    .theme-badge-sale { top: 0.75rem; right: 0.75rem; }
}
.theme-product-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-top: 0.5rem;
}
.theme-product-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-foreground);
    line-height: 1.35;
    transition: color 0.2s;
}
.theme-product-card:hover .theme-product-card-title { color: var(--color-primary); }
.theme-product-card-price {
    font-size: 0.875rem;
    color: var(--color-muted-fg);
}
/* Stock label (used in single-product related) */
.theme-product-card-stock {
    font-size: 0.8125rem;
    color: var(--color-muted-fg);
}

/* Coming Soon card */
.theme-coming-soon-card {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: transparent;
}
.theme-coming-soon-inner { text-align: center; }
.theme-coming-soon-text {
    font-size: 0.9375rem;
    color: var(--color-muted-fg);
    font-family: var(--font-display);
    font-style: italic;
}

/* ─── SHOP FILTERS (match React Index.tsx) ──────────────────── */
.theme-shop-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.theme-category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.theme-category-pill {
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--color-secondary);
    color: var(--color-secondary-fg);
    transition: all 0.3s var(--transition);
    border: none;
    cursor: pointer;
}
.theme-category-pill:hover {
    background: var(--color-muted);
    transform: scale(1.05);
}
.theme-category-pill:active { transform: scale(0.97); }
.theme-category-pill.is-active {
    background: var(--color-primary);
    color: #fff;
}
.theme-price-filter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.theme-price-filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-foreground);
    background: var(--color-border);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.theme-price-filter-toggle:hover {
    background: var(--color-muted);
}
.theme-chevron { transition: transform 0.3s; }
.theme-price-filter-toggle[aria-expanded="true"] .theme-chevron { transform: rotate(180deg); }
.theme-price-filter { width: 30%; max-width: 52rem; }
.theme-price-range-panel {
    width: 100%;
    max-width: 52rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s var(--transition), opacity 0.3s var(--transition);
}
.theme-price-range-panel.is-open {
    max-height: 12rem;
    opacity: 1;
}
.theme-price-slider-wrap {
    position: relative;
    height: 1.5rem;
    margin-bottom: 0.75rem;
}
.theme-price-slider-fill {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 0.5rem;
    border-radius: 9999px;
    background: var(--color-primary);
    pointer-events: none;
    z-index: 0;
}
.theme-price-slider {
    position: absolute;
    width: 100%;
    height: 0.5rem;
    background: var(--color-secondary);
    border-radius: 9999px;
    appearance: none;
    outline: none;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}
.theme-price-slider::-webkit-slider-thumb {
    pointer-events: all;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: var(--color-primary);
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.theme-price-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.theme-price-slider::-moz-range-thumb {
    pointer-events: all;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: var(--color-primary);
    cursor: pointer;
}
.theme-price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-foreground);
}
.theme-show-more-wrap { text-align: center; margin-top: 2.5rem; }
.theme-no-products { text-align: center; color: var(--color-muted-fg); padding: 3rem 0; }

/* ─── REVIEWS ───────────────────────────────────────────────── */
.theme-reviews { padding: 5rem 0; }
.theme-reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 1024px) {
    .theme-reviews-grid { grid-template-columns: repeat(3, 1fr); }
}
.theme-review-card {
    padding: 1.5rem;
    background: var(--color-card);
    border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--color-primary) 12%, transparent);
    transition: transform 0.3s var(--transition), box-shadow 0.3s var(--transition);
}
.theme-review-card:hover { transform: translateY(-4px); }
.theme-review-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}
.theme-star { fill: none; stroke: currentColor; }
.theme-star.is-filled { fill: var(--color-primary); stroke: var(--color-primary); }
.theme-star.is-empty { stroke: var(--color-muted-fg); }
.theme-review-text {
    color: var(--color-foreground);
    line-height: 1.65;
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
}
.theme-review-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.theme-review-author-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.theme-review-author {
    font-weight: 600;
    font-size: 0.875rem;
}
.theme-review-verified {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 500;
}
.theme-review-date {
    font-size: 0.75rem;
    color: var(--color-muted-fg);
    text-align: right;
}
.theme-review-product {
    font-size: 0.8125rem;
    color: var(--color-muted-fg);
}

/* ─── FAQ ───────────────────────────────────────────────────── */
.theme-faq {
    padding: 5rem 0;
    background: rgba(239,240,237,0.30);
}
.theme-faq-wrap {
    max-width: 48rem;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.theme-faq-category {
    border-radius: var(--radius-lg);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    overflow: hidden;
}
.theme-faq-cat-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-foreground);
    cursor: pointer;
    background: none;
    border: none;
    gap: 1rem;
}
.theme-faq-cat-header:hover { background: color-mix(in srgb, var(--color-primary) 3%, transparent); }
.theme-faq-cat-icon {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--color-wood-brown);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1;
}
.theme-faq-category .icon-minus { display: none; }
.theme-faq-category.is-open .icon-plus { display: none; }
.theme-faq-category.is-open .icon-minus { display: flex; }
.theme-faq-cat-body {
    border-top: 1px solid var(--color-border);
}
.theme-faq-item { border-bottom: 1px solid var(--color-border); }
.theme-faq-item:last-child { border-bottom: none; }
.theme-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-wood-brown);
    background: none;
    border: none;
    cursor: pointer;
    gap: 1rem;
}
.theme-faq-question:hover { background: color-mix(in srgb, var(--color-primary) 3%, transparent); }
.theme-faq-chevron {
    flex-shrink: 0;
    transition: transform 0.25s;
    color: var(--color-wood-brown);
}
.theme-faq-question[aria-expanded="true"] .theme-faq-chevron { transform: rotate(180deg); }
.theme-faq-answer {
    padding: 0 1.5rem 1rem;
}
.theme-faq-answer p {
    color: var(--color-muted-fg);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ─── CONTACT ───────────────────────────────────────────────── */
.theme-contact { padding: 5rem 0; }
.theme-contact-subtitle {
    color: var(--color-muted-fg);
    max-width: 36rem;
    margin-inline: auto;
    margin-top: 0.75rem;
    text-align: center;
    font-size: 1rem;
    line-height: 1.65;
}
.theme-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 2rem;
}
@media (min-width: 1024px) {
    .theme-contact-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
.theme-contact-info-title {
    font-size: 1.375rem;
    font-family: var(--font-display);
    margin-bottom: 1rem;
}
.theme-contact-info-text {
    color: var(--color-muted-fg);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}
.theme-contact-cards { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.theme-contact-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: var(--color-card);
    border-radius: 1rem;
    transition: transform 0.3s var(--transition);
}
.hover-slide-right:hover { transform: translateX(4px); }
.theme-contact-icon { color: var(--color-primary); flex-shrink: 0; }
.theme-contact-link {
    font-size: 0.9375rem;
    color: var(--color-foreground);
    transition: color 0.2s;
}
.theme-contact-link:hover { color: var(--color-primary); }
.theme-contact-quote {
    border-left: 3px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
    padding-left: 1rem;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    color: var(--color-primary);
    line-height: 1.6;
}

/* Contact Form */
.theme-contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.theme-form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.theme-form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-foreground);
}
.theme-required { color: var(--color-primary); margin-left: 0.125rem; }
.theme-form-input,
.theme-form-select,
.theme-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    background: var(--color-card);
    color: var(--color-foreground);
    transition: border-color 0.2s;
    outline: none;
}
.theme-form-input:focus,
.theme-form-select:focus,
.theme-form-textarea:focus { border-color: var(--color-primary); }
.theme-form-textarea { resize: vertical; min-height: 9rem; }
.theme-contact-submit { width: 100%; justify-content: center; font-size: 1rem; padding: 0.875rem 1.5rem; }
.theme-contact-success {
    background: color-mix(in srgb, var(--color-accent) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
    color: var(--color-accent);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
}

/* ─── FOOTER ────────────────────────────────────────────────── */
.theme-footer {
    border-top: 1px solid var(--color-border);
    margin-top: 5rem;
    padding: 3rem 0 2rem;
}
@media (min-width: 1024px) { .theme-footer { padding: 4rem 0 2rem; } }
.theme-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
@media (min-width: 768px) {
    .theme-footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.theme-footer-logo-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
}
.theme-footer-logo-img { width: 40px; height: 40px; object-fit: contain; }
.theme-footer-brand-name {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--color-primary);
}
.theme-footer-desc {
    color: var(--color-muted-fg);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    max-width: 24rem;
}
.theme-footer-tagline {
    color: var(--color-muted-fg);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-style: italic;
}
.theme-footer-heading {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-foreground);
    margin-bottom: 1rem;
    font-family: var(--font-display);
}
.theme-footer-links { display: flex; flex-direction: column; gap: 0.5rem; list-style: none; list-style-type: none; padding-left: 0; margin-left: 0; }
.theme-footer-links li { list-style: none; list-style-type: none; }
/* Checkout: sin viñetas en la lista Navigate del footer */
body.theme-checkout .theme-footer-nav-col .theme-footer-links,
body.theme-checkout .theme-footer-nav-col .theme-footer-links li {
    list-style: none !important;
    list-style-type: none !important;
}
body.theme-checkout .theme-footer-nav-col .theme-footer-links li::marker {
    content: none;
    display: none;
}
.theme-footer-link {
    font-size: 0.9rem;
    color: var(--color-muted-fg);
    transition: color 0.2s;
}
.theme-footer-link:hover { color: var(--color-primary); }
.theme-footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--color-muted-fg);
}
.theme-footer-contact-item svg { flex-shrink: 0; opacity: 0.7; }
.theme-footer-contact-link {
    font-size: 0.9rem;
    color: var(--color-muted-fg);
    transition: color 0.2s;
}
.theme-footer-contact-link:hover { color: var(--color-primary); }
.theme-footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}
@media (min-width: 768px) {
    .theme-footer-bottom { flex-direction: row; justify-content: space-between; }
}
.theme-footer-copy,
.theme-footer-credit {
    font-size: 0.8125rem;
    color: var(--color-muted-fg);
}
.theme-footer-credit-link {
    color: var(--color-primary);
    transition: opacity 0.2s;
}
.theme-footer-credit-link:hover { opacity: 0.8; }

/* ─── INNER PAGES (non-homepage) ───────────────────────────── */
.theme-main-content,
.theme-page-content { padding-top: 6rem; }
@media (min-width: 1024px) {
    .theme-main-content,
    .theme-page-content { padding-top: 7rem; }
}
.theme-checkout-page.theme-main-content { padding-top: 3rem; }
@media (min-width: 1024px) {
    .theme-checkout-page.theme-main-content { padding-top: 3.5rem; }
}
.theme-page-content .container-wide { padding-bottom: 3rem; }
.theme-page-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-family: var(--font-display);
    margin-bottom: 1.5rem;
}
.theme-entry-content {
    color: var(--color-muted-fg);
    line-height: 1.75;
}
.theme-entry-content p { margin-bottom: 1rem; }
.theme-entry-content h2, .theme-entry-content h3 { margin: 1.5rem 0 0.75rem; color: var(--color-foreground); }
.theme-entry-content ul, .theme-entry-content ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.theme-entry-content ul li { list-style: disc; margin-bottom: 0.25rem; }

/* ─── 404 PAGE ──────────────────────────────────────────────── */
.theme-404-content { min-height: 70vh; display: flex; align-items: center; }
.theme-404-wrap { text-align: center; }
.theme-404-title { font-size: clamp(2rem, 5vw, 3.5rem); font-family: var(--font-display); margin-bottom: 1rem; }
.theme-404-text { color: var(--color-muted-fg); font-size: 1.0625rem; margin-bottom: 2rem; }

/* ─── SIDE CART DRAWER ──────────────────────────────────────── */
#theme-cart-overlay {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--color-foreground) 20%, transparent);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    transition: opacity 0.3s var(--transition);
}
body.cart-open #theme-cart-overlay {
    opacity: 1;
    pointer-events: all;
}
#theme-cart-drawer {
    position: fixed;
    top: 0; right: 0;
    width: min(100vw, 28rem);
    height: 100%;
    background: var(--color-card);
    z-index: 201;
    transform: translateX(100%);
    transition: transform 0.35s var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}
body.cart-open #theme-cart-drawer { transform: translateX(0); }
#theme-cart-drawer.is-updating { opacity: 0.6; pointer-events: none; }
.theme-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
.theme-cart-title {
    font-family: var(--font-display);
    font-size: 1.1875rem;
    font-weight: 600;
}
.theme-cart-close-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted-fg);
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
}
.theme-cart-close-btn:hover { color: var(--color-foreground); background: var(--color-secondary); }
.theme-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}
.theme-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 1rem;
}
.theme-cart-empty-icon { color: var(--color-muted-fg); opacity: 0.6; }
.theme-cart-empty-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--color-foreground);
}
.theme-cart-items { display: flex; flex-direction: column; gap: 1.25rem; }
.theme-cart-item {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 0.875rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.theme-cart-item:last-child { border-bottom: none; }
.theme-cart-item-img-wrap { aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; background: var(--color-secondary); }
.theme-cart-item-img { width: 100%; height: 100%; object-fit: cover; }
.theme-cart-item-info { display: flex; flex-direction: column; gap: 0.375rem; }
.theme-cart-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-foreground);
    line-height: 1.3;
}
.theme-cart-item-price {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-primary);
}
.theme-cart-item-variant {
    font-size: 0.75rem;
    color: var(--color-muted-fg);
}
.theme-cart-item-actions { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.theme-cart-qty-controls { display: flex; align-items: center; gap: 0.5rem; }
.theme-cart-qty-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 1.5px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    color: var(--color-foreground);
    transition: border-color 0.2s, background 0.2s;
}
.theme-cart-qty-btn:hover { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 5%, transparent); }
.theme-cart-qty-value { font-size: 0.9rem; font-weight: 500; min-width: 1.5rem; text-align: center; }
.theme-cart-remove-btn {
    font-size: 0.75rem;
    color: var(--color-muted-fg);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.theme-cart-remove-btn:hover { color: #c0392b; }
.theme-cart-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
    background: var(--color-card);
}
.theme-cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}
.theme-cart-subtotal-label { font-size: 0.9375rem; font-weight: 500; }
.theme-cart-subtotal-value { font-size: 1.125rem; font-weight: 700; color: var(--color-primary); }
.theme-cart-checkout-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--color-primary);
    color: #fff;
    text-align: center;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}
.theme-cart-checkout-btn:hover { opacity: 0.9; transform: translateY(-1px); }
@media (max-width: 480px) {
    #theme-cart-drawer { width: 100vw; }
    .theme-cart-header { padding: 1rem 1.25rem; }
    .theme-cart-body { padding: 1rem 1.25rem; }
    .theme-cart-footer { padding: 1rem 1.25rem; padding-bottom: max(1.25rem, env(safe-area-inset-bottom)); }
    .theme-cart-checkout-btn { padding: 1rem 1.25rem; }
}

/* ─── WOOCOMMERCE SINGLE PRODUCT ─────────────────────────────── */
.theme-single-product { padding-top: 6rem; }
@media (min-width: 1024px) { .theme-single-product { padding-top: 7rem; } }
.theme-single-product-wrap { padding: 2rem 0 4rem; }
.theme-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-muted-fg);
    margin-bottom: 2rem;
    transition: color 0.2s;
}
.theme-back-link:hover { color: var(--color-primary); }
.theme-product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 1024px) {
    .theme-product-layout { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
/* Gallery */
.theme-product-gallery { display: flex; flex-direction: column; gap: 0.75rem; }
.theme-product-main-img-wrap {
    aspect-ratio: 3/4;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-secondary);
}
#product-main-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.theme-product-thumbnails { display: flex; gap: 0.625rem; flex-wrap: wrap; }
.theme-thumbnail-btn {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    background: var(--color-secondary);
    padding: 0;
    cursor: pointer;
}
.theme-thumbnail-btn.is-active { border-color: var(--color-primary); }
.theme-thumbnail-btn img { width: 100%; height: 100%; object-fit: cover; }
/* Product Info */
.theme-product-info { display: flex; flex-direction: column; gap: 0.875rem; }
.theme-product-category {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-muted-fg);
}
.theme-product-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.2;
}
.theme-product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}
.theme-product-stock-out {
    display: inline-block;
    padding: 0.3125rem 0.875rem;
    background: var(--color-muted);
    color: var(--color-muted-fg);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}
.theme-customizable-notice {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: color-mix(in srgb, var(--color-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
    border-radius: var(--radius);
}
.theme-customizable-icon {
    font-size: 1.25rem;
}
.theme-customizable-content {
    flex: 1;
}
.theme-customizable-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}
.theme-customizable-text {
    font-size: 0.8125rem;
    color: var(--color-muted-fg);
    line-height: 1.6;
}
.theme-customizable-text a {
    color: var(--color-primary);
    text-decoration: underline;
}
.theme-product-description { color: var(--color-muted-fg); line-height: 1.75; font-size: 0.9375rem; }
.theme-product-details-wrap {
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
}
.theme-product-details-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-foreground);
    margin-bottom: 0.625rem;
}
.theme-product-details-list { display: flex; flex-direction: column; gap: 0.375rem; }
.theme-product-details-list li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9rem;
    color: var(--color-muted-fg);
    line-height: 1.4;
}
.theme-product-details-list li::before {
    content: '';
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-primary) 40%, transparent);
}
/* Add to Cart */
.theme-atc-form { display: flex; flex-direction: column; gap: 1rem; }
.theme-qty-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    width: fit-content;
}
.theme-qty-btn {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    background: var(--color-secondary);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--color-foreground);
}
.theme-qty-btn:hover { background: var(--color-muted); }
.theme-qty-display {
    min-width: 3rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    padding: 0 0.5rem;
    line-height: 2.75rem;
    color: var(--color-foreground);
}
.theme-qty-input { display: none; }
.theme-atc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s var(--transition);
    text-align: center;
}
.theme-atc-btn.add_to_cart_button.ajax_add_to_cart {
    background: var(--color-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.theme-atc-btn.add_to_cart_button.ajax_add_to_cart:hover {
    opacity: 0.9;
    box-shadow: 0 8px 30px color-mix(in srgb, var(--color-primary) 30%, transparent);
    transform: translateY(-1px);
}
.theme-atc-btn.is-disabled,
.theme-atc-btn[disabled] {
    background: var(--color-muted);
    color: var(--color-muted-fg);
    box-shadow: none;
    pointer-events: none;
    transform: none;
}
/* Attributes */
.theme-attr-group { display: flex; flex-direction: column; gap: 0.5rem; }
.theme-attr-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-foreground);
}
.theme-attr-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.theme-attr-option-btn {
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    border: 1.5px solid var(--color-border);
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    color: var(--color-foreground);
    cursor: pointer;
    transition: all 0.2s;
}
.theme-attr-option-btn:hover { border-color: var(--color-primary); }
.theme-attr-option-btn.is-selected {
    background: var(--color-foreground);
    color: var(--color-card);
    border-color: var(--color-foreground);
}
/* Related Products (match React ProductDetail) */
.theme-related {
    margin-top: 5rem;
    padding: 5rem 0;
    border-top: 1px solid var(--color-border);
}
.theme-related-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 500;
    margin-bottom: 2.5rem;
}
.theme-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (min-width: 1024px) {
    .theme-related-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* ─── ARCHIVE / SHOP PAGE ───────────────────────────────────── */
.theme-archive { padding-top: 6rem; padding-bottom: 4rem; }
@media (min-width: 1024px) { .theme-archive { padding-top: 7rem; } }
.theme-archive-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2.5rem;
}
.theme-archive-title { font-size: clamp(1.5rem, 3vw, 2rem); font-family: var(--font-display); }
.theme-archive-desc { color: var(--color-muted-fg); margin-top: 0.5rem; }
.theme-archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (min-width: 768px) { .theme-archive-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .theme-archive-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; } }

/* ─── CHECKOUT ──────────────────────────────────────────────── */
html:has(body.theme-checkout) { overflow-x: hidden; }
body.theme-checkout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}
body.theme-checkout .theme-checkout-page {
    flex: 1;
}
.theme-checkout-page {
    padding-top: 2rem;
    padding-bottom: 4rem;
    min-height: calc(100vh - 2rem);
    overflow-x: hidden;
    min-width: 0;
}
.theme-checkout-page .container-wide {
    max-width: 80rem;
    width: 100%;
    overflow-x: hidden;
    min-width: 0;
}
.theme-checkout-page form.woocommerce-checkout {
    min-width: 0;
    overflow-x: hidden;
}
.theme-checkout-grid {
    min-width: 0;
    overflow-x: hidden;
}
.theme-checkout-title {
    font-family: var(--font-display);
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 500;
    margin-bottom: 2.5rem;
}
.theme-checkout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
.checkout-col-form { order: 1; }
.checkout-col-order { order: 2; }
@media (min-width: 1024px) {
    .theme-checkout-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    .checkout-col-order { order: 1; }
    .checkout-col-form { order: 2; }
}
.theme-checkout-section-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}
.theme-checkout-section { margin-bottom: 2rem; }
.checkout-col-order, .checkout-col-form { min-width: 0; }
/* Form column: contain overflow (e.g. LastPass/icons) so page never scrolls horizontally */
.checkout-col-form {
    overflow-x: hidden;
    min-width: 0;
}
.checkout-col-form .theme-checkout-field,
.checkout-col-form .form-row,
.checkout-col-form .woocommerce-input-wrapper {
    min-width: 0;
}
.checkout-col-form .woocommerce-input-wrapper {
    overflow-x: hidden;
}
.checkout-col-form input,
.checkout-col-form select,
.checkout-col-form textarea {
    max-width: 100%;
    min-width: 0;
}
.checkout-col-order {
    overflow-x: hidden;
    min-width: 0;
}
/* Order Review */
.checkout-review-items { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.checkout-review-item {
    display: grid;
    grid-template-columns: 4rem 1fr auto;
    gap: 0.875rem;
    align-items: start;
    min-width: 0;
}
.checkout-review-item > div:nth-of-type(2) { min-width: 0; overflow-wrap: break-word; }
.checkout-review-item-img {
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-secondary);
}
.checkout-review-item-img img { width: 100%; height: 100%; object-fit: cover; }
.checkout-review-item-name { font-size: 0.9rem; font-weight: 500; line-height: 1.35; }
.checkout-review-item-qty { font-size: 0.8125rem; color: var(--color-muted-fg); }
.checkout-review-item-price { font-size: 0.9375rem; font-weight: 600; color: var(--color-primary); white-space: nowrap; }
.checkout-review-table,
.woocommerce-checkout-review-order-table {
    width: 100%;
    table-layout: fixed;
    border-top: 1px solid var(--color-border);
    border-collapse: collapse;
    margin-top: 0.75rem;
    min-width: 0;
}
.checkout-review-table tr:empty { display: none; }
.checkout-review-table td,
.checkout-review-table th,
.woocommerce-checkout-review-order-table td,
.woocommerce-checkout-review-order-table th {
    padding: 0.625rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: break-word;
}
.checkout-review-table td:last-child,
.woocommerce-checkout-review-order-table td:last-child { text-align: right; font-weight: 500; }
.checkout-review-table .order-total td,
.woocommerce-checkout-review-order-table .order-total td { font-weight: 700; font-size: 1.0625rem; color: var(--color-primary); }
#order_review,
.woocommerce-checkout-review-order {
    overflow-x: hidden;
    min-width: 0;
}
/* Checkout Fields */
.theme-checkout-field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.theme-checkout-field-row.two-col { grid-template-columns: 1fr 1fr; }
.theme-checkout-field-row.three-col { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 480px) {
    .theme-checkout-field-row.two-col,
    .theme-checkout-field-row.three-col { grid-template-columns: 1fr; }
}
.theme-checkout-field { display: flex; flex-direction: column; gap: 0.375rem; }
.theme-checkout-page .theme-checkout-label { display: none !important; }
.theme-checkout-input,
.theme-checkout-select,
.theme-checkout-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--color-card);
    color: var(--color-foreground);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.theme-checkout-input::placeholder,
.theme-checkout-textarea::placeholder { color: var(--color-muted-fg); opacity: 1; }
.theme-checkout-input:focus,
.theme-checkout-select:focus,
.theme-checkout-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}
.theme-checkout-textarea { resize: vertical; min-height: 5rem; }
.theme-btn-primary {
    display: block;
    width: 100%;
    padding: 0.9375rem 1.5rem;
    background: var(--color-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--transition);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.theme-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 30px color-mix(in srgb, var(--color-primary) 30%, transparent); }
#place_order { width: 100%; padding: 0.9375rem 1.5rem; background: var(--color-primary); color: #fff; font-size: 1rem; font-weight: 600; border-radius: var(--radius); border: none; cursor: pointer; }
.theme-checkout-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-primary);
    transition: color 0.2s;
    margin-bottom: 2rem;
}
.theme-checkout-back-link:hover { color: var(--color-wood-brown); }
.theme-checkout-notices { margin-bottom: 1.5rem; }
body.theme-checkout .theme-checkout-notices .woocommerce-message { display: none; }
/* WooCommerce checkout form */
/* Select2: ancho controlado para evitar scroll horizontal */
.select2-container { width: 100% !important; max-width: 100%; }
.woocommerce-checkout .select2-container { min-width: 0; }
.select2-dropdown {
    max-width: min(100%, calc(100vw - 2rem));
    min-width: 0;
    box-sizing: border-box;
}
/* Evitar scroll horizontal: clase aplicada en select2:opening (antes de pintar) + :has() por si acaso */
html.select2-dropdown-open,
body.select2-dropdown-open {
    overflow-x: hidden !important;
}
html:has(.select2-container--open),
body:has(.select2-container--open) {
    overflow-x: hidden !important;
}
.woocommerce-checkout .form-row select { max-width: 100%; }
@media (max-width: 767px) {
    .select2-dropdown {
        max-width: calc(100vw - 2rem) !important;
        overflow-x: hidden;
    }
    html.select2-dropdown-open,
    body.select2-dropdown-open,
    html:has(.select2-container--open),
    body:has(.select2-container--open) {
        overflow-x: hidden !important;
    }
}
.select2-results__option, .select2-selection__rendered { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select2-selection--single {
    height: auto !important;
    padding: 0.6875rem 0.875rem !important;
    border: 1.5px solid var(--color-border) !important;
    border-radius: var(--radius) !important;
    font-size: 0.9375rem !important;
    background: var(--color-card) !important;
}
.select2-selection__rendered { line-height: normal !important; padding: 0 !important; color: var(--color-foreground) !important; }
.select2-selection__arrow { top: 50% !important; transform: translateY(-50%) !important; }
.woocommerce-checkout .form-row { margin-bottom: 0; padding: 0; }
.theme-checkout-page .woocommerce-checkout .form-row label { display: none !important; }
.theme-checkout-page .woocommerce-checkout .form-row input,
.theme-checkout-page .woocommerce-checkout .form-row select,
.theme-checkout-page .woocommerce-checkout .form-row textarea {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius) !important;
    font-size: 0.875rem !important;
    background: var(--color-card) !important;
    color: var(--color-foreground) !important;
    outline: none !important;
}
.theme-checkout-page .woocommerce-checkout .form-row input::placeholder,
.theme-checkout-page .woocommerce-checkout .form-row textarea::placeholder { color: var(--color-muted-fg) !important; opacity: 1 !important; }
.theme-checkout-page .woocommerce-checkout .form-row input:focus,
.theme-checkout-page .woocommerce-checkout .form-row select:focus,
.theme-checkout-page .woocommerce-checkout .form-row textarea:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 1px var(--color-primary) !important;
}
.theme-checkout-page .theme-checkout-input,
.theme-checkout-page .theme-checkout-select,
.theme-checkout-page .theme-checkout-textarea {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius) !important;
    font-size: 0.875rem !important;
    background: var(--color-card) !important;
    color: var(--color-foreground) !important;
}
.theme-checkout-page .theme-checkout-input:focus,
.theme-checkout-page .theme-checkout-select:focus,
.theme-checkout-page .theme-checkout-textarea:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 1px var(--color-primary) !important;
}
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info {
    padding: 0.875rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9375rem; list-style: none;
}
.woocommerce-notices-wrapper .woocommerce-error { background: rgba(192,57,43,0.08); border-left: 3px solid #c0392b; color: #c0392b; }
.woocommerce-notices-wrapper .woocommerce-message { background: color-mix(in srgb, var(--color-accent) 8%, transparent); border-left: 3px solid var(--color-accent); color: var(--color-accent); }
.woocommerce-notices-wrapper .woocommerce-info { background: color-mix(in srgb, var(--color-primary) 8%, transparent); border-left: 3px solid var(--color-primary); color: var(--color-primary); }
.woocommerce-error li { list-style: disc; margin-left: 1rem; margin-bottom: 0.25rem; }
.payment_method_stripe .payment_box, .wc-upe-form { overflow-x: hidden; }
#payment .payment_methods { list-style: none; list-style-type: none; }
#payment .payment_methods li { list-style-type: none; padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
#payment .payment_methods li label { cursor: pointer; display: flex; align-items: center; gap: 0.5rem; }
#payment .payment_box { padding: 1rem; background: var(--color-secondary); border-radius: var(--radius); margin-top: 0.5rem; }
.woocommerce-checkout-payment { margin-top: 1.5rem; }
.woocommerce-privacy-policy-text { font-size: 0.8125rem; color: var(--color-muted-fg); margin-bottom: 1rem; line-height: 1.5; }
.woocommerce-terms-and-conditions-wrapper { margin-bottom: 1rem; }

/* Thank You Page */
.theme-thankyou-page .theme-main-content { padding-top: 6rem; }
@media (min-width: 1024px) { .theme-thankyou-page .theme-main-content { padding-top: 7rem; } }
.woocommerce-thankyou-order-received { font-size: 1.125rem; color: var(--color-foreground); margin-bottom: 0.5rem; }
.woocommerce-order-details { margin: 1rem 0 2rem; }
.woocommerce-order-details h2 { font-family: var(--font-display); font-size: 1.125rem; margin-bottom: 1rem; }
.woocommerce-table--order-details { width: 100%; border-collapse: collapse; }
.woocommerce-table--order-details th, .woocommerce-table--order-details td { padding: 0.625rem 0; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
.woocommerce-table--order-details th { font-weight: 600; }
.woocommerce-customer-details address { font-style: normal; line-height: 1.75; color: var(--color-muted-fg); }

/* Cart empty state on checkout */
.theme-cart-empty-checkout { padding: 4rem 0; text-align: center; }
.theme-cart-empty-checkout p { font-size: 1.125rem; margin-bottom: 1.5rem; color: var(--color-muted-fg); }

/* ─── WOOCOMMERCE GENERAL OVERRIDES ─────────────────────────── */
.woocommerce-product-gallery,
.woocommerce-tabs { display: none !important; }
.woocommerce-message:before, .woocommerce-error:before, .woocommerce-info:before { display: none; }
body.single-product .woocommerce-message .wc-forward,
body.single-product .woocommerce-message a[href*="cart"] { display: none !important; }

/* ─── Utility classes (match React) ─────────────────────────── */
.bg-warm-amber { background-color: var(--warm-amber); }
.text-warm-amber { color: var(--warm-amber); }
.bg-sage-green { background-color: var(--sage-green); }
.text-sage-green { color: var(--sage-green); }
.bg-wood-brown { background-color: var(--color-wood-brown); }
.text-wood-brown { color: var(--color-wood-brown); }

/* ─── RESPONSIVE UTILITIES (match React mobile) ───────────────── */
@media (max-width: 767px) {
    .theme-main-content,
    .theme-page-content,
    .theme-checkout-page,
    .theme-single-product {
        max-width: 100%;
        min-width: 0;
    }
    .theme-checkout-page { overflow-x: hidden; }
    .theme-checkout-page .checkout-review-item { grid-template-columns: 3rem 1fr auto; }
    iframe, embed, object { max-width: 100%; }
    .theme-single-product .container-wide,
    .theme-single-product-wrap { padding-inline: 1.5rem; }
    .theme-logo-text { font-size: 1.125rem; }
    .theme-footer-grid { gap: 2rem; }
    .theme-contact-grid { gap: 2rem; }
    .theme-hero-title { font-size: 2.25rem; }
    .theme-hero-subtitle { font-size: 1.125rem; }
    .theme-section-title { font-size: 1.875rem; }
    .theme-product-layout { grid-template-columns: 1fr; }
}

/* ─── ADMIN CAPACITY SETTINGS PAGE ─────────────────────────── */
.theme-admin-page h1 { font-size: 1.75rem; margin-bottom: 1.5rem; }
.theme-admin-page .form-table th { padding: 1rem 0.5rem; }
.theme-admin-page input[type="number"] { max-width: 6rem; }

/* ─── PRINT / A11Y ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
