/*
Theme Name: Electromanchamaster
Theme URI: https://electrolamancha.com
Description: Tema hijo de Blocksy para Electromanchamaster — tienda de electrodomésticos en Socuéllamos. Colores de marca, botón WhatsApp y ajustes WooCommerce.
Author: Electromanchamaster
Template: blocksy
Version: 1.0.0
Text Domain: electromancha-child
*/

:root{
  --em-primary:#ea580c;
  --em-primary-dark:#cc3a00;
  --em-secondary:#facc15;
  --em-dark:#18181b;

  /* Paleta de Blocksy en naranja de marca (sobrescribe el azul por defecto) */
  --theme-palette-color-1:#ea580c !important; /* acento: enlaces, menú activo, iconos */
  --theme-palette-color-2:#c2410c !important; /* acento hover */
  --paletteColor1:#ea580c !important;
  --paletteColor2:#c2410c !important;
}
/* Botones del tema (Blocksy) en naranja */
.ct-header a.ct-button,
.ct-header .ct-button,
a.wp-block-button__link,
.wp-block-button__link{ --theme-button-background-initial-color:var(--em-primary); --theme-button-background-hover-color:var(--em-primary-dark); }

/* La cabecera muestra solo el logo (el logo ya incluye el nombre de marca) */
.site-title-container{ display:none !important; }
/* Logo un poco más grande */
.site-logo-container img{ max-height:64px !important; height:auto !important; width:auto !important; }
@media (max-width:768px){ .site-logo-container img{ max-height:52px !important; } }

/* ---- Marca / acentos ---- */
a{ color:var(--em-primary); }
a:hover{ color:var(--em-primary-dark); }

