/* Tienda web — Alex Villom.
   Estructura inspirada en boutiques de lujo (rejilla amplia, fichas con
   galería a dos columnas e info fija, bolsa lateral) con la paleta de la
   marca: blanco, marrón #4a2f22, Bodoni Moda / Pinyon Script del sitio. */
.t {
  --t-bg: #ffffff;
  --t-tile: #f3f0ea;
  --t-line: rgba(74, 47, 34, 0.16);
  --t-ink: #2a2118;
  --t-soft: #6b5c4a;
  --t-faint: #a89a85;
  --t-brown: #4a2f22;
  --t-danger: #a8503f;
  --t-ok: #5f7a4f;
  --t-ui: Optima, Candara, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-family: var(--t-ui);
  color: var(--t-ink);
}
.t * { box-sizing: border-box; }
.t a { color: inherit; text-decoration: none; }
.t-wrap { max-width: 1360px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 44px); }

/* Aviso superior + subnavegación */
.t-bar {
  background: #f7f5f1; border-bottom: 1px solid var(--t-line);
  text-align: center; font-size: 12px; letter-spacing: .08em; padding: 9px 12px; color: var(--t-soft);
}
.t-subnav { border-bottom: 1px solid var(--t-line); background: #fff; }
.t-subnav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; flex-wrap: wrap; }
.t-cats { display: flex; gap: clamp(14px, 2.4vw, 34px); flex-wrap: wrap; justify-content: center; flex: 1; }
.t-cats a { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; padding: 17px 0 15px; border-bottom: 1.5px solid transparent; color: var(--t-soft); }
.t-cats a:hover, .t-cats a.on { color: var(--t-brown); border-bottom-color: var(--t-brown); }
.t-search { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--t-line); min-width: 180px; }
.t-search input { border: 0; outline: 0; font: inherit; font-size: 14px; padding: 8px 0; width: 100%; background: transparent; color: var(--t-ink); }
.t-search button { background: none; border: 0; cursor: pointer; color: var(--t-soft); padding: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.t-cartlink { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; background: none; border: 0; color: var(--t-brown); font-family: inherit; min-width: 180px; text-align: right; }

/* Listado */
.t-head { text-align: center; padding: clamp(28px, 5vw, 64px) 0 clamp(18px, 3vw, 36px); }
.t-head h1 { font-family: var(--font-site-body, serif); font-weight: 400; font-size: clamp(26px, 3.4vw, 40px); color: var(--t-brown); margin: 0; }
.t-head p { color: var(--t-soft); font-size: 14px; margin: 10px auto 0; max-width: 520px; line-height: 1.6; }
.t-toolbar { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--t-line); border-bottom: 1px solid var(--t-line); padding: 12px 0; font-size: 13px; color: var(--t-soft); margin-bottom: clamp(22px, 3vw, 40px); }
.t-toolbar select { font: inherit; border: 0; background: transparent; color: var(--t-brown); cursor: pointer; letter-spacing: .06em; }
.t-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 30px) clamp(10px, 1.2vw, 18px); padding-bottom: 80px; }
@media (max-width: 1000px) { .t-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .t-grid { grid-template-columns: repeat(2, 1fr); } }
.t-card { display: block; }
.t-tile { position: relative; aspect-ratio: 4 / 5; background: var(--t-tile); overflow: hidden; }
.t-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform .6s ease; }
.t-tile img.alt { opacity: 0; }
.t-card:hover .t-tile img.alt { opacity: 1; }
.t-card:hover .t-tile img:not(.alt) { transform: scale(1.015); }
.t-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-site-title, cursive); font-size: 34px; color: rgba(74,47,34,.35); }
.t-tag { position: absolute; left: 10px; top: 10px; background: #fff; color: var(--t-brown); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 5px 8px; }
.t-card-info { padding: 12px 2px 0; text-align: left; }
.t-card-name { font-size: 15px; color: var(--t-ink); line-height: 1.35; }
.t-card-mat { font-size: 13px; color: var(--t-soft); margin-top: 2px; }
.t-card-price { font-size: 14px; color: var(--t-ink); margin-top: 6px; }
.t-empty { text-align: center; padding: 90px 0 140px; color: var(--t-soft); }
.t-empty h2 { font-family: var(--font-site-title, cursive); font-size: clamp(38px, 6vw, 64px); color: var(--t-brown); font-weight: 400; margin: 0 0 8px; }

/* Ficha de producto */
.t-crumbs { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--t-faint); padding: 18px 0; }
.t-crumbs a:hover { color: var(--t-brown); }
.t-pdp { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(24px, 4vw, 64px); padding-bottom: 90px; align-items: start; }
@media (max-width: 900px) { .t-pdp { grid-template-columns: 1fr; } }
.t-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.t-gallery .t-tile { aspect-ratio: 4 / 5; }
.t-info { position: sticky; top: 24px; }
@media (max-width: 900px) { .t-info { position: static; } }
.t-info h1 { font-family: var(--font-site-body, serif); font-weight: 400; font-size: 26px; color: var(--t-ink); margin: 0; line-height: 1.25; }
.t-info .mat { color: var(--t-brown); font-size: 14px; margin-top: 6px; }
.t-info .price { font-size: 17px; margin: 18px 0; color: var(--t-ink); }
.t-sep { border: 0; border-top: 1px solid var(--t-line); margin: 20px 0; }
.t-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--t-soft); margin-bottom: 10px; }
.t-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.t-opt { min-width: 52px; text-align: center; padding: 11px 14px; border: 1px solid var(--t-line); background: #fff; cursor: pointer; font: inherit; font-size: 14px; color: var(--t-ink); }
.t-opt:hover { border-color: var(--t-brown); }
.t-opt.on { border-color: var(--t-brown); box-shadow: inset 0 0 0 1px var(--t-brown); }
.t-opt:disabled { color: var(--t-faint); text-decoration: line-through; cursor: not-allowed; background: #faf9f7; }
.t-stock { font-size: 13px; margin-top: 12px; min-height: 18px; color: var(--t-soft); }
.t-stock.low { color: var(--t-danger); }
.t-qty { display: inline-flex; align-items: center; border: 1px solid var(--t-line); }
.t-qty button { width: 40px; height: 44px; background: #fff; border: 0; font-size: 18px; cursor: pointer; color: var(--t-brown); }
.t-qty span { min-width: 34px; text-align: center; font-size: 15px; }
.t-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 16px 20px; background: var(--t-brown); color: #fff !important;
  border: 1.5px solid var(--t-brown); font: inherit; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; transition: background .15s, color .15s; }
.t-btn:hover { background: #fff; color: var(--t-brown) !important; }
.t-btn:disabled { opacity: .45; cursor: not-allowed; }
.t-btn.ghost { background: #fff; color: var(--t-brown) !important; }
.t-btn.ghost:hover { background: var(--t-brown); color: #fff !important; }
.t-acc { border-top: 1px solid var(--t-line); }
.t-acc:last-of-type { border-bottom: 1px solid var(--t-line); }
.t-acc summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; padding: 16px 0; font-size: 15px; }
.t-acc summary::-webkit-details-marker { display: none; }
.t-acc summary::after { content: "+"; color: var(--t-brown); }
.t-acc[open] summary::after { content: "–"; }
.t-acc .body { padding: 0 0 18px; font-size: 14px; color: var(--t-soft); line-height: 1.7; white-space: pre-line; }

/* Bolsa lateral */
.t-overlay { position: fixed; inset: 0; background: rgba(42, 33, 24, .38); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90; }
.t-overlay.on { opacity: 1; pointer-events: auto; }
.t-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw); background: #fff; z-index: 100; transform: translateX(100%);
  transition: transform .3s ease, visibility 0s linear .3s; display: flex; flex-direction: column; visibility: hidden; }
.t-drawer.on { transform: none; visibility: visible; box-shadow: -10px 0 40px rgba(0,0,0,.08); transition: transform .3s ease; }
.t-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--t-line); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.t-x { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--t-brown); }
.t-drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.t-drawer-foot { border-top: 1px solid var(--t-line); padding: 18px 24px 24px; }
.t-line { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--t-line); }
.t-line .t-tile { aspect-ratio: 4 / 5; }
.t-line-name { font-size: 14px; line-height: 1.35; }
.t-line-var { font-size: 12px; color: var(--t-soft); margin-top: 2px; }
.t-line-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 14px; }
.t-line .t-qty button { height: 32px; width: 32px; font-size: 16px; }
.t-line .t-qty span { font-size: 14px; min-width: 28px; }
.t-rm { background: none; border: 0; color: var(--t-faint); font-size: 12px; text-decoration: underline; cursor: pointer; padding: 0; }
.t-warn { font-size: 12px; color: var(--t-danger); margin-top: 6px; }
.t-sumrow { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: var(--t-soft); }
.t-sumrow.total { color: var(--t-ink); font-size: 16px; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--t-line); }
.t-note { font-size: 12px; color: var(--t-faint); text-align: center; margin: 10px 0 0; line-height: 1.5; }

