/*
Theme Name: Punto Tire
Description: Tema propio de Punto Tire para WooCommerce. Sin page builders: PHP + CSS puro. Identidad azul marino (#00109B) con buscador de llantas por medida.
Author: Briayam
Version: 1.0.0
Requires PHP: 7.4
*/

:root {
  --brand: #00109B;
  --brand-dark: #000B6E;
  --brand-light: #E9EBFA;
  --ink: #0A0A14;
  --gray: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; height: auto; }
.pt-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ── Header ── */
.pt-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.pt-header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.pt-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); }
.pt-logo img { width: 44px; height: 44px; object-fit: contain; }
.pt-logo span b { color: var(--brand); }
.pt-nav { display: none; gap: 24px; font-size: 14px; font-weight: 500; }
.pt-nav a { color: var(--gray); }
.pt-nav a:hover { color: var(--brand); }
.pt-head-right { display: flex; align-items: center; gap: 14px; }
.pt-phone { display: none; font-size: 14px; color: var(--gray); font-weight: 500; }
.pt-cart { position: relative; color: var(--ink); font-size: 20px; }
.pt-cart-n { position: absolute; top: -6px; right: -10px; background: var(--brand); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; }
@media (min-width: 768px) { .pt-nav { display: flex; } .pt-phone { display: block; } }