.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce .button.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt{
  background-color:var(--em-primary) !important;
  border-color:var(--em-primary) !important;
  color:#fff !important;
}
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce .button.alt:hover,
.woocommerce a.button.alt:hover{
  background-color:var(--em-primary-dark) !important;
  border-color:var(--em-primary-dark) !important;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price{
  color:var(--em-primary);
  font-weight:700;
}

.woocommerce span.onsale{
  background:var(--em-secondary);
  color:var(--em-dark);
}

/* ---- Botón flotante de WhatsApp ---- */
.em-whatsapp-float{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:9999;
  width:56px;
  height:56px;
  border-radius:50%;
  background:#25d366;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 6px 18px rgba(0,0,0,.28);
  transition:transform .15s ease, box-shadow .15s ease;
}
.em-whatsapp-float:hover{
  transform:scale(1.08);
  color:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
}
.em-whatsapp-float svg{ width:30px; height:30px; fill:currentColor; }

@media (max-width:600px){
  .em-whatsapp-float{ width:52px; height:52px; right:16px; bottom:16px; }
}

/* =====================================================================
   MEJORAS 2026 — imágenes sin recorte, tarjetas, ficha, home
   ===================================================================== */

/* ---- Imágenes de producto SIN recortar (tienda + relacionados) ---- */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product .ct-media-container img,
ul.products li.product img.wp-post-image,
.wc-block-grid__product-image img,
.wp-block-woocommerce-product-image img{
  object-fit:contain !important;
  width:100% !important;
  height:100% !important;
  background:#fff;
}
/* Caja de proporción consistente para alinear la rejilla sin cortar */
.woocommerce ul.products li.product .ct-media-container,
.woocommerce ul.products li.product a > figure,
.woocommerce ul.products li.product figure.ct-media-container{
  aspect-ratio:1/1;
  background:#fff;
  border-radius:12px 12px 0 0;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  box-sizing:border-box;
}

/* ---- Tarjetas de producto (elegantes) ---- */
.woocommerce ul.products{ gap:24px; }
.woocommerce ul.products li.product{
  background:#fff;
  border:1px solid #eee;
  border-radius:16px;
  overflow:hidden;
  transition:box-shadow .25s ease, transform .25s ease, border-color .25s ease;
  display:flex;
  flex-direction:column;
}
.woocommerce ul.products li.product:hover{
  box-shadow:0 18px 40px rgba(17,17,17,.10);
  transform:translateY(-5px);
  border-color:#e6e6e6;
}
/* zona de imagen con fondo neutro suave + ligero zoom al hover */
.woocommerce ul.products li.product .ct-media-container,
.woocommerce ul.products li.product a > figure,
.woocommerce ul.products li.product figure.ct-media-container{
  background:#fafafa;
  padding:20px;
}
.woocommerce ul.products li.product .ct-media-container img{ transition:transform .5s ease; }
.woocommerce ul.products li.product:hover .ct-media-container img{ transform:scale(1.05); }

.woocommerce ul.products li.product .ct-card-content,
.woocommerce ul.products li.product .entry-meta,
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  padding-inline:18px;
}
/* categoría: pequeña y sobria (gris), no naranja */
.woocommerce ul.products li.product .entry-meta,
.woocommerce ul.products li.product .meta-categories{
  font-size:11px !important; letter-spacing:.07em; text-transform:uppercase; margin-top:15px;
}
.woocommerce ul.products li.product .entry-meta a,
.woocommerce ul.products li.product .meta-categories a{
  color:#9ca3af !important; font-weight:600;
}
/* título: oscuro y elegante (naranja solo al hover) */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title a{
  color:#171717 !important; font-weight:600; font-size:15.5px; line-height:1.4;
  min-height:2.7em; margin-top:6px; text-transform:none;
}
.woocommerce ul.products li.product:hover .woocommerce-loop-product__title a{ color:var(--em-primary) !important; }
/* precio */
.woocommerce ul.products li.product .price{
  font-size:20px !important; font-weight:800 !important; color:var(--em-primary) !important;
  padding-inline:18px; margin-top:8px;
}
.woocommerce ul.products li.product .price del{ color:#9ca3af; font-weight:400; font-size:15px !important; }
.woocommerce ul.products li.product .price ins{ text-decoration:none; }
.woocommerce ul.products li.product .price .woocommerce-price-suffix{
  font-size:11px; font-weight:600; color:#9ca3af; letter-spacing:.02em;
}
/* botón "Añadir al carrito": outline elegante que se rellena al hover */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .ct-product-add-to-cart .button{
  margin:14px 18px 18px !important;
  border-radius:10px !important;
  font-weight:700 !important;
  background:#fff !important;
  color:var(--em-primary) !important;
  border:1.5px solid var(--em-primary) !important;
  box-shadow:none !important;
  transition:background .2s ease, color .2s ease, box-shadow .2s ease !important;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover,
.woocommerce ul.products li.product .ct-product-add-to-cart .button:hover{
  background:var(--em-primary) !important;
  color:#fff !important;
  box-shadow:0 10px 22px rgba(234,88,12,.28) !important;
}
.woocommerce ul.products li.product .added_to_cart{
  display:block; text-align:center; margin:0 18px 16px; font-size:13px; font-weight:600; color:var(--em-primary);
}

/* ---- Hero de las páginas de categoría: máscara oscura + texto legible ---- */
.tax-product_cat .hero-section{ position:relative; overflow:hidden; }
.tax-product_cat .hero-section figure{ position:absolute; inset:0; margin:0; }
.tax-product_cat .hero-section .ct-media-container{ position:absolute; inset:0; }
.tax-product_cat .hero-section .ct-media-container img{ width:100% !important; height:100% !important; object-fit:cover !important; }
/* máscara: tinte general + refuerzo por la izquierda para dar profundidad */
.tax-product_cat .hero-section .ct-media-container::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(20,20,22,.78) 0%, rgba(20,20,22,.42) 55%, rgba(20,20,22,.62) 100%), rgba(0,0,0,.22);
}
/* el contenido (título, breadcrumb) por encima de la máscara */
.tax-product_cat .hero-section > *:not(figure),
.tax-product_cat .hero-section .entry-header,
.tax-product_cat .hero-section .page-title{ position:relative; z-index:2; }
.tax-product_cat .hero-section .page-title{
  color:#fff !important; font-weight:800 !important; letter-spacing:-.01em;
  text-shadow:0 2px 18px rgba(0,0,0,.45);
}
.tax-product_cat .hero-section .term-description,
.tax-product_cat .hero-section .term-description *,
.tax-product_cat .hero-section .entry-meta,
.tax-product_cat .hero-section .ct-breadcrumbs,
.tax-product_cat .hero-section .ct-breadcrumbs *{
  color:#eef0f2 !important; text-shadow:0 1px 10px rgba(0,0,0,.4);
}
.tax-product_cat .hero-section .ct-breadcrumbs a:hover{ color:#fff !important; }

/* ---- Cabecera de archivo / categoría ---- */
.woocommerce-products-header,
.page-title.ct-page-title{
  text-align:center;
}
.woocommerce-products-header__title,
.ct-page-title h1{
  font-weight:800;
  letter-spacing:-.01em;
}
.term-description,.woocommerce-products-header .term-description{
  max-width:760px;margin:8px auto 0;color:#6b7280;font-size:15px;
}
.woocommerce .woocommerce-result-count{ color:#6b7280; }
.woocommerce .woocommerce-ordering select{
  border:1px solid #e5e7eb;border-radius:8px;padding:8px 12px;
}

/* ---- Filtros del sidebar ---- */
.widget.woocommerce h2,.wc-block-components-panel__button,.widget_layered_nav h2,
.widget_price_filter h2,.widget_product_search h2,.widget_product_categories h2{
  font-size:14px;text-transform:uppercase;letter-spacing:.04em;font-weight:700;
  border-bottom:2px solid #f0f0f0;padding-bottom:8px;margin-bottom:14px;color:#111;
}
.woocommerce-widget-layered-nav-list li{ margin:.35em 0; }

/* ---- FICHA DE PRODUCTO ---- */
.single-product .woocommerce-product-gallery{
  background:#fff;border:1px solid #eee;border-radius:14px;padding:12px;
}
.single-product .woocommerce-product-gallery__image img,
.single-product .flexy-items img,
.single-product .woocommerce-product-gallery img{
  object-fit:contain !important;background:#fff;
}
.single-product .flexy-container [data-flexy] img{ object-fit:contain !important; }
.single-product div.product .entry-summary .price,
.single-product div.product p.price{
  font-size:30px !important;font-weight:800 !important;color:var(--em-primary) !important;
}
.single-product .woocommerce-product-details__short-description{
  color:#4b5563;line-height:1.7;
}
/* Tabla de atributos (Información adicional) */
.woocommerce table.shop_attributes{
  border:1px solid #eee;border-radius:10px;overflow:hidden;
}
.woocommerce table.shop_attributes th{
  background:#faf7f5;color:#111;font-weight:600;width:34%;
}
.woocommerce table.shop_attributes td{ font-style:normal;color:#374151; }

/* Badge de clase energética */
.em-energy-badge{
  display:inline-flex;align-items:center;gap:6px;
  background:#16a34a;color:#fff;font-weight:700;font-size:13px;
  padding:4px 12px;border-radius:999px;margin:6px 0 2px;
}
.em-energy-badge::before{ content:"⚡"; }
.em-energy-badge[data-class^="E"],.em-energy-badge[data-class^="F"],.em-energy-badge[data-class^="G"],
.em-energy-badge[data-class^="D"]{ background:#ea580c; }

/* Botón WhatsApp de la ficha a ancho cómodo */
.single-product .cart .em-wa-btn{ margin-top:10px; }

/* Productos relacionados / módulos */
.related.products > h2,.up-sells > h2,.related > .ct-module-title{
  font-weight:800;text-align:center;margin-bottom:26px;
}

/* =====================================================================
   HOME 2026 — barra de garantías, categorías, marcas
   ===================================================================== */
.em-trustbar{
  display:grid;grid-template-columns:repeat(4,1fr);gap:18px;
  max-width:1100px;margin:0 auto;
}
.em-trust{
  display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;
  background:#fff;border:1px solid #eee;border-radius:14px;padding:22px 16px;
  box-shadow:0 4px 14px rgba(0,0,0,.04);
}
.em-trust .em-trust-ico{ font-size:30px;line-height:1; }
.em-trust strong{ font-size:15px;color:#111; }
.em-trust span{ font-size:13px;color:#6b7280; }

/* Rejilla de categorías con imagen */
.em-cats{
  display:grid;grid-template-columns:repeat(4,1fr);gap:18px;max-width:1150px;margin:0 auto;
}
.em-cat{
  position:relative;display:block;border-radius:16px;overflow:hidden;
  border:1px solid #ececec;background:#fff;transition:transform .2s,box-shadow .2s;
}
.em-cat:hover{ transform:translateY(-4px);box-shadow:0 14px 30px rgba(0,0,0,.12); }
.em-cat-img{ aspect-ratio:4/3;background:#fff;display:flex;align-items:center;justify-content:center;padding:18px; }
.em-cat-img img{ max-width:100%;max-height:100%;object-fit:contain; }
.em-cat-label{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px;font-weight:700;color:#111;border-top:1px solid #f2f2f2;
}
.em-cat-label::after{ content:"→";color:var(--em-primary);font-weight:700; }

/* Tira de marcas */
.em-brands{
  display:flex;flex-wrap:wrap;gap:12px;justify-content:center;max-width:1000px;margin:0 auto;
}
.em-brand{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:120px;padding:14px 22px;background:#fff;border:1px solid #ececec;border-radius:12px;
  font-weight:800;letter-spacing:.02em;color:#374151;font-size:16px;text-transform:uppercase;
  transition:all .18s ease;
}
.em-brand:hover{ border-color:var(--em-primary);color:var(--em-primary);transform:translateY(-2px);box-shadow:0 8px 18px rgba(234,88,12,.12); }

/* Responsive */
@media (max-width:1000px){
  .em-trustbar,.em-cats{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:600px){
  .em-trustbar{ grid-template-columns:repeat(2,1fr);gap:12px; }
  .em-cats{ grid-template-columns:repeat(2,1fr);gap:12px; }
  .em-brand{ min-width:96px;padding:10px 16px;font-size:14px; }
  .single-product div.product .entry-summary .price,.single-product div.product p.price{ font-size:24px !important; }
}

/* =====================================================================
   CABECERA DE LA TIENDA — ocultar título "Tienda" + tira de categorías
   ===================================================================== */
/* Oculta el título/hero de Blocksy SOLO en la portada de la tienda (/tienda),
   no en las páginas de categoría (.tax-product_cat). */
.post-type-archive-product .page-title,
.post-type-archive-product .woocommerce-products-header,
.post-type-archive-product .entry-header,
.post-type-archive-product .hero-section{ display:none !important; }

.em-shophead{ padding:38px 0 26px; }
.em-wrap{ max-width:1240px; margin:0 auto; padding-inline:24px; }
.em-shophead .em-eyebrow{
  display:inline-block; font-size:13px; font-weight:800; letter-spacing:.14em; text-transform:uppercase;
  color:var(--em-primary); background:rgba(234,88,12,.09); padding:6px 14px; border-radius:999px; margin-bottom:12px;
}
.em-shophead__title{ font-size:clamp(26px,3.2vw,40px); font-weight:800; letter-spacing:-.02em; margin:0 0 8px; color:#171717; }
.em-shophead__sub{ color:#6b7280; font-size:16px; margin:0 0 26px; }
.em-grad-text{ background:linear-gradient(120deg,#f97316,#ea580c 60%,#c2410c);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent; }

.em-shopcats{
  display:grid; grid-template-columns:repeat(6,1fr); gap:16px;
}
.em-shopcat{
  position:relative; display:block; border-radius:14px; overflow:hidden; text-decoration:none;
  background:#171717; aspect-ratio:3/4; box-shadow:0 6px 16px rgba(0,0,0,.10);
  transition:transform .25s ease, box-shadow .25s ease;
}
.em-shopcat:hover{ transform:translateY(-5px); box-shadow:0 18px 34px rgba(0,0,0,.20); }
.em-shopcat__img{ position:absolute; inset:0; }
.em-shopcat__img img{ width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.em-shopcat:hover .em-shopcat__img img{ transform:scale(1.09); }
.em-shopcat__body{
  position:absolute; inset:auto 0 0 0; padding:14px 12px 12px; z-index:1;
  background:linear-gradient(to top,rgba(0,0,0,.82) 10%,rgba(0,0,0,.35) 60%,transparent);
  display:flex; flex-direction:column; gap:2px;
}
.em-shopcat__name{ color:#fff; font-weight:700; font-size:14.5px; line-height:1.25; }
.em-shopcat__count{ color:#f5d0b8; font-size:12px; font-weight:600; }
.em-shopcat::after{
  content:""; position:absolute; inset:0; border:2px solid transparent; border-radius:14px;
  transition:border-color .25s ease; z-index:2; pointer-events:none;
}
.em-shopcat:hover::after{ border-color:var(--em-primary); }

@media (max-width:1100px){ .em-shopcats{ grid-template-columns:repeat(4,1fr); } }
@media (max-width:760px){ .em-shopcats{ grid-template-columns:repeat(3,1fr); gap:12px; } }
@media (max-width:480px){ .em-shopcats{ grid-template-columns:repeat(2,1fr); } .em-shophead{ padding-top:26px; } }

/* =====================================================================
   HERO DE OFERTAS (/tienda/?en_oferta=1) — autónomo (no depende de home.css)
   ===================================================================== */
.em-offers-hero{
  position:relative; overflow:hidden; color:#fff; text-align:center;
  padding:56px 0 60px; margin-bottom:28px;
  background:linear-gradient(120deg,#18181b 0%,#7c2d12 55%,#ea580c 120%);
}
.em-offers-hero::before{
  content:""; position:absolute; inset:0;
  background:radial-gradient(circle at 15% 20%,rgba(255,255,255,.14),transparent 42%),
             radial-gradient(circle at 85% 85%,rgba(255,255,255,.10),transparent 46%);
}
.em-offers-hero__in{ position:relative; z-index:1; max-width:840px; }
.em-offers-hero .em-eyebrow{
  display:inline-block; font-size:13px; font-weight:800; letter-spacing:.14em; text-transform:uppercase;
  background:rgba(255,255,255,.18); color:#fff; padding:6px 14px; border-radius:999px; margin-bottom:12px;
}
.em-offers-hero__title{
  color:#fff !important; font-size:clamp(28px,3.8vw,46px); font-weight:800; letter-spacing:-.02em;
  line-height:1.1; margin:0 0 10px;
}
.em-offers-hero__sub{ color:#fde8db; font-size:17px; margin:0 0 20px; }
.em-offers-hero .em-btn{
  display:inline-flex; align-items:center; gap:8px; font-weight:700; text-decoration:none;
  padding:12px 22px; border-radius:10px; transition:all .2s ease;
}
.em-offers-hero .em-btn--glass{
  background:rgba(255,255,255,.16); color:#fff; border:1.5px solid rgba(255,255,255,.55); backdrop-filter:blur(4px);
}
.em-offers-hero .em-btn--glass:hover{ background:#fff; color:var(--em-primary); transform:translateY(-2px); }
.em-offers-hero .em-btn--primary{ background:#fff; color:var(--em-primary); }
.em-offers-hero .em-btn--primary:hover{ transform:translateY(-2px); box-shadow:0 10px 22px rgba(0,0,0,.18); }
@media (max-width:600px){ .em-offers-hero{ padding:42px 0 46px; } }

/* =====================================================================
   Botón "Ofertas" del menú resaltado
   ===================================================================== */
.ct-header .em-nav-offers{ display:flex; align-items:center; }
.ct-header .em-nav-offers > a,
.em-nav-offers > a{
  display:inline-flex !important;
  align-items:center;
  align-self:center;
  height:40px;
  color:#fff !important;
  background:linear-gradient(120deg,#f97316,#ea580c 60%,#c2410c) !important;
  padding:0 18px !important;
  border-radius:999px !important;
  font-weight:800 !important;
  box-shadow:0 6px 16px rgba(234,88,12,.30);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
  line-height:1;
}
.em-nav-offers > a::before{ content:"%"; font-weight:800; margin-right:6px; opacity:.9; }
.ct-header .em-nav-offers > a:hover,
.em-nav-offers > a:hover{
  color:#fff !important;
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(234,88,12,.42);
  filter:brightness(1.05);
}
/* que el resaltado del menú activo no lo pise */
.ct-header .em-nav-offers.current-menu-item > a,
.ct-header .em-nav-offers.current_page_item > a{ color:#fff !important; }
/* animación sutil para llamar la atención */
@keyframes em-offers-pulse{ 0%,100%{ box-shadow:0 6px 16px rgba(234,88,12,.30); } 50%{ box-shadow:0 6px 22px rgba(234,88,12,.55); } }
.em-nav-offers > a{ animation:em-offers-pulse 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion:reduce){ .em-nav-offers > a{ animation:none; } }