/* Carrito, checkout, gracias */
.t-page { padding-top: clamp(24px, 4vw, 56px); padding-bottom: 100px; }
.t-page h1 { font-family: var(--font-site-body, serif); font-weight: 400; font-size: clamp(26px, 3vw, 36px); color: var(--t-brown); margin: 0 0 28px; text-align: center; }
.t-two { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(24px, 4vw, 64px); align-items: start; }
@media (max-width: 900px) { .t-two { grid-template-columns: 1fr; } }
.t-box { border: 1px solid var(--t-line); padding: 24px; background: #fff; }
.t-box h2 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; margin: 0 0 18px; color: var(--t-brown); }
.t-field { margin-bottom: 14px; }
.t-field label { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--t-soft); margin-bottom: 6px; }
.t-field input, .t-field textarea, .t-field select { width: 100%; font: inherit; font-size: 15px; padding: 12px 13px; border: 1px solid var(--t-line); background: #fff; color: var(--t-ink); border-radius: 0; }
.t-field input:focus, .t-field textarea:focus, .t-field select:focus { outline: 0; border-color: var(--t-brown); }
.t-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .t-cols { grid-template-columns: 1fr; } }
.t-choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--t-line); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; }
.t-choice:has(input:checked) { border-color: var(--t-brown); box-shadow: inset 0 0 0 1px var(--t-brown); }
.t-choice input { margin-top: 3px; accent-color: var(--t-brown); }
.t-choice b { font-weight: 500; font-size: 15px; }
.t-choice small { display: block; color: var(--t-soft); font-size: 13px; margin-top: 3px; line-height: 1.5; }
.t-err { background: rgba(168,80,63,.1); color: var(--t-danger); padding: 12px 14px; font-size: 14px; margin-bottom: 18px; }
.t-ok { background: rgba(95,122,79,.12); color: var(--t-ok); padding: 12px 14px; font-size: 14px; margin-bottom: 18px; }
.t-hp { position: absolute; left: -9999px; }
.t-status { display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px; border: 1px solid var(--t-brown); color: var(--t-brown); }
.t-instr { background: #f7f5f1; padding: 18px 20px; font-size: 14px; line-height: 1.7; margin: 18px 0; white-space: pre-line; }
.t-center { text-align: center; }

/* Móvil: subnavegación apilada (buscador arriba, categorías en una fila
   desplazable) para que nada se monte sobre el encabezado del sitio. */
@media (max-width: 800px) {
  .t-bar { font-size: 11px; letter-spacing: .04em; line-height: 1.45; padding: 8px 14px; }
  .t-subnav-in { flex-direction: column; align-items: stretch; gap: 0; min-height: 0; flex-wrap: nowrap; }
  .t-search { min-width: 0; width: 100%; border-bottom: 1px solid var(--t-line); padding: 4px 0; }
  .t-cartlink { display: none; }
  .t-cats { flex: none; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 22px; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 calc(-1 * clamp(16px, 3vw, 44px)); padding: 0 clamp(16px, 3vw, 44px); }
  .t-cats::-webkit-scrollbar { display: none; }
  .t-cats a { white-space: nowrap; padding: 13px 0 11px; font-size: 12px; }
}

/* Móvil: galería como carrusel con encaje, botón sin partirse en dos líneas. */
@media (max-width: 900px) {
  .t-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin: 0 calc(-1 * clamp(16px, 3vw, 44px)); padding: 0 clamp(16px, 3vw, 44px); scroll-padding: 0 clamp(16px, 3vw, 44px); }
  .t-gallery::-webkit-scrollbar { display: none; }
  .t-gallery .t-tile { flex: 0 0 82%; scroll-snap-align: start; }
  .t-gallery .t-tile:only-child { flex-basis: 100%; }
}
@media (max-width: 480px) {
  .t-btn { letter-spacing: .12em; padding: 16px 10px; font-size: 12px; }
  .t-box { padding: 18px 16px; }
  .t-drawer-head, .t-drawer-body, .t-drawer-foot { padding-left: 18px; padding-right: 18px; }
}

/* Selector de color (ficha con color + talla) */
.t-color { display: inline-flex; align-items: center; gap: 8px; }
.t-sw { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); flex: none; }
