/* ==========================================================================
   GM Tech Guard — Brand Bold v3.1 (versión CLARA con fuerza)
   Fondos claros (blanco / gris muy claro) + azul de marca firme.
   Se carga al final. El modo oscuro del usuario sigue funcionando.
   ========================================================================== */

:root {
    --gm-blue: #1A56DB;
    --gm-blue-hover: #1240B0;
    --gm-blue-soft: #EAF1FF;
    --gm-cyan: #0EA5E9;
    --gm-ink: #0B1324;
    --gm-text-2: #3B4A63;
    --gm-light: #F5F7FA;
    --gm-accent-grad: linear-gradient(90deg, #1A56DB 0%, #2F6BFF 60%, #0EA5E9 100%);
    --gm-card-border: #D5DCE7;
    --gm-card-shadow: 0 1px 2px rgba(11,19,36,.06), 0 8px 22px -12px rgba(11,19,36,.20);
    --gm-card-shadow-hover: 0 22px 40px -18px rgba(26,86,219,.45), 0 0 0 1px #1A56DB;
}
[data-theme="dark"] {
    --gm-blue: #3D7FFF;
    --gm-blue-hover: #2563EB;
    --gm-blue-soft: rgba(61,127,255,.15);
    --gm-card-border: #26355a;
    --gm-light: var(--color-bg-alt);
}

/* ---------- HEADER: blanco, texto oscuro, línea azul ---------- */
html:not([data-theme="dark"]) .site-header {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
}
html .site-header::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 3px;
    background: var(--gm-accent-grad);
    pointer-events: none;
}
html:not([data-theme="dark"]) .site-header.is-scrolled { box-shadow: 0 8px 24px -12px rgba(11,19,36,.25); }
html:not([data-theme="dark"]) .header-top { border-bottom: 1px solid #E6EBF2; }
html:not([data-theme="dark"]) .header-nav { background: #fff; }

html:not([data-theme="dark"]) .site-header .nav-pill {
    color: var(--gm-ink);
    font-weight: 600;
    font-size: 13.5px;
}
html:not([data-theme="dark"]) .site-header .nav-pill svg { color: var(--gm-blue); opacity: 1; }
html:not([data-theme="dark"]) .site-header .nav-pill:hover,
html:not([data-theme="dark"]) .site-header .nav-pills__item.is-active .nav-pill,
html:not([data-theme="dark"]) .site-header .nav-pill[aria-expanded="true"] {
    color: var(--gm-blue);
    background: var(--gm-blue-soft);
    border-color: rgba(26,86,219,.25);
}
html:not([data-theme="dark"]) .site-header .nav-pill--ofertas,
html:not([data-theme="dark"]) .site-header .nav-pill--ofertas svg { color: #DC2626; }
html:not([data-theme="dark"]) .site-header .nav-pill--cta,
html:not([data-theme="dark"]) .site-header .nav-pill--cta:hover,
html .site-header .nav-pill--cta {
    background: var(--gm-blue);
    color: #fff !important;
    border-color: var(--gm-blue);
    font-weight: 700;
    box-shadow: 0 6px 16px -6px rgba(26,86,219,.6);
}
html:not([data-theme="dark"]) .site-header .nav-pill--cta svg { color: #fff; opacity: 1; }
html:not([data-theme="dark"]) .site-header .nav-pill--cta:hover { background: var(--gm-blue-hover); border-color: var(--gm-blue-hover); }

html:not([data-theme="dark"]) .site-header .header-actions__btn,
html:not([data-theme="dark"]) .site-header .header-actions__label { color: var(--gm-ink); font-weight: 600; }
html:not([data-theme="dark"]) .site-header .header-actions__btn:hover { color: var(--gm-blue); background: var(--gm-blue-soft); }
html .site-header .header-actions__cart-count:not(.is-empty) { background: var(--gm-blue); color: #fff; }

/* Buscador con borde definido */
html:not([data-theme="dark"]) .site-header .dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input,
html:not([data-theme="dark"]):not(.dgwt-wcas-overlay-mobile-on) .site-header .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    background: var(--gm-light) !important;
    border: 1.5px solid #CBD5E3 !important;
    color: var(--gm-ink) !important;
}
html:not([data-theme="dark"]) .site-header .dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input:focus {
    background: #fff !important;
    border-color: var(--gm-blue) !important;
    box-shadow: 0 0 0 3px rgba(26,86,219,.2) !important;
}

/* ---------- HERO: fondo claro, marco con sombra azul ---------- */
.gmtechguard-rev-hero {
    background: linear-gradient(180deg, #fff 0%, var(--gm-light) 100%);
    padding: var(--space-8) 0 var(--space-12);
}
[data-theme="dark"] .gmtechguard-rev-hero { background: var(--color-bg); }
.gmtechguard-rev-hero__frame {
    border-radius: 18px;
    box-shadow: 0 26px 50px -26px rgba(26,86,219,.45), 0 0 0 1px rgba(26,86,219,.12);
}

/* ---------- TÍTULOS DE SECCIÓN ---------- */
.section-header h2,
.section-header__title,
.products-carousel-block__header-text h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.6rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--color-text);
}
.section-header h2 strong { color: var(--gm-blue); font-weight: 700; }
.section-header h2::before,
.products-carousel-block__header-text h2::before {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    border-radius: 4px;
    background: var(--gm-accent-grad);
    margin-bottom: 14px;
}
.section-header h2::before { margin-left: auto; margin-right: auto; }
.section-header > p,
.products-carousel-block__header-text p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    margin-top: 6px;
}
html:not([data-theme="dark"]) .section-header > p,
html:not([data-theme="dark"]) .products-carousel-block__header-text p { color: var(--gm-text-2); }
.products-carousel-block__header {
    align-items: flex-end;
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-8);
}

/* ---------- RITMO DE SECCIONES: blanco / gris muy claro ---------- */
html:not([data-theme="dark"]) .section { background: #fff; }
html:not([data-theme="dark"]) .section--alt,
html:not([data-theme="dark"]) .why-us-section,
html:not([data-theme="dark"]) .testimonials-section {
    background: var(--gm-light);
    border-top: 1px solid #E6EBF2;
    border-bottom: 1px solid #E6EBF2;
}
html:not([data-theme="dark"]) .process-section { background: #fff; }
.why-us-section::before { display: none; }

/* Categorías: tiles con borde y hover */
.home-categories__featured,
.home-categories__item {
    border: 1px solid var(--gm-card-border);
    box-shadow: var(--gm-card-shadow);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.home-categories__featured:hover,
.home-categories__item:hover {
    transform: translateY(-3px);
    border-color: var(--gm-blue);
    box-shadow: var(--gm-card-shadow-hover);
}
.home-categories__title { font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }

.btn-catalog {
    background: var(--gm-blue);
    box-shadow: 0 10px 24px -10px rgba(26,86,219,.7);
    border-radius: 12px;
}
.btn-catalog:hover { background: var(--gm-blue-hover); }

/* Stats ("¿Por qué elegirnos?"): tarjetas blancas definidas */
.why-us-section .stat-card {
    background: var(--color-card-bg);
    border: 1px solid var(--gm-card-border);
    box-shadow: var(--gm-card-shadow);
}
.why-us-section .stat-card:hover { border-color: var(--gm-blue); box-shadow: var(--gm-card-shadow-hover); }
.why-us-section .stat-card__number { color: var(--gm-blue); font-weight: 700; }
.why-us-section .stat-card__label { color: var(--color-text); font-weight: 700; }
.why-us-section .stat-card__icon-wrap { background: var(--gm-blue-soft); color: var(--gm-blue); }

/* ---------- BOTONES ---------- */
.btn--primary {
    background: var(--gm-blue);
    box-shadow: 0 8px 18px -8px rgba(26,86,219,.65);
    font-weight: 700;
}
.btn--primary:hover { background: var(--gm-blue-hover); }

.btn--outline,
.products-section__cta.btn--outline {
    background: #fff;
    color: var(--gm-blue);
    border: 2px solid var(--gm-blue);
    font-weight: 700;
    box-shadow: none;
}
.btn--outline:hover,
.products-section__cta.btn--outline:hover {
    background: var(--gm-blue);
    border-color: var(--gm-blue);
    color: #fff;
    transform: translateY(-1px);
}
.btn--outline svg { color: inherit; stroke: currentColor; }
[data-theme="dark"] .btn--outline { background: transparent; }

/* Flechas del carrusel */
.products-carousel__btn {
    background: #fff;
    color: var(--gm-blue);
    border: 2px solid var(--gm-blue);
    box-shadow: 0 6px 16px -8px rgba(26,86,219,.5);
}
.products-carousel__btn:hover { background: var(--gm-blue); color: #fff; }
.products-carousel__btn svg { stroke: currentColor; }

/* ---------- TARJETAS DE PRODUCTO ---------- */
.product-card--wc {
    border: 1px solid var(--gm-card-border);
    border-radius: 14px;
    box-shadow: var(--gm-card-shadow);
    background: var(--color-card-bg);
}
.product-card--wc::before { height: 3px; background: var(--gm-accent-grad); }
.product-card--wc:hover {
    border-color: var(--gm-blue);
    box-shadow: var(--gm-card-shadow-hover);
    transform: translateY(-5px);
}
.product-card--wc .product-card__image { transition: transform .35s ease; }
.product-card--wc:hover .product-card__image { transform: scale(1.04); }

.product-card--wc .product-card__state-badge,
.product-card--wc.is-depot .product-card__state-badge,
.product-card--wc.is-24hs .product-card__state-badge {
    background: var(--gm-blue-soft);
    border: 1px solid rgba(26,86,219,.3);
    color: var(--gm-blue);
    font-weight: 700;
}
[data-theme="dark"] .product-card--wc .product-card__state-badge,
[data-theme="dark"] .product-card--wc.is-depot .product-card__state-badge,
[data-theme="dark"] .product-card--wc.is-24hs .product-card__state-badge { background: #1A56DB; border-color: #1A56DB; color: #fff; }
[data-theme="dark"] .product-card--wc.is-depot .product-card__state-badge::before,
[data-theme="dark"] .product-card--wc.is-24hs .product-card__state-badge::before { background: #fff; }
.product-card--wc.is-depot .product-card__state-badge::before,
.product-card--wc.is-24hs .product-card__state-badge::before { background: var(--gm-blue); opacity: 1; }
.product-card--wc.is-in-stock .product-card__state-badge { background: #E7F8EF; border-color: #86D9AE; color: #047857; }

.product-card--wc .product-card__category {
    color: var(--gm-blue);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 11px;
}
.product-card--wc .product-card__title,
.product-card--wc .product-card__title a { color: var(--color-text); font-weight: 700; }
.product-card--wc .product-card__title a:hover { color: var(--gm-blue); }
.product-card--wc .product-card__pricing { border-top: 1px dashed var(--gm-card-border); }
.product-card--wc .product-card__price,
.product-card--wc .product-card__price .amount {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
}
.product-card--wc .product-card__brand-logo { border-color: var(--gm-card-border); }

.product-card--wc .product-card__add-to-cart,
.product-card--wc .product-card__actions .btn--primary {
    background: var(--gm-blue);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    font-size: .88rem;
    box-shadow: 0 8px 18px -10px rgba(26,86,219,.85);
}
.product-card--wc .product-card__add-to-cart:hover,
.product-card--wc .product-card__actions .btn--primary:hover {
    background: var(--gm-blue-hover);
    color: #fff;
}
.product-card--wc .product-card__add-to-cart svg { stroke: currentColor; }
.product-card--wc .product-card__view-link { font-weight: 600; color: var(--color-text-secondary); }
.product-card--wc .product-card__view-link:hover { color: var(--gm-blue); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- PROCESO ---------- */
.process-step__number {
    background: var(--gm-blue);
    color: #fff;
    box-shadow: 0 0 0 5px var(--gm-blue-soft), 0 8px 18px -8px rgba(26,86,219,.6);
    font-weight: 700;
}
.process-step__title { font-weight: 700; }

/* ---------- BLOG / TESTIMONIOS / FAQ ---------- */
.post-card,
.testimonial-card,
.faq-item {
    border: 1px solid var(--gm-card-border);
    box-shadow: var(--gm-card-shadow);
}
.post-card:hover,
.testimonial-card:hover { border-color: var(--gm-blue); }
.post-card__image:has(.post-card__image-placeholder) { background: #EEF2F7; }
[data-theme="dark"] .post-card__image:has(.post-card__image-placeholder) { background: var(--color-bg-muted); }
.post-card__image-placeholder { color: var(--gm-blue); opacity: .85; }
.post-card__title { font-weight: 700; }
.faq-item.is-open,
.faq-item[open],
.faq-item:hover { border-color: var(--gm-blue); }
.faq-item__trigger { font-weight: 700; }

/* ---------- TIENDA: cabecera clara ---------- */
html:not([data-theme="dark"]) .shop-header,
html:not([data-theme="dark"]) .shop-header.animated-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--gm-light) 100%) !important;
    border: 1px solid var(--gm-card-border);
    border-left: 5px solid var(--gm-blue);
    box-shadow: var(--gm-card-shadow);
    animation: none;
}
html:not([data-theme="dark"]) .shop-header .breadcrumbs,
html:not([data-theme="dark"]) .shop-header .breadcrumbs a,
html:not([data-theme="dark"]) .shop-header .breadcrumbs__separator { color: var(--gm-text-2) !important; text-shadow: none !important; }
html:not([data-theme="dark"]) .shop-header .breadcrumbs a:hover { color: var(--gm-blue) !important; }
html:not([data-theme="dark"]) .shop-header .breadcrumbs__current { color: var(--gm-blue) !important; font-weight: 600; }
html:not([data-theme="dark"]) .shop-header .shop-header__title,
html:not([data-theme="dark"]) .shop-header .shop-header__title.text-gradient {
    color: var(--gm-ink) !important;
    -webkit-text-fill-color: var(--gm-ink) !important;
    background: none !important;
    text-shadow: none !important;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}
html:not([data-theme="dark"]) .shop-header .shop-header__count {
    color: var(--gm-blue);
    background: var(--gm-blue-soft);
    border: 1px solid rgba(26,86,219,.25);
    font-weight: 600;
}
html:not([data-theme="dark"]) .shop-header .shop-header__count .woocommerce-result-count { color: var(--gm-blue); margin: 0; }

/* ---------- FOOTER claro (modo claro) ---------- */
html:not([data-theme="dark"]) .site-footer {
    background: var(--gm-light);
    border-top: 1px solid #E1E7F0;
    --color-footer-text: #3B4A63;
    --color-footer-heading: #0B1324;
    color: #3B4A63;
}
html:not([data-theme="dark"]) .site-footer::after { display: none; }
html:not([data-theme="dark"]) .site-footer::before { background: var(--gm-accent-grad); height: 4px; }
html:not([data-theme="dark"]) .footer-column__title { color: #0B1324; font-weight: 700; letter-spacing: .1em; }
html:not([data-theme="dark"]) .footer-column ul li a:hover,
html:not([data-theme="dark"]) .footer-contact__item a:hover,
html:not([data-theme="dark"]) .footer-bottom__links a:hover,
html:not([data-theme="dark"]) .footer-legal__text a:hover { color: var(--gm-blue); }
html:not([data-theme="dark"]) .footer-brand__icon,
html:not([data-theme="dark"]) .footer-contact__item svg { color: var(--gm-blue); }
html:not([data-theme="dark"]) .footer-social a { background: #fff; border: 1px solid #D5DCE7; color: var(--gm-blue); }
html:not([data-theme="dark"]) .footer-social a:hover { background: var(--gm-blue); color: #fff; border-color: var(--gm-blue); }
html:not([data-theme="dark"]) .footer-bottom { border-top-color: #E1E7F0; }
html:not([data-theme="dark"]) .footer-dev { color: #64748b; border-top-color: #E1E7F0; }
html:not([data-theme="dark"]) .footer-dev a { opacity: .85; }
html:not([data-theme="dark"]) .footer-dev__logo { filter: brightness(0); opacity: .75; }

/* ---------- Accesibilidad ---------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible { outline: 2px solid var(--gm-blue); outline-offset: 2px; }

/* ---------- Móvil ---------- */
@media (max-width: 768px) {
    .gmtechguard-rev-hero { padding: var(--space-4) 0 var(--space-8); }
    .products-carousel-block__header { flex-wrap: wrap; align-items: flex-start; }
    .product-card--wc .product-card__price,
    .product-card--wc .product-card__price .amount { font-size: 1.2rem; }
    .section-header h2::before,
    .products-carousel-block__header-text h2::before { width: 36px; height: 3px; margin-bottom: 10px; }
    .home-categories__title { letter-spacing: 0; font-size: 12px; }
    .home-categories__title--featured { font-size: 14px; }
}
@media (max-width: 600px) {
    .product-card--wc .product-card__state-badge {
        font-size: 10px; padding: 4px 7px; gap: 4px;
        white-space: nowrap; max-width: calc(100% - 16px);
        top: 8px; left: 8px;
    }
    .product-card--wc .product-card__state-badge::before { width: 5px; height: 5px; }
    .product-card--wc .product-card__actions .btn,
    .product-card--wc .product-card__add-to-cart {
        font-size: .78rem; padding: 9px 6px; min-height: 40px; white-space: nowrap; letter-spacing: 0;
    }
    .product-card--wc .product-card__actions { padding: 0 8px 12px; }
    .product-card--wc .product-card__add-to-cart svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .product-card--wc, .product-card--wc .product-card__image,
    .home-categories__featured, .home-categories__item { transition: none; }
    .product-card--wc:hover, .product-card--wc:hover .product-card__image { transform: none; }
}
