/* ==========================================================================
   CCTXV Store — design system matching the main site
   Tokens ported from the site Tailwind config (primary blue scale, Inter,
   class-based dark mode).
   ========================================================================== */

:root {
    --p50: #eff6ff;  --p100: #dbeafe; --p200: #bfdbfe; --p300: #93c5fd;
    --p400: #60a5fa; --p500: #3b82f6; --p600: #2563eb; --p700: #1d4ed8;
    --p800: #1e40af; --p900: #1e3a8a;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-card: #f9fafb;
    --surface: #f3f4f6;
    --text: #111827;
    --text-soft: #4b5563;
    --text-mute: #6b7280;
    --border: #e5e7eb;
    --header-bg: transparent;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --radius: 1rem;
    --radius-lg: 1.5rem;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(59, 130, 246, 0.25);
    --header-h: 6rem;
}

html.dark {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --bg-card: #1e293b;
    --surface: #1e293b;
    --text: #ffffff;
    --text-soft: #cbd5e1;
    --text-mute: #94a3b8;
    --border: #334155;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s, color .3s;
    line-height: 1.5;
}
img { max-width: 100%; height: auto; }
a { color: var(--p600); text-decoration: none; transition: color .2s; }
html.dark a { color: var(--p400); }
a:hover { color: var(--p700); }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; color: var(--text); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }
.container-narrow { max-width: 56rem; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.page-section { padding: 5rem 0; }
@media (min-width: 1024px) { .page-section { padding: 8rem 0; } }
main#main-content { min-height: 60vh; }

/* ---------- Accessibility ---------- */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--p600); color: #fff; padding: .5rem 1rem; border-radius: .5rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--p500); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Header ---------- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    transition: background .3s, box-shadow .3s;
}
.site-header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--glass-border);
}
.header-row {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-h);
}
.site-logo .logo-img { height: 5rem; width: auto; display: block; }
.site-logo img { max-height: 5rem; width: auto; }
.custom-logo { max-height: 5rem; width: auto; }
.logo-img-sm { height: 4rem; width: auto; }

.nav-desktop { display: none; align-items: center; gap: .875rem; }
/* 10 nav items + Login/cart/toggle/CTA need 1280px; below that the burger takes over. */
@media (min-width: 1280px) { .nav-desktop { display: flex; } }
.nav-link {
    position: relative; color: var(--text-soft); font-weight: 400; font-size: 1rem;
}
.nav-link::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--p500); transition: width .3s;
}
.nav-link:hover::after, .nav-link-active::after { width: 100%; }
.nav-link-active { color: var(--p600); font-weight: 600; }
html.dark .nav-link-active { color: var(--p400); }

.icon-btn {
    width: 2.75rem; height: 2.75rem; border-radius: .5rem; border: 0; cursor: pointer;
    background: var(--surface); color: var(--text); display: inline-flex;
    align-items: center; justify-content: center;
}
html:not(.dark) .icon-moon { display: none; }
html.dark .icon-sun { display: none; }
.icon-sun { color: #eab308; }
.icon-moon { color: var(--p400); }

.cart-link {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; border-radius: .5rem; background: var(--surface);
    color: var(--text);
}
.cart-count {
    position: absolute; top: -6px; right: -6px; min-width: 1.25rem; height: 1.25rem;
    border-radius: 9999px; background: var(--p600); color: #fff;
    font-size: .7rem; font-weight: 700; display: flex; align-items: center;
    justify-content: center; padding: 0 .25rem;
}

.nav-mobile-btns { display: flex; align-items: center; gap: .75rem; }
@media (min-width: 1280px) { .nav-mobile-btns { display: none; } }
.mobile-menu-btn {
    background: none; border: 0; font-size: 1.5rem; color: var(--text); cursor: pointer;
    min-width: 2.75rem; min-height: 2.75rem;
}
.mobile-menu {
    border-radius: var(--radius); margin-top: .5rem; padding: 1rem;
    background: var(--bg); border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; gap: 1rem;
}
.mobile-menu a { color: var(--text-soft); padding: .75rem 0; display: block; }
.mobile-menu a.nav-link-active { color: var(--p600); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    background: var(--p600); color: #fff !important; border: 0; cursor: pointer;
    padding: 1rem 2rem; border-radius: 9999px; font-weight: 500; font-size: 1rem;
    transition: background .2s, transform .2s;
}
.btn-primary:hover { background: var(--p700); transform: translateY(-2px); }
.btn-sm { padding: .625rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; text-align: center; }
.btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    background: var(--bg); color: var(--text) !important;
    border: 2px solid var(--border); padding: 1rem 2rem; border-radius: 9999px;
    font-weight: 500; transition: background .2s;
}
.btn-outline:hover { background: var(--bg-alt); }
html.dark .btn-outline { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }

/* ---------- Hero ---------- */
.hero-gradient { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 50%, #a5b4fc 100%); }
html.dark .hero-gradient { background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a8a 100%); }
.hero-store {
    min-height: 85vh; display: flex; align-items: center;
    position: relative; overflow: hidden; padding: calc(var(--header-h) + 3rem) 0 4rem;
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.hero-blob-1 { top: 5rem; left: 2.5rem; width: 18rem; height: 18rem; background: rgba(96,165,250,.2); }
.hero-blob-2 { bottom: 5rem; right: 2.5rem; width: 24rem; height: 24rem; background: rgba(37,99,235,.2); }
.hero-grid { position: relative; z-index: 1; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1fr 1fr; } }
.hero-copy { text-align: center; }
@media (min-width: 1024px) { .hero-copy { text-align: left; } }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--p100); border: 1px solid var(--p200);
    border-radius: 9999px; padding: .5rem 1rem; margin-bottom: 1.5rem;
    font-size: .875rem; color: var(--p700);
}
html.dark .hero-badge { background: rgba(30,58,138,.3); border-color: var(--p700); color: var(--p300); }
.hero-badge-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #22c55e; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 50% { opacity: .4; } }
.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700;
    margin: 0 0 1.5rem; letter-spacing: normal;
}
h1, h2 { line-height: 1; }
h3 { line-height: 1.2; }
.hero-desc { font-size: 1.125rem; color: var(--text-soft); margin: 0 0 2rem; max-width: 36rem; }
@media (min-width: 1024px) { .hero-desc { margin-left: 0; } }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 3rem; }
@media (min-width: 1024px) { .hero-cta-row { justify-content: flex-start; } }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 32rem; margin: 0 auto; }
@media (min-width: 1024px) { .hero-stats { margin: 0; } }
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.875rem; font-weight: 700; color: var(--p600); }
html.dark .stat-num { color: var(--p400); }
.stat-label { font-size: .875rem; color: var(--text-mute); }

.hero-visual { display: none; }
@media (min-width: 1024px) { .hero-visual { display: block; } }
.hero-card {
    max-width: 24rem; margin: 0 auto; padding: 2rem; text-align: center;
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
    transform: rotate(3deg); transition: transform .5s;
}
.hero-card:hover { transform: rotate(0); }
.hero-card-icon { font-size: 5rem; color: var(--p600); margin-bottom: 1rem; }
.hero-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.hero-mini {
    background: var(--bg); border-radius: var(--radius); padding: 1rem;
    box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .5rem;
    align-items: center; font-size: .75rem; color: var(--text-soft);
}
.hero-mini i { font-size: 1.75rem; color: var(--p500); }
.glass { background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); }
.float { animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Sections ---------- */
.section-head { text-align: center; max-width: 48rem; margin: 0 auto 4rem; }
.section-subtitle {
    color: var(--p600); font-weight: 600; font-size: .875rem;
    text-transform: uppercase; letter-spacing: .05em;
 line-height: 20px;}
.section-title { font-size: clamp(1.875rem, 4vw, 3rem); margin: 1rem 0 1.5rem; }
.section-desc { color: var(--text-soft); font-size: 1.125rem; }
.section-cta { margin-top: 3rem; }
.gradient-text {
    background: linear-gradient(135deg, var(--p500), var(--p600), var(--p700));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.page-title { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 1.5rem; }
.entry-meta { color: var(--text-mute); font-size: .9rem; margin-bottom: 2rem; }
.entry-thumb { margin-bottom: 2rem; border-radius: var(--radius); overflow: hidden; }
.entry-list { display: grid; gap: 1.5rem; }
.entry-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 2rem;
    box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s;
}
.entry-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.entry-title { font-size: 1.5rem; margin: 0 0 .75rem; }
.entry-title a { color: var(--text); }
.entry-excerpt { color: var(--text-soft); }
.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: var(--radius); }

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--bg-alt); padding: 3rem 0; border-top: 1px solid var(--border); }
.trust-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; align-items: center; gap: 1rem; }
.trust-item i { font-size: 1.75rem; color: var(--p600); }
html.dark .trust-item i { color: var(--p400); }
.trust-item strong { display: block; font-size: .95rem; }
.trust-item span { font-size: .8rem; color: var(--text-mute); }