/* ── Hero ── */
.pt-hero { background: linear-gradient(135deg, var(--brand-dark), var(--brand) 55%, var(--brand-dark)); color: #fff; padding: 56px 0; }
.pt-hero-grid { display: grid; gap: 32px; }
@media (min-width: 992px) { .pt-hero-grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.pt-hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin: 0 0 12px; font-weight: 800; }
.pt-hero h1 em { color: #93c5fd; font-style: normal; }
.pt-hero p { color: rgba(255,255,255,.85); font-size: 17px; max-width: 460px; }
.pt-hero-badges { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font-size: 14px; color: rgba(255,255,255,.9); }

/* ── Buscador por medida ── */
.pt-search { background: rgba(10,10,20,.85); border-radius: 18px; padding: 24px; }
.pt-search h2 { color: #fff; font-size: 18px; margin: 0 0 14px; }
.pt-search-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.pt-search label { display: block; color: rgba(255,255,255,.75); font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.pt-search select { width: 100%; height: 46px; border-radius: 10px; border: none; padding: 0 10px; font-size: 15px; font-weight: 600; }
.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border: none; height: 46px; padding: 0 22px; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; }
.pt-btn:hover { background: var(--brand-dark); }
.pt-search-hint { color: rgba(255,255,255,.6); font-size: 12px; margin-top: 10px; }
@media (max-width: 640px) { .pt-search-row { grid-template-columns: 1fr 1fr; } }

/* ── Secciones ── */
.pt-section { padding: 48px 0; }
.pt-section h2 { font-size: 26px; font-weight: 800; margin: 0 0 22px; }
.pt-benefits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -30px; position: relative; }
@media (min-width: 992px) { .pt-benefits { grid-template-columns: repeat(4, 1fr); } }
.pt-benefit { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; gap: 12px; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.pt-benefit .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-light); color: var(--brand); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.pt-benefit b { display: block; font-size: 14px; }
.pt-benefit small { color: var(--gray); font-size: 12px; }

.pt-brands { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pt-brand-pill { border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 600; color: #334155; background: #fff; }
.pt-brand-pill:hover { border-color: var(--brand); color: var(--brand); }

.pt-about { display: grid; gap: 28px; }
@media (min-width: 992px) { .pt-about { grid-template-columns: 1fr 1fr; align-items: center; } }
.pt-about p { color: #475569; line-height: 1.7; }
.pt-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.pt-card ul { list-style: none; padding: 0; margin: 12px 0 0; color: #475569; font-size: 14px; }
.pt-card li { margin: 6px 0; }
.pt-wa { display: inline-flex; align-items: center; gap: 8px; background: #22c55e; color: #fff; font-weight: 700; font-size: 14px; padding: 12px 20px; border-radius: 12px; }
.pt-wa:hover { background: #16a34a; color: #fff; }

.pt-faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.pt-faq summary { font-weight: 600; font-size: 14px; cursor: pointer; }
.pt-faq p { color: #475569; font-size: 14px; margin: 10px 0 0; }

/* ── Footer ── */
.pt-footer { background: var(--ink); color: #cbd5e1; margin-top: 56px; }
.pt-footer-grid { display: grid; gap: 28px; padding: 44px 0; }
@media (min-width: 768px) { .pt-footer-grid { grid-template-columns: repeat(4, 1fr); } }
.pt-footer h4 { color: #fff; font-size: 14px; margin: 0 0 12px; }
.pt-footer a { color: #cbd5e1; }
.pt-footer a:hover { color: #fff; }
.pt-footer li { margin: 7px 0; font-size: 14px; list-style: none; }
.pt-footer ul { padding: 0; margin: 0; }
.pt-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); text-align: center; font-size: 12px; color: #64748b; padding: 16px 0; }

/* ── WooCommerce: acabado Punto Tire ── */
.woocommerce .button, .woocommerce a.button, .woocommerce button.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt {
  background: var(--brand) !important; color: #fff !important; border-radius: 10px !important; font-weight: 700 !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--brand-dark) !important; }
.woocommerce span.onsale { background: var(--brand) !important; border-radius: 8px !important; }
.woocommerce ul.products li.product { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px; font-weight: 700; }
.woocommerce ul.products li.product .price { color: var(--ink) !important; font-weight: 800; }
.woocommerce ul.products li.product .price del { color: #94a3b8 !important; font-weight: 400; }
.woocommerce div.product p.price { color: var(--ink); font-weight: 800; font-size: 26px; }
.woocommerce div.product p.price del { color: #94a3b8; font-size: 18px; }
.pt-main { padding: 28px 0; }

/* ── v1.1: logo solo, menú móvil, slider, filtros, centro de servicio ── */
.pt-logo .custom-logo { width: 48px; height: 48px; object-fit: contain; display: block; }
.pt-logo-text { font-weight: 800; font-size: 18px; color: var(--ink); }
.pt-logo-text b { color: var(--brand); }

/* Menú móvil (hamburguesa, sin JS) */
.pt-nav-toggle { display: none; }
.pt-burger { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; }
.pt-burger span { width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .2s; }
@media (max-width: 767px) {
  .pt-burger { display: flex; }
  .pt-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); padding: 10px 16px 14px; flex-direction: column; gap: 2px;
    box-shadow: 0 8px 16px rgba(0,0,0,.06); }
  .pt-nav a { display: block; padding: 11px 6px; border-radius: 8px; font-size: 15px; }
  .pt-nav a:active { background: var(--brand-light); }
  .pt-nav-toggle:checked ~ .pt-nav { display: flex; }
  .pt-nav-toggle:checked ~ .pt-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .pt-nav-toggle:checked ~ .pt-burger span:nth-child(2) { opacity: 0; }
  .pt-nav-toggle:checked ~ .pt-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}
.pt-header-in { position: relative; }

/* Slider de ofertas */
.pt-slider-wrap { padding: 26px 0 0; }
.pt-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
  border-radius: 16px; scrollbar-width: none; }
.pt-slider::-webkit-scrollbar { display: none; }
.pt-slide { flex: 0 0 100%; scroll-snap-align: start; }
.pt-slide img { width: 100%; height: auto; max-height: 380px; object-fit: cover; border-radius: 16px; display: block; }
.pt-slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.pt-slider-dots a { width: 9px; height: 9px; border-radius: 999px; background: #cbd5e1; }
.pt-slider-dots a:hover { background: var(--brand); }

/* Tienda: layout con barra de filtros */
.pt-shop-layout { display: grid; gap: 22px; }
@media (min-width: 900px) { .pt-shop-layout { grid-template-columns: 240px 1fr; align-items: start; } }
.pt-filters { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; position: sticky; top: 80px; }
.pt-filters h3 { margin: 0 0 10px; font-size: 16px; }
.pt-f-label { display: block; font-size: 12px; font-weight: 700; color: var(--gray); margin: 12px 0 4px; }
.pt-filters select, .pt-f-price input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; font-size: 14px; }
.pt-f-price { display: flex; align-items: center; gap: 6px; }
.pt-f-apply { width: 100%; margin-top: 14px; }
.pt-f-clear { display: block; text-align: center; font-size: 13px; margin-top: 8px; color: var(--gray); }
@media (max-width: 899px) { .pt-filters { position: static; } }

/* Centro de servicio */
.pt-hero-sm { padding: 44px 0; }
.pt-serv-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pt-serv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .pt-serv-grid { grid-template-columns: repeat(4, 1fr); } }
.pt-serv { text-align: center; }
.pt-serv-ico { font-size: 34px; }
.pt-serv h3 { font-size: 16px; margin: 8px 0 6px; }
.pt-serv p { color: var(--gray); font-size: 13.5px; margin: 0; line-height: 1.5; }
.pt-steps { color: #475569; line-height: 1.9; padding-left: 20px; }

/* Responsive: refuerzos generales */
img, video, iframe { max-width: 100%; }
@media (max-width: 640px) {
  .pt-hero { padding: 36px 0; }
  .pt-hero p { font-size: 15px; }
  .pt-search { padding: 16px; }
  .pt-section { padding: 34px 0; }
  .pt-section h2 { font-size: 21px; }
  .pt-footer-grid { padding: 32px 0; }
  .pt-slide img { max-height: 220px; }
  /* Woo: 2 columnas de productos en móvil */
  .woocommerce ul.products { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; }
  .woocommerce ul.products li.product { width: 100% !important; margin: 0 !important; float: none !important; }
  /* Tablas de carrito/checkout scrolleables */
  .woocommerce table.shop_table { display: block; overflow-x: auto; }
}

/* ── Filtros acordeón (v1.2, estilo limpio) ── */
.pt-f-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pt-f-head h3 { margin: 0; }
.pt-filters details { border-top: 1px solid var(--line); padding: 10px 0; }
.pt-filters details:first-of-type { border-top: none; }
.pt-filters summary { font-weight: 700; font-size: 14px; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; padding: 2px 0; }
.pt-filters summary::after { content: '＋'; color: var(--brand); font-size: 15px; }
.pt-filters details[open] summary::after { content: '－'; }
.pt-filters details > *:not(summary) { margin-top: 8px; }
.pt-f-radios { max-height: 190px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.pt-f-radios label { font-size: 14px; color: #334155; display: flex; align-items: center; gap: 7px; cursor: pointer; padding: 3px 2px; }
.pt-f-radios input { accent-color: var(--brand); }
.pt-f-clear { font-size: 12.5px; color: var(--gray); }

/* ── Slider v1.3: full-width y más aire arriba ── */
.pt-slider-wrap { padding: 40px 0 0; }          /* más separación del bloque de beneficios */
.pt-slider { border-radius: 0; gap: 0; }         /* a todo el ancho, sin esquinas ni gap */
.pt-slide img { max-height: 460px; border-radius: 0; }
.pt-slider-dots { margin-top: 14px; }
@media (max-width: 640px) {
  .pt-slider-wrap { padding: 26px 0 0; }
  .pt-slide img { max-height: 240px; }
}

/* ── Slider v1.4: por transform (avance confiable) ── */
.pt-slider-viewport { overflow: hidden; width: 100%; }
.pt-slider-track { display: flex; width: 100%; transition: transform .6s ease; }
.pt-slider-track .pt-slide { flex: 0 0 100%; min-width: 100%; }
.pt-slider-track .pt-slide img { width: 100%; height: auto; max-height: 460px; object-fit: cover; display: block; }
.pt-slider-dots button { border: none; padding: 0; width: 10px; height: 10px; border-radius: 999px; background: #cbd5e1; cursor: pointer; }
.pt-slider-dots button.pt-dot-on { background: var(--brand); }
@media (max-width: 640px) { .pt-slider-track .pt-slide img { max-height: 240px; } }

/* ── Slider v1.5: reglas reforzadas (ganan a estilos heredados) ── */
.pt-slider-wrap .pt-slider-viewport { overflow: hidden !important; width: 100% !important; }
.pt-slider-wrap .pt-slider-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  transition: transform .6s ease !important;
}
.pt-slider-wrap .pt-slider-track .pt-slide {
  flex: 0 0 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
}
.pt-slider-wrap .pt-slider-track .pt-slide img {
  width: 100% !important;
  height: auto !important;
  max-height: 460px;
  object-fit: cover;
  display: block !important;
}
@media (max-width: 640px) {
  .pt-slider-wrap .pt-slider-track .pt-slide img { max-height: 240px; }
}

/* ── Slider v1.6: imagen COMPLETA, sin recortes ── */
.pt-slider-wrap .pt-slider-track .pt-slide img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;   /* sin tope que recorte */
  object-fit: contain !important; /* muestra la imagen entera */
  display: block !important;
}
@media (max-width: 640px) {
  .pt-slider-wrap .pt-slider-track .pt-slide img { max-height: none !important; }
}
