/*
Theme Name: Tienda Catracha
Description: Tema ligero para WooCommerce. Home con Salud, Nostálgicos y Licores, carrito lateral y checkout corto.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
WC requires at least: 8.0
Text Domain: tienda-catracha
License: GPL-2.0-or-later
*/

/* Los estilos están en assets/tienda.css. Aquí solo ajustes para las páginas de WooCommerce. */
.tc-pagina { padding-block: 32px 56px; }
.tc-pagina h1 { font-size: clamp(28px, 3vw, 38px); margin-bottom: 20px; }
.woocommerce .button, .woocommerce button.button, .woocommerce #place_order {
  background: var(--azul) !important; color: #fff !important; border-radius: 999px !important;
  padding: 14px 24px !important; font-weight: 700 !important;
}
.woocommerce form .form-row input.input-text, .woocommerce form .form-row select {
  height: 46px; border-radius: 10px; border: 1.5px solid var(--linea); padding: 0 14px;
}
.woocommerce-checkout #customer_details { margin-bottom: 24px; }

/* páginas de la empresa */
.pagina-empresa { padding-bottom: 64px; }
.pagina-empresa h1 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.05; max-width: 18ch; }
.pagina-empresa h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 14px; }
.emp-intro { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; max-width: 60ch; margin: 18px 0 0; }
.emp-lema { font-weight: 700; color: var(--celeste); margin: 0 0 12px; }
.emp-portada { background: var(--azul-hondo); color: #fff; padding-block: clamp(40px, 7vw, 88px); margin-bottom: 48px; }
.emp-portada .emp-intro { color: #c9d8ee; }
.emp-portada-vino { background: var(--vino); }
.emp-portada-vino .emp-lema { color: #f3c7a6; }
.emp-portada-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: center; }
.emp-portada-grid img { width: 100%; height: auto; }
.emp-cabeza { padding-block: 44px 32px; }
.emp-cabeza .emp-intro { color: var(--tenue); }
.emp-texto { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.emp-columna p { font-size: 17px; line-height: 1.7; color: var(--tenue); margin: 0 0 16px; }
.emp-cita { margin: 0; padding: 28px; border-radius: var(--r-l); background: var(--celeste-suave); }
.emp-cita p { margin: 0; font-family: var(--f-titulo); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.3; color: var(--azul-hondo); }
.emp-banda { background: var(--superficie); margin-block: 56px; padding-block: 40px; }
.emp-cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.emp-cifras b { display: block; font-family: var(--f-titulo); font-size: 22px; margin-bottom: 6px; color: var(--azul-hondo); }
.emp-cifras span { color: var(--tenue); line-height: 1.5; }
.emp-cierre { text-align: center; }
.emp-cierre h2 { max-width: 24ch; margin-inline: auto; }
.emp-cierre .ctas { justify-content: center; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-borde-azul { background: #fff; color: var(--azul); box-shadow: inset 0 0 0 1.5px var(--azul); }
.btn-borde-azul:hover { background: var(--celeste-suave); }
.emp-pasos { margin: 0; padding: 0; list-style: none; counter-reset: paso; display: grid; gap: 18px; }
.emp-pasos li { counter-increment: paso; display: grid; grid-template-columns: 40px 1fr; gap: 14px; font-size: 17px; line-height: 1.55; color: var(--tenue); }
.emp-pasos li::before { content: counter(paso); width: 40px; height: 40px; border-radius: 50%; background: var(--azul-hondo); color: #fff; display: grid; place-items: center; font-weight: 800; }
.emp-pasos b { color: var(--tinta); }
.emp-accion { display: grid; gap: 10px; padding: 24px; border-radius: var(--r-l); background: var(--superficie); }
.emp-accion p { margin: 0 0 6px; color: var(--tenue); }
.contacto-grid { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: start; }
.contacto-datos { display: grid; gap: 20px; padding: 24px; border-radius: var(--r-l); background: var(--superficie); position: sticky; top: 20px; }
.contacto-datos dl { margin: 0; }
.contacto-datos dt { font-size: 13px; font-weight: 700; color: var(--tenue); margin-top: 16px; }
.contacto-datos dt:first-child { margin-top: 0; }
.contacto-datos dd { margin: 4px 0 0; font-size: 17px; font-weight: 600; line-height: 1.45; }
.contacto-datos dd a:hover { color: var(--azul); }
.contacto-datos .redes { display: flex; gap: 14px; flex-wrap: wrap; }
.contacto-oficinas { display: grid; gap: 20px; }
.oficina { display: grid; grid-template-columns: 1.3fr 1fr; border-radius: var(--r-l); overflow: hidden; background: #fff; border: 1.5px solid var(--linea); }
.oficina iframe { width: 100%; height: 100%; min-height: 260px; border: 0; display: block; }
.oficina > div { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.oficina h2 { font-size: 24px; margin: 0; }
.oficina p { margin: 0; color: var(--tenue); line-height: 1.5; }
.oficina a { font-weight: 700; color: var(--azul); margin-top: auto; }
@media (max-width: 900px) {
  .emp-portada-grid, .emp-texto, .contacto-grid, .oficina { grid-template-columns: 1fr; }
  .emp-portada-grid img { width: 180px; }
  .emp-cifras { grid-template-columns: 1fr; gap: 20px; }
  .contacto-datos { position: static; }
  .oficina iframe { min-height: 220px; }
}
.tc-aviso-link { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; background: var(--celeste-suave); color: var(--azul-hondo); padding: 16px 20px; border-radius: 16px; margin-bottom: 24px; }
.tc-aviso-link span { grid-column: 1; font-size: 13px; font-weight: 600; color: var(--tenue); }
.tc-aviso-link b { grid-column: 1; font-size: 17px; }
.tc-aviso-link strong { grid-column: 2; grid-row: 1 / span 2; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* mi cuenta */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.woocommerce-account .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content { float: none !important; width: auto !important; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 8px; border: 1.5px solid var(--linea); border-radius: 14px; }
.woocommerce-MyAccount-navigation li a { display: block; padding: 11px 14px; border-radius: 10px; color: var(--tinta); font-weight: 600; text-decoration: none; }
.woocommerce-MyAccount-navigation li a:hover { background: var(--celeste-suave); }
.woocommerce-MyAccount-navigation li.is-active a { background: var(--azul); color: #fff; }
.woocommerce-MyAccount-content { font-size: 16px; line-height: 1.6; }
.woocommerce-account:not(.logged-in) .woocommerce { display: block; max-width: 460px; }
.woocommerce table.shop_table { border-radius: 12px; border-collapse: separate; }
@media (max-width: 760px) {
  .woocommerce-account .woocommerce { grid-template-columns: 1fr; gap: 20px; }
  .woocommerce-MyAccount-navigation ul { display: flex; overflow-x: auto; gap: 4px; }
  .woocommerce-MyAccount-navigation li a { white-space: nowrap; }
}

/* catálogo */
.woocommerce ul.products li.product a img { aspect-ratio: 1; object-fit: contain; background: #f4f6f9; border-radius: 14px; padding: 8px; margin-bottom: 12px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 16px !important; font-weight: 600; line-height: 1.3; color: var(--tinta); text-transform: none; }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--tinta) !important; font-weight: 700; font-size: 17px; }
.woocommerce ul.products li.product .button { padding: 10px 18px !important; font-size: 14px !important; }
.woocommerce .woocommerce-ordering select { height: 42px; border-radius: 10px; border: 1.5px solid var(--linea); padding: 0 12px; }
.woocommerce div.product .product_title { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; }
.woocommerce div.product div.images img { border-radius: 16px; background: #f4f6f9; }
.woocommerce span.onsale { background: var(--vino, #8a1c2b); border-radius: 999px; min-height: 0; min-width: 0; padding: 4px 10px; line-height: 1.4; }
@media (max-width: 760px) {
  .woocommerce ul.products[class*=columns-] li.product { width: 48% !important; margin-right: 4% !important; }
  .woocommerce ul.products[class*=columns-] li.product:nth-child(2n) { margin-right: 0 !important; }
  .woocommerce ul.products li.product .button { width: 100%; text-align: center; }
}

/* 404 */
.tc-404 { padding-block: 64px 96px; max-width: 720px; }
.tc-404-buscar { display: flex; gap: 10px; margin: 28px 0 20px; }
.tc-404-buscar input[type=search] { flex: 1; height: 50px; border-radius: 999px; border: 1.5px solid var(--linea); padding: 0 20px; font-size: 16px; }
.tc-404-buscar .button { background: var(--azul); color: #fff; border: 0; border-radius: 999px; padding: 0 24px; font-weight: 700; cursor: pointer; }

/* ficha de producto */
.woocommerce div.product div.images { max-width: 520px; }
.woocommerce div.product div.images .woocommerce-product-gallery__image img { max-height: 520px; width: 100%; object-fit: contain; padding: 16px; }
.woocommerce div.product .summary { position: sticky; top: 150px; }
.woocommerce div.product form.cart .qty { height: 46px; width: 64px; border-radius: 10px; border: 1.5px solid var(--linea); }
.woocommerce div.product .product_meta { font-size: 14px; color: var(--tenue); }
.woocommerce div.product .woocommerce-tabs { clear: both; padding-top: 32px; }
@media (max-width: 760px) {
  .woocommerce div.product .summary { position: static; }
  .woocommerce div.product div.images .woocommerce-product-gallery__image img { max-height: 360px; }
}

/* checkout en dos columnas */
.woocommerce-checkout .tc-pagina h1 { margin-bottom: 8px; }
.woocommerce-checkout form.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 440px; column-gap: 48px; align-items: start; }
.woocommerce-checkout form.checkout > * { grid-column: 1; }
.woocommerce-checkout #customer_details .col-1, .woocommerce-checkout #customer_details .col-2 { float: none; width: 100%; }
.woocommerce-checkout #customer_details .col-2:empty { display: none; }
.woocommerce-checkout #order_review_heading { grid-column: 2; grid-row: 1; margin: 0 0 12px; font-size: 20px; }
.woocommerce-checkout #order_review { grid-column: 2; grid-row: 2 / span 20; position: sticky; top: 150px; background: #f6f8fb; border: 1.5px solid var(--linea); border-radius: 18px; padding: 20px; }
.woocommerce-checkout h3 { font-size: 20px; margin: 4px 0 14px; }
.woocommerce-checkout form .form-row { margin-bottom: 14px; }
.woocommerce-checkout form .form-row label { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.woocommerce-checkout table.shop_table { border: 0; margin: 0 0 16px; background: transparent; }
.woocommerce-checkout table.shop_table th, .woocommerce-checkout table.shop_table td { border-top: 1px solid var(--linea); padding: 10px 4px; font-size: 15px; }
.woocommerce-checkout table.shop_table thead th { border-top: 0; color: var(--tenue); font-weight: 600; font-size: 13px; }
.woocommerce-checkout table.shop_table .order-total th, .woocommerce-checkout table.shop_table .order-total td { font-size: 19px; font-weight: 800; }
.woocommerce-checkout #payment { background: #fff !important; border-radius: 14px !important; border: 1.5px solid var(--linea); }
.woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid var(--linea); padding: 14px; }
.woocommerce-checkout #payment div.payment_box { background: #f6f8fb !important; border-radius: 10px; }
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce-checkout #payment .place-order { padding: 14px !important; }
.woocommerce-checkout #place_order { width: 100%; font-size: 17px !important; }
.woocommerce-checkout .woocommerce-privacy-policy-text p { font-size: 13px; color: var(--tenue); line-height: 1.5; }
.woocommerce-checkout .woocommerce-form-coupon-toggle, .woocommerce-checkout .woocommerce-form-login-toggle { grid-column: 1 / -1; }
@media (max-width: 960px) {
  .woocommerce-checkout form.checkout { display: block; }
  .woocommerce-checkout #order_review { position: static; margin-top: 8px; }
  .woocommerce-checkout #order_review_heading { margin-top: 28px; }
}

/* pie: WhatsApp y tarjetas */
.pie .pie-wa { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.pie .pie-wa svg { width: 18px; height: 18px; color: #25d366; }
.pie-base .pagos { align-items: center; gap: 8px; }
.pie-base .pagos img { width: 46px; height: 30px; border-radius: 5px; background: #fff; }
.pie-base .pagos small { color: rgba(255,255,255,.7); font-size: 12px; margin-left: 6px; }

/* menú: Inicio */
.menu a.m-inicio { color: var(--tinta); font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.menu a.m-inicio svg { width: 17px; height: 17px; }
.menu a.m-inicio.activo { color: var(--azul); }

/* página de gracias */
.woocommerce-order-received .tc-pagina { padding-block: 40px 72px; }
.woocommerce-order-received .woocommerce-notices-wrapper:empty { display: none; }
.gracias { max-width: 960px; margin-inline: auto; display: grid; gap: 28px; }
.gracias-cabeza { text-align: center; display: grid; justify-items: center; gap: 10px; padding-block: 8px 4px; }
.gracias-icono { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: #e5f5ec; color: var(--ok); margin-bottom: 6px; animation: gracias-pop .5s cubic-bezier(.2,.9,.3,1.3) both; }
.gracias-icono svg { width: 36px; height: 36px; }
.gracias-check { stroke-dasharray: 24; stroke-dashoffset: 24; animation: gracias-trazo .45s .25s ease-out forwards; }
.gracias-icono-alerta { background: #fdecee; color: var(--oferta); }
.gracias-pedido { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tenue); }
.gracias-titulo { margin: 0; font-family: var(--f-titulo); font-size: clamp(30px, 4.2vw, 44px); line-height: 1.08; text-wrap: balance; color: var(--tinta); }
.gracias-sub { margin: 0; max-width: 52ch; font-size: 17px; line-height: 1.55; color: var(--tenue); }
.gracias-sub strong { color: var(--tinta); font-weight: 600; }
.gracias-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
.gracias-caja { border: 1.5px solid var(--linea); border-radius: 20px; padding: 24px; background: #fff; }
.gracias-caja h3 { margin: 0 0 16px; font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tenue); }
.gracias-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.gracias-items li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.gracias-foto { position: relative; width: 56px; height: 56px; border-radius: 12px; background: var(--superficie); display: grid; place-items: center; color: var(--tenue); }
.gracias-foto img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; padding: 4px; margin: 0 !important; }
.gracias-foto svg { width: 24px; height: 24px; }
.gracias-foto b { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--tinta); color: #fff; font-size: 12px; display: grid; place-items: center; }
.gracias-nombre { font-weight: 600; line-height: 1.3; }
.gracias-precio { font-weight: 600; font-variant-numeric: tabular-nums; }
.gracias-totales { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--linea); display: grid; gap: 8px; }
.gracias-totales div { display: flex; justify-content: space-between; gap: 12px; }
.gracias-totales dt { color: var(--tenue); }
.gracias-totales dd { margin: 0; font-variant-numeric: tabular-nums; }
.gracias-total dt, .gracias-total dd { font-size: 20px; font-weight: 800; color: var(--tinta); }
.gracias-metodo { margin: 16px 0 0; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--tenue); }
.gracias-metodo svg { width: 18px; height: 18px; flex: none; }
.gracias-pasos { list-style: none; margin: 0 0 22px; padding: 0; display: grid; }
.gracias-pasos li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; position: relative; padding-bottom: 18px; }
.gracias-pasos li:last-child { padding-bottom: 0; }
.gracias-pasos li::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: 0; width: 2px; background: var(--linea); }
.gracias-pasos li:last-child::before { display: none; }
.gracias-pasos li > span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--linea); background: #fff; margin-top: 1px; }
.gracias-pasos li.hecho > span { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center/14px no-repeat; }
.gracias-pasos b { display: block; font-weight: 700; }
.gracias-pasos small { display: block; color: var(--tenue); font-size: 14px; line-height: 1.45; margin-top: 2px; }
.gracias-botones { display: flex; flex-wrap: wrap; gap: 10px; }
.gracias-cabeza .gracias-botones { justify-content: center; margin-top: 10px; }
.gracias-btn { flex: 1 1 auto; display: inline-flex; justify-content: center; align-items: center; min-height: 50px; padding: 0 22px; border-radius: 999px; background: var(--azul); color: #fff !important; font-weight: 700; text-decoration: none; transition: background .15s; }
.gracias-btn:hover { background: var(--azul-hondo); }
.gracias-btn-borde { background: #fff; color: var(--tinta) !important; border: 1.5px solid var(--linea); }
.gracias-btn-borde:hover { background: var(--superficie); }
.gracias-ayuda { margin: 16px 0 0; font-size: 14px; color: var(--tenue); text-align: center; }
.gracias-ayuda a { color: var(--azul); font-weight: 600; }
.gracias-pasarela:empty { display: none; }
@keyframes gracias-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes gracias-trazo { to { stroke-dashoffset: 0; } }
@media (max-width: 760px) {
  .gracias-grid { grid-template-columns: 1fr; }
  .gracias-caja { padding: 20px; border-radius: 18px; }
}

/* procesando el pago */
html.tc-sin-scroll { overflow: hidden; }
.tc-procesando { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: rgba(8, 40, 90, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: tc-aparecer .2s ease-out; }
.tc-procesando-caja { width: min(400px, 100%); background: #fff; border-radius: 24px; padding: 34px 28px 26px; text-align: center; box-shadow: 0 24px 60px rgba(8, 40, 90, .28); }
.tc-procesando-t { margin: 22px 0 6px; font-family: var(--f-titulo); font-size: 22px; font-weight: 700; color: var(--tinta); }
.tc-procesando-s { margin: 0; font-size: 16px; line-height: 1.5; color: var(--tenue); }
.tc-procesando-seguro { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--linea); display: flex; justify-content: center; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--tenue); }
.tc-procesando-seguro svg { width: 16px; height: 16px; color: var(--ok); }
.tc-cargador { display: inline-flex; gap: 8px; height: 18px; align-items: center; }
.tc-cargador i { width: 14px; height: 14px; border-radius: 50%; background: var(--azul); animation: tc-salto 1s ease-in-out infinite; }
.tc-cargador i:nth-child(2) { background: var(--celeste); animation-delay: .15s; }
.tc-cargador i:nth-child(3) { background: var(--azul-hondo); animation-delay: .3s; }
@keyframes tc-salto { 0%, 80%, 100% { transform: translateY(0) scale(.85); opacity: .55; } 40% { transform: translateY(-10px) scale(1); opacity: 1; } }
@keyframes tc-aparecer { from { opacity: 0; } to { opacity: 1; } }

/* el giro chico de WooCommerce al recalcular el total */
.woocommerce .blockUI.blockOverlay { background: rgba(255, 255, 255, .7) !important; }
.woocommerce .blockUI.blockOverlay::before, .woocommerce .loader::before {
  background: none !important; width: 26px !important; height: 26px !important; margin: -13px 0 0 -13px !important;
  border: 3px solid var(--linea); border-top-color: var(--azul); border-radius: 50%; animation: tc-giro .7s linear infinite !important;
}
@keyframes tc-giro { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .gracias-icono, .gracias-check, .tc-cargador i, .tc-procesando { animation: none !important; }
  .gracias-check { stroke-dashoffset: 0; }
}