/* ---------- Footer ---------- */
.site-footer { background: #f3f4f6; border-top: 1px solid var(--border); }
html.dark .site-footer { background: #0f172a; }
.footer-inner { padding-top: 3rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-desc { color: var(--text-soft); margin: 1rem 0 1.5rem; max-width: 28rem; }
.footer-heading { font-size: 1rem; margin: 0 0 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: var(--text-soft); }
.footer-links a:hover { color: var(--p600); }
.social-links { display: flex; gap: 1rem; }
.social-links a {
    width: 2.75rem; height: 2.75rem; border-radius: .5rem;
    background: var(--bg-card); color: var(--text-soft);
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s;
}
.social-links a:hover { background: var(--p600); color: #fff; }
.footer-bottom {
    border-top: 1px solid var(--border); margin-top: 3rem; padding: 2rem 0;
    display: flex; flex-direction: column; gap: .5rem;
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-copy { font-size: .875rem; color: var(--text-mute); margin: 0; }
.footer-heart { color: #ef4444; }
.footer-admin { font-size: .875rem; color: var(--text-mute); text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.footer-admin:hover { color: var(--primary-600); }

/* ---------- Floating action buttons ---------- */
.fab-stack { position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 40; display: flex; flex-direction: column; gap: .75rem; }
/* Scoped: a bare .fab rule also hits Font Awesome's `fab` (brands) icons. */
.fab-stack .fab {
    width: 3.5rem; height: 3.5rem; border-radius: 50%; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; box-shadow: var(--shadow); transition: transform .2s;
}
.fab-stack .fab:hover { transform: scale(1.1); color: #fff; }
.fab-whatsapp { background: #22c55e; }
.fab-whatsapp:hover { background: #16a34a; }
.fab-phone { background: var(--p600); }
.fab-phone:hover { background: var(--p700); }
.pulse-glow { animation: pg 2s ease-in-out infinite; }
@keyframes pg {
    0%, 100% { box-shadow: 0 0 20px rgba(59,130,246,.5); }
    50% { box-shadow: 0 0 40px rgba(59,130,246,.8); }
}

/* ---------- Scroll reveal ---------- */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
.fade-in.visible { opacity: 1; transform: none; }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="search"], input[type="url"], select, textarea,
.cctxv-input {
    width: 100%; padding: .75rem 1rem; border-radius: .75rem;
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    font: inherit; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--p500); box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}
label { display: block; font-size: .875rem; font-weight: 500; color: var(--text-soft); margin-bottom: .35rem; }
.required { color: #ef4444; }

/* ---------- Comments ---------- */
.comments-area { margin-top: 3rem; border-top: 1px solid var(--border); padding-top: 2rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.comment-list .children { list-style: none; margin-left: 2rem; }
.comment-respond input[type="submit"],
.form-submit .submit {
    display: inline-flex; background: var(--p600); color: #fff; border: 0; cursor: pointer;
    padding: .75rem 2rem; border-radius: 9999px; font-weight: 600;
}
.comment-respond input[type="submit"]:hover { background: var(--p700); }

/* ---------- Pagination ---------- */
.nav-links, .woocommerce-pagination ul {
    display: flex; gap: .5rem; justify-content: center; margin-top: 3rem;
    list-style: none !important; padding: 0; border: 0 !important;
}
.nav-links a, .nav-links span, .woocommerce-pagination a, .woocommerce-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem;
    border-radius: .5rem; background: var(--surface); color: var(--text) !important;
    border: 0 !important;
}
.nav-links .current, .woocommerce-pagination .current {
    background: var(--p600); color: #fff !important;
}
.nav-links a:hover, .woocommerce-pagination a:hover { background: var(--p200); color: var(--text) !important; }
html.dark .nav-links a:hover, html.dark .woocommerce-pagination a:hover { background: var(--p800); }

/* ---------- 404 ---------- */
.section-hero { padding-top: calc(var(--header-h) + 4rem); }
.hero-code { font-size: 6rem; font-weight: 800; margin: 0; color: var(--p200); }
html.dark .hero-code { color: var(--p800); }

/* ==========================================================================
   WooCommerce
   ========================================================================== */

.woo-wrap { padding-top: calc(var(--header-h) + 1.5rem); }
html { scroll-padding-top: calc(var(--header-h) + 1rem); }
/* Las plantillas de WC no usan .woo-wrap: la primera sección debe compensar el header fijo */
body:not(.home) main#main-content > .page-section:first-child { padding-top: calc(var(--header-h) + 1.5rem); }

/* Breadcrumb */
.woo-breadcrumb, .woocommerce-breadcrumb {
    font-size: .875rem; color: var(--text-mute); margin-bottom: 2rem;
}
.woo-breadcrumb a, .woocommerce-breadcrumb a { color: var(--text-soft); }

/* Shop loop grid */
ul.products {
    display: grid; gap: 1.5rem; list-style: none !important;
    margin: 0; padding: 0;
    grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 640px) { ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { ul.products { grid-template-columns: repeat(4, 1fr); } }
ul.products li.product {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; margin: 0 !important;
    padding: 0 0 1.25rem; width: auto !important; float: none !important;
    transition: transform .3s, box-shadow .3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    display: flex; flex-direction: column; position: relative;
}
ul.products li.product:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
ul.products li.product a { color: var(--text); display: block; }
ul.products li.product img {
    width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
    margin: 0 !important; display: block;
}
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2 {
    font-size: 1.05rem; font-weight: 600; padding: 1rem 1.25rem .25rem; margin: 0;
    color: var(--text);
}
ul.products li.product .price {
    padding: 0 1.25rem; display: block; font-weight: 700; font-size: 1.1rem;
    color: var(--p600); margin: .5rem 0;
}
html.dark ul.products li.product .price { color: var(--p400); }
ul.products li.product .price del { color: var(--text-mute); font-weight: 400; margin-right: .4rem; }
ul.products li.product .price ins { text-decoration: none; }
ul.products li.product .star-rating { margin: .25rem 1.25rem; }

/* Buttons (WC uses .button everywhere) */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.added_to_cart,
ul.products li.product .button, .single_add_to_cart_button,
#place_order, .wp-block-button__link {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    background: var(--p600) !important; color: #fff !important; border: 0;
    padding: .7rem 1.5rem; border-radius: 9999px; font-weight: 600; font-size: .9rem;
    min-height: 2.75rem; cursor: pointer; transition: background .2s, transform .2s; line-height: 1.4;
    margin: .25rem 1.25rem;
}
.woocommerce a.button:hover, .woocommerce button.button:hover,
ul.products li.product .button:hover, .single_add_to_cart_button:hover,
#place_order:hover {
    background: var(--p700) !important; transform: translateY(-1px);
}
.woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--p600) !important; }
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--p700) !important; }
.woocommerce .button:disabled, .woocommerce .button.disabled {
    opacity: .6; cursor: not-allowed;
}
.woocommerce a.added_to_cart { background: var(--surface) !important; color: var(--text) !important; }

/* Sale badge */
.onsale {
    position: absolute; top: .75rem; left: .75rem; z-index: 2;
    background: #ef4444; color: #fff; font-size: .8rem; font-weight: 700;
    padding: .3rem .75rem; border-radius: 9999px; min-height: 0; line-height: 1.4;
}

/* Stock */
.stock { font-weight: 600; }
.stock.in-stock { color: #16a34a; }
.stock.out-of-stock { color: #ef4444; }

/* Result count / ordering */
.woocommerce-result-count { color: var(--text-mute); font-size: .9rem; }
.woocommerce-ordering select { width: auto; min-width: 12rem; }
.woocommerce-result-count, .woocommerce-ordering { margin-bottom: 1.5rem; }

/* Star rating */
.star-rating { color: #eab308; }

/* Star ratings: the theme disables WooCommerce CSS, so we ship the needed rules */
.star-rating {
    display: inline-block; overflow: hidden; position: relative;
    height: 1em; line-height: 1; font-size: 1em; width: 5.4em;
    font-family: 'WooCommerce'; color: #eab308;
}
.star-rating::before {
    content: '\73\73\73\73\73'; color: #d3ced2;
    float: left; top: 0; left: 0; position: absolute;
}
.star-rating span {
    overflow: hidden; float: left; top: 0; left: 0;
    position: absolute; padding-top: 1.5em;
}
.star-rating span::before { content: '\53\53\53\53\53'; top: 0; position: absolute; left: 0; }

/* Review form stars */
p.stars { display: inline-flex; align-items: center; gap: .15rem; margin: .35rem 0 1rem; }
p.stars a {
    position: relative; display: inline-block;
    width: 1.5em; height: 1.5em; text-indent: -999em;
    text-decoration: none; margin: 0;
}
p.stars a::before {
    display: block; position: absolute; top: 0; left: 0;
    width: 1.5em; height: 1.5em; line-height: 1.5;
    font-family: 'WooCommerce'; font-size: 1.15rem;
    content: '\e021'; text-indent: 0; color: #cbd5e1;
    transition: color .15s ease;
}
p.stars a:hover::before,
p.stars a:focus::before { content: '\e020'; color: #eab308; }
p.stars:hover a::before { content: '\e020'; color: #eab308; }
p.stars a:hover ~ a::before { content: '\e021'; color: #cbd5e1; }
p.stars.selected a.active::before,
p.stars.selected a.active ~ a::before,
p.stars.selected a:not(.active)::before { content: '\e020'; color: #eab308; }
p.stars.selected a.active ~ a::before { color: #cbd5e1; }

/* La imagen siempre se ve completa dentro de un recuadro cuadrado */
.single-product .woocommerce-product-gallery .flex-viewport {
    aspect-ratio: 1 / 1;
    height: auto !important;
}
.single-product .woocommerce-product-gallery .flex-viewport > ul { height: 100% !important; }
.single-product .woocommerce-product-gallery .flex-viewport li { height: 100% !important; }
.single-product .woocommerce-product-gallery .flex-viewport img {
    width: 100% !important; height: 100% !important; object-fit: contain;
}
.single-product .woocommerce-product-gallery .flex-viewport a { display: block; height: 100%; }

.single-product .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
}
.single-product .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image > a {
    position: absolute; inset: 0; display: block;
}
.single-product .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: contain;
}

/* Review list (no numbering, compact avatar, stars on top) */
#tab-reviews ol.commentlist,
#tab-reviews .comment-list { list-style: none; margin: 0; padding: 0; }
#tab-reviews .comment_container {
    display: grid; grid-template-columns: 48px 1fr; gap: .25rem 1rem;
    align-items: start; padding: 1.1rem 0; border-bottom: 1px solid var(--border);
}
#tab-reviews .comment_container > img.avatar {
    width: 48px; height: 48px; border-radius: 50%; grid-row: 1 / span 3;
    border: 1px solid var(--border);
}
#tab-reviews .comment-text { margin: 0; }
#tab-reviews .comment-text .star-rating { margin: 0 0 .35rem; font-size: .9em; }
#tab-reviews .comment-text .meta { margin: 0 0 .5rem; font-size: .85rem; color: var(--text-mute); }
#tab-reviews .comment-text .description p { margin: 0; }
#tab-reviews .comment-text .description { color: var(--text-soft); }
@media (max-width: 480px) {
    #tab-reviews .comment_container { grid-template-columns: 40px 1fr; gap: .2rem .75rem; }
    #tab-reviews .comment_container > img.avatar { width: 40px; height: 40px; }
}

/* Single product */
.single-product div.product { display: block; position: relative; }
.product-main { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) {
    .product-main { grid-template-columns: 1fr 1fr; align-items: start; }
    /* La galería se fija, pero solo dentro de .product-main (no llega a las pestañas) */
    .product-main .woocommerce-product-gallery { position: sticky; top: calc(var(--header-h) + 1rem); }
}
.single-product .product_title { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-top: 0; }
.single-product .price { font-size: 1.75rem; font-weight: 700; color: var(--p600); }
html.dark .single-product .price { color: var(--p400); }
.single-product .price del { font-size: 1.15rem; color: var(--text-mute); font-weight: 400; }
.single-product .woocommerce-product-details__short-description { color: var(--text-soft); margin: 1rem 0 1.5rem; }
.single-product form.cart { display: flex; gap: 1rem; align-items: center; margin: 1.5rem 0; }
.single-product .quantity input { width: 5rem; text-align: center; }
.single-product .single_add_to_cart_button { margin: 0; padding: .8rem 2rem; font-size: 1rem; }
.product_meta { color: var(--text-mute); font-size: .85rem; border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.product_meta > span { display: block; margin-bottom: .25rem; }

/* Gallery */
.woocommerce-product-gallery { border-radius: var(--radius); overflow: hidden; }
.woocommerce-product-gallery img { border-radius: var(--radius); }

/* Gallery: click opens the lightbox (hover zoom is disabled) */
.woocommerce-product-gallery__image a { cursor: zoom-in; display: block; position: relative; }
.woocommerce-product-gallery__image a::after {
    content: "\f00e"; /* magnifying-glass-plus */
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; right: 1rem; bottom: 1rem;
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    background: rgba(15, 23, 42, .7); color: #fff; font-size: .9rem;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.woocommerce-product-gallery__image a:hover::after,
.woocommerce-product-gallery__image a:focus-visible::after { opacity: 1; }

/* Gallery thumbnails: vertical strip on the left (desktop) / row below (mobile) */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
    list-style: none; margin: .75rem 0 0; padding: 0;
    display: flex; flex-direction: row; gap: .5rem; overflow-x: auto;
    scrollbar-width: none;
}
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs::-webkit-scrollbar { display: none; }
.woocommerce-product-gallery .flex-control-thumbs li { flex: 0 0 64px; margin: 0; }
.woocommerce-product-gallery .flex-control-thumbs img {
    width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
    border-radius: 10px; border: 2px solid transparent; background: var(--bg-alt);
    cursor: pointer; opacity: .75; transition: opacity .2s, border-color .2s;
}
.woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active { border-color: var(--p600); opacity: 1; }

@media (min-width: 768px) {
    .single-product .woocommerce-product-gallery {
        display: grid;
        gap: 1rem;
        align-items: start;
    }
    /* Con miniaturas: columna a la izquierda. Sin miniaturas: imagen a todo el ancho */
    .single-product .woocommerce-product-gallery:has(.flex-control-thumbs) { grid-template-columns: 84px minmax(0, 1fr); }
    .single-product .woocommerce-product-gallery:not(:has(.flex-control-thumbs)) { grid-template-columns: minmax(0, 1fr); }
    .single-product .woocommerce-product-gallery .flex-viewport { grid-column: 2; grid-row: 1; order: 2; }
    .single-product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
        grid-column: 1; grid-row: 1; order: 1;
        flex-direction: column; flex-wrap: nowrap;
        margin: 0; overflow-x: hidden; overflow-y: auto;
        max-height: 520px;
    }
    .single-product .woocommerce-product-gallery .flex-control-thumbs li { flex: 0 0 auto; width: 100%; }
    /* El badge de oferta va sobre la imagen principal, no sobre las miniaturas */
    .single-product .product-main:has(.flex-control-thumbs) > .onsale { left: calc(84px + 1rem + .75rem); }
}

/* Tabs */
.woocommerce-tabs { grid-column: 1 / -1; margin-top: 2rem; }
.woocommerce-tabs ul.tabs {
    list-style: none; display: flex; gap: .5rem; padding: 0; margin: 0 0 1.5rem;
    border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.woocommerce-tabs ul.tabs li { margin: 0; }
.woocommerce-tabs ul.tabs li a {
    display: block; padding: .75rem 1.25rem; color: var(--text-soft); font-weight: 600;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.woocommerce-tabs ul.tabs li.active a { color: var(--p600); border-bottom-color: var(--p500); }

/* Related / upsells */
.related.products, .upsells.products { grid-column: 1 / -1; margin-top: 3rem; }
.related.products > h2, .upsells.products > h2, .cross-sells > h2 {
    font-size: 1.75rem; margin-bottom: 1.5rem;
}
.related ul.products, .upsells ul.products { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .related ul.products, .upsells ul.products { grid-template-columns: repeat(4, 1fr); } }

/* Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
    border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem;
    border: 1px solid var(--border); background: var(--bg-card);
    border-left: 4px solid var(--p500); color: var(--text); list-style: none;
}
.woocommerce-message { border-left-color: #22c55e; }
.woocommerce-error { border-left-color: #ef4444; }
.woocommerce-message a, .woocommerce-info a { font-weight: 600; }
.woocommerce-error li { list-style: none; }

/* Cart */
.woocommerce-cart table.cart {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden;
}
.woocommerce-cart table.cart th, .woocommerce-cart table.cart td {
    padding: 1rem; text-align: left; border-bottom: 1px solid var(--border);
    color: var(--text);
}
.woocommerce-cart table.cart tr:last-child td { border-bottom: 0; }
.woocommerce-cart table.cart img { width: 4rem; border-radius: .5rem; }
.woocommerce-cart .product-remove a.remove {
    color: #ef4444 !important; font-size: 1.25rem; display: inline-block;
    width: 1.75rem; height: 1.75rem; line-height: 1.75rem; text-align: center;
    border-radius: 50%;
}
.woocommerce-cart .product-remove a.remove:hover { background: #fee2e2; }
html.dark .woocommerce-cart .product-remove a.remove:hover { background: rgba(239,68,68,.2); }
.cart-collaterals { margin-top: 2rem; }
.cart_totals {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; max-width: 28rem; margin-left: auto;
}
.cart_totals h2 { font-size: 1.25rem; margin-top: 0; }
.cart_totals table { width: 100%; border-collapse: collapse; }
.cart_totals th, .cart_totals td { padding: .6rem 0; border-bottom: 1px solid var(--border); text-align: left; }
.cart_totals tr:last-child th, .cart_totals tr:last-child td { border-bottom: 0; }
.cart_totals .order-total { font-size: 1.2rem; font-weight: 700; }
.cart_totals .wc-proceed-to-checkout { margin-top: 1rem; text-align: center; }
.cart_totals .checkout-button { width: 100%; margin: 0; }
.coupon input[type="text"] { width: auto; min-width: 10rem; }

/* Quantity */
.quantity input.qty { width: 5rem; padding: .5rem; text-align: center; border-radius: .5rem; border: 1px solid var(--border); background: var(--bg); color: var(--text); }

/* Checkout */
.woocommerce-checkout .col2-set { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .woocommerce-checkout .col2-set { grid-template-columns: 1fr 1fr; } }
.woocommerce-checkout .form-row { margin-bottom: 1rem; }
.woocommerce-checkout-review-order-table,
.woocommerce-checkout #order_review table {
    width: 100%; border-collapse: collapse; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.woocommerce-checkout-payment {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; margin-top: 1.5rem;
}
.woocommerce-checkout-payment ul.payment_methods { list-style: none; padding: 0; margin: 0 0 1rem; }
.woocommerce-checkout-payment li.payment_box { background: var(--surface); border-radius: .5rem; padding: 1rem; margin: .5rem 0; }
#place_order { width: 100%; margin: 1rem 0 0; padding: 1rem; font-size: 1.05rem; }
.woocommerce-checkout #ship-to-different-address { font-size: .95rem; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea {
    padding: .75rem 1rem;
}
.select2-container .select2-selection--single {
    height: auto; padding: .6rem 1rem; border: 1px solid var(--border);
    border-radius: .75rem; background: var(--bg); color: var(--text);
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); line-height: 1.5; }
.select2-container--default .select2-selection--single .select2-selection__arrow { top: .5rem; }

/* My Account */
.woocommerce-MyAccount-navigation ul {
    list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem;
}
.woocommerce-MyAccount-navigation ul li a {
    display: block; padding: .6rem 1.25rem; border-radius: 9999px;
    background: var(--surface); color: var(--text-soft); font-weight: 500;
}
.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover { background: var(--p600); color: #fff; }
.woocommerce-MyAccount-content .woocommerce-orders-table { width: 100%; border-collapse: collapse; }
.woocommerce-MyAccount-content table th,
.woocommerce-MyAccount-content table td { padding: .75rem; border-bottom: 1px solid var(--border); text-align: left; }
.woocommerce-address-fields, .woocommerce-EditAccountForm { max-width: 36rem; }

/* Login / register */
.woocommerce form.login, .woocommerce form.register,
.woocommerce .lost_reset_password {
    max-width: 28rem; margin: 0 auto; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem;
}
.woocommerce form.login .button, .woocommerce form.register .button { margin: .5rem 0 0; }

/* Order received */
.woocommerce-order-received .woocommerce-order { max-width: 44rem; margin: 0 auto; }
.woocommerce-order-details table, .woocommerce-table--order-details { width: 100%; border-collapse: collapse; }
.woocommerce-table--order-details th, .woocommerce-table--order-details td { padding: .75rem; border-bottom: 1px solid var(--border); text-align: left; }

/* Widgets (search, price filter, categories) */
.widget { margin-bottom: 2rem; }
.widgettitle, .widget-title { font-size: 1.1rem; margin-bottom: 1rem; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: .35rem 0; }
.widget ul li a { color: var(--text-soft); }
.widget_product_search input[type="search"] { margin-bottom: .5rem; }

/* Storefront blocks compat (WC blocks use their own styles — light touch) */
.wc-block-grid__products { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .wc-block-grid__products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .wc-block-grid__products { grid-template-columns: repeat(4, 1fr); } }

/* Archive header */
.archive-header { margin-bottom: 2rem; }
.archive-desc { color: var(--text-soft); }
.woocommerce-products-header__title { font-size: clamp(1.75rem, 3vw, 2.5rem); margin: 0 0 .5rem; }
.term-description { color: var(--text-soft); margin-bottom: 2rem; }

/* Paridad con el sitio: tarjetas blancas sobre fondo blanco */
html:not(.dark) ul.products li.product { background: #ffffff; }

/* Product documentation (Downloads tab) */
.cctxv-docs-list { display: flex; flex-direction: column; gap: .75rem; }
.cctxv-doc {
    display: flex; align-items: center; gap: .75rem;
    padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 12px;
    background: var(--bg); color: var(--text); text-decoration: none;
    transition: border-color .2s, background .2s, transform .2s;
}
.cctxv-doc:hover { border-color: var(--p500); background: var(--bg-alt); transform: translateY(-1px); }
.cctxv-doc .fa-file-pdf { color: #dc2626; font-size: 1.15rem; flex: 0 0 auto; }
.cctxv-doc-title { font-weight: 600; }
.cctxv-doc-size { color: var(--text-mute); font-size: .85rem; margin-left: auto; }
.cctxv-doc-dl { color: var(--text-mute); font-size: .9rem; flex: 0 0 auto; }
.cctxv-doc:hover .cctxv-doc-dl { color: var(--p600); }
@media (max-width: 480px) {
    .cctxv-doc { flex-wrap: wrap; }
    .cctxv-doc-size { margin-left: 0; }
}
