/*
Theme Name:        Surmaquetas
Description:       Tema de Surmaquetas. Basado en Avanam (GPL v3), con las personalizaciones de la tienda integradas.
Version:           1.0.1
Author:            Surmaquetas
License:           GNU General Public License v3.0 (or later)
License URI:       https://www.gnu.org/licenses/gpl-3.0.html
Text Domain:       avanam
Requires at least: 6.2
Requires PHP:      7.4
Tags:              e-commerce, translation-ready, custom-menu, featured-images
*/

/* Tienda: tamaños de texto y botones (antes en Personalizar > CSS adicional) */
@media (max-width: 768px) {
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce .button {
        font-size: 12px;
        padding: 8px 10px;
        line-height: 1.2;
    }
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important;
    line-height: 1.3;
}

.woocommerce ul.products li.product .price {
    font-size: 14px !important;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
    font-size: 12px !important;
    padding: 10px 8px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    text-align: center;
}

/* Barra superior: descuento activo (Disco) + menu Informacion. Colores del tema (fila superior original). */
.sm-topbar { background: var(--global-palette8, #f7fafc); color: var(--global-palette3, #1a202c); font-size: 13px; }
.sm-topbar a { color: inherit; text-decoration: none; transition: color .2s ease; }
.sm-topbar a:hover { color: var(--global-palette1, #2b6cb0); }
.sm-topbar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; max-width: 1290px; margin: 0 auto; padding: 9px 20px; }
.sm-topbar__promo { display: grid; font-weight: 600; letter-spacing: .01em; }
.sm-topbar__item { grid-area: 1 / 1; opacity: 0; pointer-events: none; transition: opacity .8s ease; }
.sm-topbar__item.is-active { opacity: 1; pointer-events: auto; }
.sm-topbar__menu { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.sm-topbar__menu li { margin: 0; padding: 0; }
.sm-topbar__menu li + li::before { content: ""; display: inline-block; width: 1px; height: 12px; margin: 0 14px; background: currentColor; opacity: .25; vertical-align: middle; }
.sm-topbar__menu a { font-size: 12px; font-weight: 500; opacity: .8; }
.sm-topbar__menu a:hover { opacity: 1; }
@media (max-width: 768px) {
	.sm-topbar__inner { justify-content: center; text-align: center; }
	.sm-topbar__menu { justify-content: center; }
}

/* Home: pestanas de productos ([sm_productos_tabs]). Titulo a la izquierda y pestanas como botones a la derecha. */
.sm-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; }
.sm-tabs__title { flex: 1 1 auto; margin: 0; }
.sm-tabs__radio { position: absolute; opacity: 0; pointer-events: none; }
.sm-tabs__label { order: 0; cursor: pointer; margin-left: 10px; padding: 11px 16px; border: 1px solid #e5e5e5; border-radius: 5px; color: var(--global-palette3, #1a202c); font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: .5px; text-transform: uppercase; transition: color .2s, background-color .2s, border-color .2s; }
.sm-tabs__label:hover,
.sm-tabs__radio:checked + .sm-tabs__label { color: var(--global-palette9, #fff); background-color: var(--global-palette1, #19d2e9); border-color: var(--global-palette1, #19d2e9); }
.sm-tabs__panel { order: 1; display: none; width: 100%; padding-top: 24px; }
.sm-tabs__radio:checked + .sm-tabs__label + .sm-tabs__panel { display: block; }
.sm-tabs__radio:focus-visible + .sm-tabs__label { outline: 2px solid var(--global-palette1, #19d2e9); outline-offset: 2px; }
@media (max-width: 768px) {
	.sm-tabs__title { flex-basis: 100%; }
	.sm-tabs__label { margin: 0 8px 0 0; padding: 9px 12px; }
}

/* Flecha de subir: por encima del boton de chat (WhatsApp), que queda en la misma esquina */
#bt-scroll-up,
#bt-scroll-up-reader { bottom: 100px !important; }

/* Paginas legales (Privacidad, Terminos, Envios, Cambios y Devoluciones): un solo estilo */
.sm-legal { max-width: 820px; margin: 0 auto; line-height: 1.75; font-size: 16px; }
.sm-legal__updated { display: inline-block; margin: 0 0 1.5rem; padding: 6px 14px; border-radius: 999px; background: var(--global-palette7, #edf2f7); font-size: 13px; letter-spacing: .02em; }
.sm-legal h2 { margin: 2.4rem 0 .9rem; padding-left: 14px; border-left: 4px solid var(--global-palette1, #19d2e9); font-size: 1.35rem; line-height: 1.3; }
.sm-legal p { margin: 0 0 1rem; }
.sm-legal ul { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.sm-legal li { margin-bottom: .45rem; }
.sm-legal li::marker { color: var(--global-palette1, #19d2e9); }
.sm-legal__note { font-size: 14px; opacity: .75; font-style: italic; }
.sm-legal a { color: var(--global-palette1, #19d2e9); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 768px) { .sm-legal { font-size: 15px; } .sm-legal h2 { font-size: 1.2rem; margin-top: 2rem; } }
.sm-legal h1 { margin: 0 0 .8rem; font-size: 2.2rem; line-height: 1.2; }
@media (max-width: 768px) { .sm-legal h1 { font-size: 1.7rem; } }

/* Credito "Sitio web desarrollado por Nube" al final del pie */
.sm-credito { display: flex; justify-content: center; padding: 14px 20px; background: var(--global-palette8, #f5f5f5); }
.sm-credito a { display: inline-flex; align-items: center; gap: 4px; color: var(--global-palette3, #111); font-size: 12px; line-height: 1; text-decoration: none; }
.sm-credito img { width: 48px; height: 14px; }
.color-switch-dark .sm-credito img { filter: invert(1); } /* el logo es negro: en modo oscuro se vuelve blanco */

/* Etiqueta de oferta: cinta diagonal en la esquina superior izquierda con el % de descuento */
.woocommerce .product-onsale { position: absolute; top: 0; left: 0; z-index: 9; width: 100px; height: 100px; overflow: hidden; pointer-events: none; }
.woocommerce .product-onsale span.onsale,
.woocommerce ul.products li.product .product-onsale span.onsale {
	position: absolute; top: 20px !important; left: -32px !important; right: auto !important;
	width: 130px; margin: 0; padding: 5px 0; border-radius: 0 !important;
	transform: rotate(-45deg); transform-origin: center;
	background: #e53935; color: #fff; text-align: center;
	font-size: 14px; font-weight: 700; line-height: 1.2; letter-spacing: .5px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
}
.woocommerce div.product div.images .product-onsale { top: 0; left: 0; }
@media (max-width: 768px) {
	.woocommerce .product-onsale { width: 82px; height: 82px; }
	.woocommerce .product-onsale span.onsale,
	.woocommerce ul.products li.product .product-onsale span.onsale { top: 15px !important; left: -28px !important; width: 108px; padding: 3px 0; font-size: 12px; }
}

/* Subtitulos de seccion: mismo estilo que el titulo de la ficha de producto (negrita y la letra del sitio, mas legible) */
h2:not(.woocommerce-loop-product__title),
.wp-block-heading:is(h2, h3),
.sm-tabs__title, .sm-fila__titulo, .sm-cats__titulo { font-family: inherit; font-weight: 700; }

/* Ficha de producto: la cinta de oferta queda sobre la foto principal (no sobre las miniaturas) */
.single-product .base-product-gallery-main { position: relative; }
.single-product .base-product-gallery-main > .product-onsale { top: 0; left: 0; }

/* Home: filas de productos (como el sitio en linea) */
.sm-fila__titulo { margin: 0 0 16px; }
.sm-fila__lista { --n: 5; position: relative; }
.sm-fila__lista[data-cols="1"] { --n: 1; }
.sm-fila__lista[data-cols="3"] { --n: 3; }
.sm-fila__lista ul.products { display: flex !important; flex-wrap: nowrap !important; gap: 20px; margin: 0 !important; padding: 2px !important; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sm-fila__lista ul.products::-webkit-scrollbar { display: none; }
.sm-fila__lista ul.products > li.product { flex: 0 0 calc((100% - (var(--n) - 1) * 20px) / var(--n)); width: auto !important; max-width: none; margin: 0 !important; float: none; scroll-snap-align: start; }
.sm-fila__flecha { position: absolute; top: 40%; z-index: 10; width: 34px; height: 34px; border: 1px solid #e5e5e5; border-radius: 50%; background: #fff; color: #111; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.12); opacity: 0; transition: opacity .2s; }
.sm-fila__lista:hover .sm-fila__flecha { opacity: 1; }
.sm-fila__flecha--prev { left: -12px; }
.sm-fila__flecha--next { right: -12px; }

/* destacado: una sola tarjeta con borde de color */
.sm-fila--destacado ul.products > li.product { border: 2px solid var(--global-palette1, #19d2e9); border-radius: 8px; text-align: center; }

/* lista: foto a la izquierda, texto a la derecha, dos columnas */
.sm-fila--lista .sm-fila__lista ul.products { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
.sm-fila--lista .sm-fila__lista ul.products > li.product { display: flex; flex: initial; align-items: stretch; gap: 14px; padding: 0; border: 1px solid #e5e5e5; border-radius: 6px; overflow: hidden; }
.sm-fila--lista li.product .product-thumbnail { flex: 0 0 38%; max-width: 38%; }
.sm-fila--lista li.product .product-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.sm-fila--lista li.product .product-details { flex: 1 1 auto; padding: 10px 10px 10px 0; text-align: left; }
.sm-fila--lista .product-actions { display: none; }
.sm-fila--lista .sm-fila__flecha { display: none; }

@media (max-width: 1024px) { .sm-fila__lista { --n: 3; } .sm-fila__lista[data-cols="1"] { --n: 1; } }
@media (max-width: 768px) { .sm-fila__lista { --n: 2; } .sm-fila__lista[data-cols="1"] { --n: 1; } .sm-fila--lista .sm-fila__lista ul.products { grid-template-columns: 1fr; } }

/* Ajustes de las filas de la home */
.entry-content .wp-block-columns, .entry-content .sm-fila, .entry-content .sm-tabs { margin-top: 0; margin-bottom: 48px; }
.sm-fila--destacado .sm-fila__lista ul.products > li.product { border: 2px solid var(--global-palette1, #19d2e9) !important; border-radius: 8px; }
.sm-fila--destacado li.product .product-thumbnail { padding: 18px 18px 0; }
.sm-fila--destacado li.product .product-thumbnail img { display: block; width: 72% !important; max-width: 72%; margin: 0 auto; }
.sm-fila--lista .sm-fila__lista ul.products > li.product { flex-direction: row !important; align-items: center; }
.sm-fila--lista li.product .product-thumbnail { flex: 0 0 140px !important; width: 140px; max-width: 140px; align-self: stretch; }
.sm-fila--lista li.product .product-thumbnail a { display: block; height: 100%; }
.sm-fila--lista li.product .product-thumbnail img { width: 140px !important; height: 100% !important; min-height: 140px; object-fit: cover; }
.sm-fila--lista li.product .product-details { padding: 12px 12px 12px 0 !important; border: 0 !important; text-align: left; }
.sm-fila--destacado li.product .product-thumbnail a { display: block; text-align: center; }
.sm-fila--destacado li.product .product-details { text-align: center; }
.sm-fila--destacado li.product .product-thumbnail a { width: 72%; margin: 0 auto; }
.sm-fila--destacado li.product .product-thumbnail img { width: 100% !important; max-width: 100%; }
.sm-fila__lista.sm-cargando { min-height: 240px; opacity: .5; }

/* Barra superior en movil: solo el aviso de descuento, sin el menu de enlaces */
@media (max-width: 768px) {
	.sm-topbar__menu { display: none; }
}

/* Ficha de producto: cuando aparece la barra "Agregar al carrito" abajo, el chat y la flecha de subir se levantan para no taparla */
.qlwapp__container--bottom-right, #bt-scroll-up, #bt-scroll-up-reader { transition: bottom .3s ease; }
body:has(.base-sticky-add-to-cart-footer.item-is-fixed) .qlwapp__container--bottom-right { bottom: 90px !important; }
body:has(.base-sticky-add-to-cart-footer.item-is-fixed) #bt-scroll-up,
body:has(.base-sticky-add-to-cart-footer.item-is-fixed) #bt-scroll-up-reader { bottom: 190px !important; }
/* El interruptor dia/noche tambien sube para no quedar bajo la barra */
.base-color-palette-fixed-switcher { transition: bottom .3s ease; }
body:has(.base-sticky-add-to-cart-footer.item-is-fixed) .base-color-palette-fixed-switcher { bottom: 90px !important; }

/* Subtitulos de la home centrados en movil */
@media (max-width: 768px) {
	.sm-tabs { justify-content: center; }
	.sm-tabs__title, .sm-fila__titulo { text-align: center; }
	.sm-tabs__label { margin: 0 4px 0 4px; }
}

/* Fotos de producto en los listados: proporcion de caja de maquetas (4:3 apaisada) en vez de cuadrada. Cambia --sm-ratio-foto para ajustar (ej. 3 / 2, 1 / 1). */
:root { --sm-ratio-foto: 3 / 2; }
.woocommerce ul.products:not(.sm-x) > li.product .product-thumbnail > a.woocommerce-LoopProduct-link { display: block; aspect-ratio: var(--sm-ratio-foto); overflow: hidden; }
.woocommerce ul.products > li.product .product-thumbnail > a.woocommerce-LoopProduct-link img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.sm-fila--lista li.product .product-thumbnail > a.woocommerce-LoopProduct-link,
.sm-fila--destacado li.product .product-thumbnail > a.woocommerce-LoopProduct-link { aspect-ratio: auto; overflow: visible; }

/* Ficha de producto: cantidad, "Agregar al carrito" y "Comprar ahora" a todo el ancho, una debajo de otra */
.single-product div.summary form.cart { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.single-product div.summary form.cart .quantity { flex: 1 1 100%; width: 100%; margin: 0 !important; }
.single-product div.summary form.cart .quantity .qty { width: 100%; }
.single-product div.summary form.cart .single_add_to_cart_button,
.single-product div.summary form.cart .button-buy-now { flex: 1 1 100%; width: 100%; max-width: none; margin: 0 !important; text-align: center; justify-content: center; }
/* Comparar, Deseos, Preguntanos y Compartir: una sola linea, mas pequeños */
.single-product .wrap_after_button { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; width: 100%; }
.single-product .wrap_compare_wishlist,
.single-product .wrap_ask_share { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; }
.single-product .wrap_after_button button,
.single-product .wrap_after_button a,
.single-product .wrap_after_button .woosc-btn-text,
.single-product .wrap_after_button .woosw-btn-text { font-size: 12px !important; white-space: nowrap; padding-left: 0; padding-right: 0; }
.single-product .wrap_after_button svg { width: 15px; height: 15px; }
@media (max-width: 480px) {
	.single-product .wrap_after_button { gap: 4px; }
	.single-product .wrap_compare_wishlist, .single-product .wrap_ask_share { gap: 8px; }
	.single-product .wrap_after_button button, .single-product .wrap_after_button a { font-size: 11px !important; }
}

/* Ajustes finos */
.single-product div.summary form.cart .single_add_to_cart_button,
.single-product div.summary form.cart .button-buy-now { width: 100% !important; box-sizing: border-box; }
@media (max-width: 768px) {
	.sm-fila--lista .sm-fila__lista ul.products { grid-template-columns: 1fr !important; }
}

/* La ficha de producto: se vence la regla del tema que dejaba margen/ancho fijo a los botones */
.woocommerce.single-product div.product div.summary form.cart .single_add_to_cart_button,
.woocommerce.single-product div.product div.summary form.cart .single_add_to_cart_button.button-buy-now { width: 100% !important; margin: 0 !important; }
.woocommerce div.product div.summary .wrap_after_button { flex-wrap: nowrap !important; justify-content: space-between; }
.woocommerce div.product div.summary .wrap_after_button .wrap_compare_wishlist { margin-bottom: 0; flex-wrap: nowrap; }
.woocommerce div.product div.summary .wrap_after_button a.button,
.woocommerce div.product div.summary .wrap_after_button button { padding-left: 0 !important; padding-right: 0 !important; gap: 5px; min-width: 0; }
@media (max-width: 480px) {
	.woocommerce div.product div.summary .wrap_after_button a.button,
	.woocommerce div.product div.summary .wrap_after_button button,
	.woocommerce div.product div.summary .wrap_after_button .woosc-btn-text,
	.woocommerce div.product div.summary .wrap_after_button .woosw-btn-text { font-size: 10px !important; letter-spacing: 0; }
	.woocommerce div.product div.summary .wrap_after_button svg { width: 13px; height: 13px; }
	.single-product .wrap_compare_wishlist, .single-product .wrap_ask_share { gap: 6px; }
}
/* Fotos de listado: el recorte se centra para mostrar el contenido de la caja */
.woocommerce ul.products > li.product .product-thumbnail > a.woocommerce-LoopProduct-link img { object-position: center center; }
.woocommerce div.product div.summary .wrap_after_button .ask-question,
.woocommerce div.product div.summary .wrap_after_button .social-share { padding-inline-end: 0; margin-right: 0; gap: 5px; }
.woocommerce div.product div.summary .wrap_after_button .wrap_ask_share { flex-wrap: nowrap; }
.woocommerce div.product div.summary .wrap_after_button { flex-direction: row !important; }
@media (max-width: 480px) {
	.woocommerce div.product div.summary .wrap_after_button { gap: 6px; }
	.woocommerce div.product div.summary .wrap_after_button .wrap_compare_wishlist,
	.woocommerce div.product div.summary .wrap_after_button .wrap_ask_share { gap: 8px; }
	.woocommerce div.product div.summary .wrap_after_button .woosc-btn-icon, .woocommerce div.product div.summary .wrap_after_button .woosw-btn-icon { margin: 0 !important; }
}
.woocommerce div.product div.summary .wrap_after_button { display: flex !important; }
.woocommerce div.product div.summary .wrap_after_button .woosc-btn,
.woocommerce div.product div.summary .wrap_after_button .woosw-btn { margin-right: 0 !important; }

/* Barra fija inferior en movil: precio a la izquierda en dos lineas (antes arriba, ahora abajo) y los dos botones en la misma linea */
@media (max-width: 767px) {
	#base-mobile-sticky-add-to-cart .base-sticky-add-to-cart-action-wrap { gap: 10px; padding-inline: 12px; justify-content: space-between; }
	#base-mobile-sticky-add-to-cart .base-sticky-add-to-cart-action-price { display: flex !important; flex-direction: column !important; align-items: flex-start !important; flex: 0 0 auto; padding-right: 0; line-height: 1.15; }
	#base-mobile-sticky-add-to-cart .base-sticky-add-to-cart-action-price del { padding-right: 0; font-size: 12px; }
	#base-mobile-sticky-add-to-cart .base-sticky-add-to-cart-action-price ins { text-decoration: none; font-size: 16px; }
	#base-mobile-sticky-add-to-cart form.cart { display: flex; flex-wrap: nowrap; flex: 1 1 auto; gap: 6px; }
	#base-mobile-sticky-add-to-cart form.cart .single_add_to_cart_button { flex: 1 1 0; width: auto !important; min-width: 0; margin: 0 !important; padding: 0 6px; height: 44px; font-size: 11px; line-height: 1.15; white-space: normal; }
}

/* ===== Movil: botones flotantes ordenados (chat, flecha de subir, interruptor dia/noche) =====
   --sm-fab = distancia al borde inferior; sube cuando aparece la barra fija de "Agregar al carrito" (61 px). */
@media (max-width: 767px) {
	:root { --sm-fab: 56px; }
	body:has(.base-sticky-add-to-cart-footer.item-is-fixed) { --sm-fab: 78px; }

	/* Chat: solo el icono de WhatsApp, en circulo, abajo a la derecha (el texto largo tapaba el pie de pagina) */
	.qlwapp__container--bottom-right,
	body:has(.base-sticky-add-to-cart-footer.item-is-fixed) .qlwapp__container--bottom-right { bottom: calc(var(--sm-fab) - 24px) !important; width: auto; }
	.qlwapp__container--bottom-right .qlwapp__button--button { width: 52px; height: 52px; padding: 0; gap: 0; border-radius: 50%; }
	.qlwapp__container--bottom-right .qlwapp__button--button .qlwapp__icon { font-size: 28px; }
	.qlwapp__container--bottom-right .qlwapp__button--button .qlwapp__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

	/* Interruptor dia/noche: abajo a la izquierda, alineado con el chat */
	.base-color-palette-fixed-switcher,
	body:has(.base-sticky-add-to-cart-footer.item-is-fixed) .base-color-palette-fixed-switcher { bottom: calc(var(--sm-fab) + 5px) !important; left: 16px !important; }

	/* Flecha de subir: justo encima del chat */
	#bt-scroll-up, #bt-scroll-up-reader,
	body:has(.base-sticky-add-to-cart-footer.item-is-fixed) #bt-scroll-up,
	body:has(.base-sticky-add-to-cart-footer.item-is-fixed) #bt-scroll-up-reader { bottom: calc(var(--sm-fab) + 66px) !important; right: 28px !important; }
}

/* Ficha de producto: la barra fija de "Agregar al carrito" (61 px) no debe tapar el credito "Sitio web desarrollado por Nube" al final de la pagina */
.single-product .sm-credito { padding-bottom: 75px; }

/* Barra superior en movil: el aviso se parte antes de "en <categorias>" y esa parte baja a la segunda linea */
@media (max-width: 767px) {
	.sm-topbar__donde { display: block; }
}

/* Menu movil: logo arriba */
.sm-menu-logo { margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--global-gray-400, #e2e8f0); }
.sm-menu-logo a { display: inline-block; line-height: 0; }
.sm-menu-logo img { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; }
/* Con el menu lateral abierto, los botones flotantes (chat, flecha, dia/noche) se ocultan para no quedar encima de las opciones */
body.showing-popup-drawer-from-left .qlwapp__container,
body.showing-popup-drawer-from-right .qlwapp__container,
body.showing-popup-drawer-from-left .base-color-palette-fixed-switcher,
body.showing-popup-drawer-from-right .base-color-palette-fixed-switcher,
body.showing-popup-drawer-from-left #bt-scroll-up,
body.showing-popup-drawer-from-right #bt-scroll-up { display: none !important; }

/* Comprar por categoria: cuadros de las categorias principales */
.sm-cats { margin: 0 0 40px; }
.sm-cats__titulo { margin: 0 0 18px; }
.sm-cats__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.sm-cat { position: relative; display: block; flex: 0 0 calc((100% - 48px) / 4); aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: #e5e5e5; text-decoration: none; }
.sm-cat img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; transition: opacity 1.2s ease, transform .4s ease; }
.sm-cat img.is-on { opacity: 1; }
.sm-cat:hover img { transform: scale(1.05); }
.sm-cat__info { z-index: 2; position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 30px 14px 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.sm-cat__nombre { font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.sm-cat__cuenta { font-size: 12px; opacity: .85; }
@media (max-width: 1024px) { .sm-cat { flex-basis: calc((100% - 32px) / 3); } }
@media (max-width: 767px) {
	.sm-cats__titulo { text-align: center; }
	.sm-cats__grid { gap: 12px; }
	.sm-cat { flex-basis: calc((100% - 12px) / 2); }
	.sm-cat__nombre { font-size: 1rem; }
}

/* Barra azul con 7 categorias: el tamano de letra y el espacio se ajustan al ancho para que quepan en una sola linea */
@media (min-width: 1025px) {
	#primary-menu { flex-wrap: nowrap !important; }
	body .primary-menu-container > ul > li.menu-item > a { white-space: nowrap; }
}
@media (min-width: 1025px) and (max-width: 1500px) {
	body .primary-menu-container > ul > li.menu-item > a { font-size: clamp(12.5px, 1.05vw, 16px) !important; padding-left: clamp(6px, .7vw, 10px) !important; padding-right: clamp(6px, .7vw, 10px) !important; }
}
@media (min-width: 1025px) and (max-width: 1279px) {
	.site-header .header-social-wrap { display: none; }
}

/* Icono de "Preguntanos": su dibujo no trae viewBox, asi que no se puede achicar con width/height (se corta). Se deja en 18 px y se reduce con transform. */
.woocommerce div.product div.summary .wrap_after_button .ask-question svg,
.single-product .wrap_after_button .ask-question svg { width: 18px; height: 18px; flex: 0 0 18px; transform: scale(.82); margin: -2px; overflow: visible; }
@media (max-width: 480px) {
	.woocommerce div.product div.summary .wrap_after_button .ask-question svg,
	.single-product .wrap_after_button .ask-question svg { transform: scale(.72); margin: -3px; }
}

/* Hero "Lo mas visto" */
.sm-hero { position: relative; margin: 0 0 48px; border-radius: 14px; overflow: hidden; color: #fff; background: linear-gradient(120deg, #0b2f35 0%, #14727e 55%, #1a9aa9 100%); }
.sm-hero__slides { display: grid; }
.sm-hero__slide { grid-area: 1 / 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; min-height: 400px; padding: 40px 56px 56px; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.sm-hero__slide.is-on { opacity: 1; visibility: visible; }
.sm-hero__img { position: relative; display: flex; justify-content: center; order: 2; }
.sm-hero__img img { display: block; width: auto; max-width: 100%; max-height: 330px; object-fit: contain; border-radius: 10px; background: #fff; box-shadow: 0 18px 44px rgba(0, 0, 0, .4); }
.sm-hero__pct { position: absolute; top: -14px; right: 6%; padding: 8px 16px; border-radius: 999px; background: #e53935; color: #fff; font-size: 1.1rem; font-weight: 800; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.sm-hero__info { order: 1; }
.sm-hero__etiqueta { display: inline-block; padding: 5px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sm-hero__titulo { margin: 16px 0 14px; font-size: clamp(1.5rem, 2.8vw, 2.5rem); font-weight: 800; line-height: 1.15; color: #fff; }
.sm-hero__titulo a { color: inherit; text-decoration: none; }
.sm-hero__precio { font-size: 2.1rem; font-weight: 800; line-height: 1.1; }
.sm-hero__precio del { margin-right: 10px; font-size: 1.15rem; font-weight: 500; opacity: .65; }
.sm-hero__precio ins { text-decoration: none; background: transparent; color: #fff; }
.sm-hero__botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.sm-hero__btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px; border-radius: 8px; font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; transition: transform .2s, background-color .2s; }
.sm-hero__btn:hover { transform: translateY(-2px); }
.sm-hero__btn--principal { background: #ff8f35; color: #fff; }
.sm-hero__btn--principal:hover { background: #ff7a12; color: #fff; }
.sm-hero__btn--sec { border: 2px solid rgba(255, 255, 255, .85); color: #fff; }
.sm-hero__btn--sec:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.sm-hero .added_to_cart { color: #fff; margin-left: 4px; align-self: center; text-decoration: underline; }
.sm-hero__puntos { position: absolute; left: 50%; bottom: 16px; display: flex; gap: 8px; transform: translateX(-50%); }
.sm-hero__puntos button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .4); cursor: pointer; transition: background-color .2s, transform .2s; }
.sm-hero__puntos button.is-on { background: #fff; transform: scale(1.25); }
@media (max-width: 767px) {
	.sm-hero__slide { grid-template-columns: 1fr; gap: 18px; min-height: 0; padding: 26px 20px 46px; text-align: center; }
	.sm-hero__img { order: 1; }
	.sm-hero__info { order: 2; }
	.sm-hero__img img { max-height: 230px; }
	.sm-hero__pct { right: 12%; }
	.sm-hero__precio { font-size: 1.7rem; }
	.sm-hero__botones { justify-content: center; }
	.sm-hero__btn { padding: 12px 20px; }
}

/* Tarjetas de producto: boton "Agregar al carrito" / "Leer mas" centrado y en el color de Surmaquetas */
.woocommerce ul.products li.product .product-details .button,
.woocommerce ul.products li.product .product-details a.button,
.woocommerce ul.products li.product .product-details a.add_to_cart_button {
	display: block; width: fit-content; max-width: 100%; margin: 12px auto 0 !important; text-align: center;
	background: #1a9aa9 !important; color: #fff !important; border-color: #1a9aa9 !important;
}
.woocommerce ul.products li.product .product-details .button:hover,
.woocommerce ul.products li.product .product-details a.add_to_cart_button:hover { background: #147f8b !important; border-color: #147f8b !important; color: #fff !important; }
.woocommerce ul.products li.product .product-details .product-action-wrap { justify-content: center; width: 100%; }
.sm-hero .sm-hero__precio, .sm-hero .sm-hero__precio .amount, .sm-hero .sm-hero__precio ins, .sm-hero .sm-hero__precio del, .sm-hero .sm-hero__precio .woocommerce-Price-currencySymbol { color: #fff !important; }
.woocommerce ul.products li.product .product-details .product-action-wrap { width: 100% !important; align-self: stretch !important; justify-content: center !important; margin-left: 0 !important; margin-right: 0 !important; }
.woocommerce ul.products li.product .product-details .product-action-wrap { max-width: none !important; }

/* Hero "Lo mas visto": fondo del color de Surmaquetas (#1A9AA9) y textos/botones centrados */
.sm-hero { background: radial-gradient(circle at 78% 40%, rgba(255, 255, 255, .16), transparent 55%), #1a9aa9; }
.sm-hero__info { text-align: center; }
.sm-hero__botones { justify-content: center; }
.sm-hero__etiqueta { background: rgba(255, 255, 255, .22); }

/* ===== Esquinas redondeadas homogeneas (mismo radio que el hero "Lo mas visto") ===== */
:root { --sm-radio: 14px; }
.woocommerce ul.products li.product { border-radius: var(--sm-radio); overflow: hidden; }
.woocommerce ul.products li.product .product-thumbnail { border-radius: var(--sm-radio) var(--sm-radio) 0 0; overflow: hidden; }
.sm-hero, .sm-cat { border-radius: var(--sm-radio); }
.sm-hero__img img { border-radius: 12px; }
.sm-fila--destacado .sm-fila__lista ul.products > li.product, .sm-fila--lista .sm-fila__lista ul.products > li.product { border-radius: var(--sm-radio); }
/* ficha de producto: foto principal, pestanas, caja de pagos y panel de categorias */
.single-product .woocommerce-product-gallery, .single-product .base-product-gallery-main, .single-product .product-images .woocommerce-product-gallery__wrapper { border-radius: var(--sm-radio); overflow: hidden; }
.single-product .woocommerce-tabs, .single-product .wc-tabs-wrapper, .single-product fieldset.single-product-payments { border-radius: var(--sm-radio); overflow: hidden; }
.single-product .product-onsale, .woocommerce .product-onsale { border-top-left-radius: var(--sm-radio); }
.widget_nav_menu, .woocommerce-account .woocommerce-MyAccount-navigation { border-radius: var(--sm-radio); }
/* botones de las tarjetas y del hero, algo mas redondeados para acompanar */
.woocommerce ul.products li.product .product-details a.button { border-radius: 10px !important; }
.sm-hero__btn { border-radius: 10px; }
.sm-tabs__label { border-radius: 10px; }
@media (max-width: 767px) { :root { --sm-radio: 12px; } }
.single-product div.summary form.cart .single_add_to_cart_button, .woocommerce.single-product div.product div.summary form.cart .single_add_to_cart_button { border-radius: 10px !important; }

/* Cinta "Agotado" (gris oscuro) */
.woocommerce .product-agotado span.onsale,
.woocommerce ul.products li.product .product-agotado span.onsale { background: #4b5563 !important; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

/* Tarjetas: el recuadro y la foto comparten el mismo redondeado (la foto queda 1 px menos por el borde del recuadro) */
.woocommerce ul.products li.product, .woocommerce ul.products li.product.entry { border-radius: var(--sm-radio) !important; }
.woocommerce ul.products li.product .product-thumbnail { border-radius: calc(var(--sm-radio) - 1px) calc(var(--sm-radio) - 1px) 0 0 !important; }

/* Pie de pagina: simbolo de Surmaquetas (el del favicon, SVG transparente) sobre el titulo "Surmaquetas" */
.footer-widget2 .widget-title { display: flex; align-items: center; gap: 10px; }
.footer-widget2 .widget-title::before { content: ""; flex: 0 0 44px; width: 44px; height: 44px; margin: -10px 0; background: url("assets/img/surmaquetas-simbolo.svg") no-repeat center / contain; }

/* Hero principal (Slider Revolution) redondeado como el resto */
sr7-module#SR7_12_1 { display: block; border-radius: var(--sm-radio); overflow: hidden; }

/* Marcas: linea en la ficha, tira de marcas en el inicio y lista en el panel de la tienda */
.sm-marca { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.sm-marca__etq { color: #6b7280; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.sm-marca__enlace { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: #f1f5f9; color: #111; font-weight: 700; text-decoration: none; }
.sm-marca__enlace:hover { background: #1a9aa9; color: #fff; }
.sm-marca__logo { width: 28px; height: auto; }
.sm-marcas { margin: 0 0 48px; }
.sm-marcas__titulo { margin: 0 0 18px; }
.sm-marcas__lista { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.sm-marca-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 150px; padding: 14px 20px; border: 1px solid #e5e5e5; border-radius: var(--sm-radio); background: #fff; color: #111; text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.sm-marca-chip:hover { border-color: #1a9aa9; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(26, 154, 169, .18); }
.sm-marca-chip img { max-width: 110px; max-height: 44px; width: auto; height: auto; }
.sm-marca-chip__nombre { font-size: 1.1rem; font-weight: 800; }
.sm-marca-chip__n { font-size: 12px; color: #6b7280; }
.sm-marcas-widget { margin-top: 24px; padding: 20px; border: 1px solid #e5e5e5; border-radius: var(--sm-radio); }
.sm-marcas-widget ul { margin: 12px 0 0; padding: 0; list-style: none; }
.sm-marcas-widget li { padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.sm-marcas-widget a { color: inherit; text-decoration: none; }
.sm-marcas-widget a:hover { color: #1a9aa9; }
.sm-marcas-widget__n { color: #6b7280; font-size: 12px; }
@media (max-width: 767px) { .sm-marcas__titulo { text-align: center; } .sm-marca-chip { min-width: 0; flex: 1 1 calc(50% - 12px); } }

/* Barra superior en escritorio: el aviso de descuento va pegado a la izquierda (alineado con el contenido) */
@media (min-width: 768px) {
	/* Misma caja que el encabezado (1450 px maximo, 15 px de margen): el aviso queda alineado con el logo y el menu con el carrito */
	.sm-topbar__inner { max-width: 1450px; margin: 0 auto; padding-left: 15px; padding-right: 15px; }
	.sm-topbar__promo, .sm-topbar__item { text-align: left; justify-items: start; }
}

/* Tienda: el titulo "Tienda" repite las migas de pan, asi que solo queda para lectores de pantalla y buscadores */
body.post-type-archive-product:not(.tax-product_cat):not(.tax-product_brand):not(.tax-product_tag) h1.archive-title {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Tienda: bloques destacados bajo las categorias (solo escritorio y tablet) */
.sm-tienda-extra { margin: 0 0 8px; }
.sm-tienda-extra .sm-fila { margin-bottom: 40px; }
.sm-todos-titulo { margin: 8px 0 14px; }
@media (max-width: 767px) { .sm-tienda-extra, .sm-todos-titulo { display: none; } }

.sm-fila__lista[data-cols="4"] { --n: 4; }
@media (max-width: 1024px) { .sm-fila__lista[data-cols="4"] { --n: 3; } }
@media (max-width: 767px) { .sm-fila__lista[data-cols="4"] { --n: 2; } }

/* Tarjetas de producto: "Comparar" como boton redondo solo con icono, al lado de "Agregar al carrito"
   (antes lo daba el CSS de templatemela-core, que en el servidor no se carga). */
.woocommerce ul.products li.product .product-action-wrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.woocommerce ul.products li.product .product-action-wrap .woosc-btn { margin: 0; padding: 0; width: 40px; height: 40px; min-width: 40px; border: none; border-radius: 50%; background: var(--global-palette7, #eee); color: var(--global-palette3, #333); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.woocommerce ul.products li.product .product-action-wrap .woosc-btn:hover { background: var(--global-palette-btn-bg, #4a9aa8); color: var(--global-palette-btn, #fff); }
.woocommerce ul.products li.product .product-action-wrap .woosc-btn-text { display: none; }
