/*
Theme Name: TerrArauco Onepage
Theme URI: https://www.terrarauco.cl/
Author: (Auto) ChatGPT
Author URI: https://www.terrarauco.cl/
Description: Tema onepage liviano para TerrArauco, con soporte WooCommerce y landing dedicada al Overol Tyvek.
Version: 1.0.2
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: terrarauco
Tags: one-page, custom-logo, woocommerce, responsive, minimal
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root{
  --bg:#0b0f16; --surface:#0f1622; --text:#fff;
  --muted:rgba(255,255,255,.75); --muted2:rgba(255,255,255,.6);
  --line:rgba(255,255,255,.12);
  --brand:#ff5a1f; --brand2:#22c55e; --accent:#60a5fa;
  --radius:18px; --shadow:0 18px 44px rgba(0,0,0,.35);
  --container:1180px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;background:var(--bg);color:var(--text);line-height:1.6}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
p{margin:0 0 14px}
h1,h2,h3{margin:0 0 12px;line-height:1.1}
small{color:var(--muted2)}
.tr-container{max-width:var(--container);margin:0 auto;padding:0 18px}

/* Header */
.tr-header{position:sticky;top:0;z-index:999;background:rgba(10,14,22,.72);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.tr-header__row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0}
.tr-logo img{height:34px;width:auto}
.tr-nav{display:flex;align-items:center;gap:18px}
.tr-nav a{font-size:13px;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.86);padding:8px 10px;border-radius:999px}
.tr-nav a:hover{background:rgba(255,255,255,.08)}
.tr-nav__cta{background:rgba(255,90,31,.14);border:1px solid rgba(255,90,31,.35)}
.tr-nav__cta:hover{background:rgba(255,90,31,.22)}
.tr-burger{display:none;width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.06);align-items:center;justify-content:center;cursor:pointer}
.tr-burger span{display:block;width:18px;height:2px;background:#fff;position:relative}
.tr-burger span:before,.tr-burger span:after{content:"";position:absolute;left:0;width:18px;height:2px;background:#fff}
.tr-burger span:before{top:-6px}.tr-burger span:after{top:6px}
.tr-drawer{display:none;border-top:1px solid var(--line);padding:10px 0 14px}
.tr-drawer a{display:block;padding:12px 10px;border-radius:12px;color:rgba(255,255,255,.9);border:1px solid rgba(255,255,255,.06);background:rgba(255,255,255,.03);margin-bottom:10px}
.tr-drawer a:last-child{margin-bottom:0}
.tr-drawer.is-open{display:block}

/* Buttons */
.tr-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:12px 16px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;font-weight:700}
.tr-btn:hover{background:rgba(255,255,255,.10)}
.tr-btn--brand{background:rgba(255,90,31,.18);border:1px solid rgba(255,90,31,.45)}
.tr-btn--brand:hover{background:rgba(255,90,31,.26)}
.tr-btn--green{background:rgba(34,197,94,.16);border:1px solid rgba(34,197,94,.38)}
.tr-btn--green:hover{background:rgba(34,197,94,.22)}

/* Hero */
.tr-hero{position:relative;min-height:72vh;display:flex;align-items:center;border-bottom:1px solid var(--line)}
.tr-hero__bg{position:absolute;inset:0;background-size:cover;background-position:center}
.tr-hero__overlay{position:absolute;inset:0;background:radial-gradient(900px 460px at 20% 30%, rgba(0,0,0,.30), rgba(0,0,0,.85)),linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.8))}
.tr-hero__content{position:relative;z-index:2;padding:70px 0;display:grid;grid-template-columns:1.1fr .9fr;gap:24px;align-items:center}
.tr-kicker{display:inline-flex;gap:10px;align-items:center;font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:rgba(255,255,255,.78);background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10);padding:10px 14px;border-radius:999px}
.tr-hero h1{font-size:54px;letter-spacing:-.02em}
.tr-hero p{color:rgba(255,255,255,.84);font-size:16px;max-width:52ch}
.tr-hero__actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}
.tr-hero__card{background:rgba(15,22,34,.62);border:1px solid rgba(255,255,255,.10);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}
.tr-badge{display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);font-size:12px;color:rgba(255,255,255,.86)}
.tr-badge--brand{border-color:rgba(255,90,31,.38);background:rgba(255,90,31,.14)}
.tr-badge--ok{border-color:rgba(34,197,94,.34);background:rgba(34,197,94,.12)}

/* Sections */
.tr-section{padding:72px 0;border-bottom:1px solid var(--line)}
.tr-section--light{background:linear-gradient(to bottom, rgba(255,255,255,.02), rgba(255,255,255,0))}
.tr-section__head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px}
.tr-section__title{font-size:32px}
.tr-section__desc{color:var(--muted);max-width:64ch}

/* Cards */
.tr-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.tr-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.10);border-radius:var(--radius);overflow:hidden}
.tr-card__media{aspect-ratio:16/10;background:rgba(0,0,0,.35);overflow:hidden}
.tr-card__media img{width:100%;height:100%;object-fit:cover}
.tr-card__body{padding:16px}
.tr-card__title{font-size:16px;margin-bottom:6px}
.tr-card__meta{color:var(--muted2);font-size:13px}

/* Tyvek */
.tr-tyvek{display:grid;grid-template-columns:1.05fr .95fr;gap:18px;align-items:stretch}
.tr-tyvek__left{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.10);border-radius:var(--radius);overflow:hidden}
.tr-tyvek__img{height:100%;min-height:340px;background-size:cover;background-position:center}
.tr-tyvek__right{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.10);border-radius:var(--radius);padding:18px}
.tr-list{margin:12px 0 0;padding:0;list-style:none}
.tr-list li{padding:10px 0;border-bottom:1px solid rgba(255,255,255,.08);color:rgba(255,255,255,.84)}
.tr-list li:last-child{border-bottom:none}
.tr-note{margin-top:14px;padding:12px 14px;border-radius:14px;border:1px solid rgba(96,165,250,.28);background:rgba(96,165,250,.10);color:rgba(255,255,255,.86);font-size:13px}

/* Cert + Contact */
.tr-cert{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.tr-cert__box,.tr-contact__box{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.10);border-radius:var(--radius);padding:18px}
.tr-contact{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.tr-kv{display:grid;gap:10px}
.tr-kv div{display:flex;gap:10px;align-items:flex-start}
.tr-kv b{min-width:90px}
.tr-webpay{
  margin-top: 14px;
  text-align: left;
  opacity: .92;

  width: 100%;
  max-width: clamp(140px, 28vw, 160px); /* 👈 ajusta 180 si quieres más chico */
  height: auto;

  background: #fff;
  padding: 10px;
  border-radius: 12px;
}

.tr-hero__card .tr-webpay{
  max-width: 160px;
}


.tr-map{width:100%;min-height:310px;border:0;border-radius:16px;filter:grayscale(.25) contrast(1.05)}

/* Footer */
.tr-footer{padding:34px 0}
.tr-footer__row{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;color:var(--muted2);font-size:13px}
.tr-footer a{color:rgba(255,255,255,.84)}

/* Landing */
.tr-landing{padding:40px 0 70px}
.tr-landing__wrap{display:grid;grid-template-columns:1.05fr .95fr;gap:18px;align-items:start}
.tr-landing__hero{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.10);border-radius:var(--radius);overflow:hidden}
.tr-landing__img{aspect-ratio:16/10;background-size:cover;background-position:center}
.tr-landing__body{padding:18px}
.tr-landing__hero h1{font-size:34px}
.tr-landing__sidebar{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.10);border-radius:var(--radius);padding:18px}

@media (max-width:980px){
  .tr-hero__content{grid-template-columns:1fr;padding:52px 0}
  .tr-hero h1{font-size:42px}
  .tr-grid-3{grid-template-columns:1fr}
  .tr-tyvek,.tr-cert,.tr-contact,.tr-landing__wrap{grid-template-columns:1fr}
  .tr-nav{display:none}
  .tr-burger{display:inline-flex}
}


.tr-hero__card .tr-webpay{
  width: 100% !important;
  max-width: 190px !important;   /* ajusta aquí: 160–210 */
  max-height: 80px !important;   /* limita altura */
  height: auto !important;
  object-fit: contain;
  display: block;
  margin: 10px auto 0;           /* centrado */
  background: #fff;
  padding: 10px;
  border-radius: 12px;
}

.tr-checks{margin:12px 0 0;padding:0;list-style:none;display:grid;gap:8px}
.tr-checks li{
  display:flex;gap:10px;align-items:flex-start;
  color:rgba(255,255,255,.86);
  font-size:14px;
}
.tr-checks li:before{
  content:"✓";
  font-weight:900;
  color:rgba(34,197,94,.95);
  margin-top:1px;
}


/* Cotizador */
.tr-quote-box{margin-top:14px}
.tr-quote-empty{padding:14px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.04);color:rgba(255,255,255,.78)}
.tr-quote-table{width:100%;border-collapse:separate;border-spacing:0 10px}
.tr-quote-table tr{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.10)}
.tr-quote-table td{padding:12px;vertical-align:middle}
.tr-quote-td-img{width:96px}
.tr-quote-img{border-radius:12px}
.tr-quote-name{font-weight:800}
.tr-quote-qty{display:flex;gap:8px;align-items:center}
.tr-quote-qty-input{width:70px;padding:10px;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:rgba(0,0,0,.25);color:#fff}
.tr-qty-btn{width:38px;height:38px;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;cursor:pointer}
.tr-quote-actions{margin-top:10px}
.tr-quote-form input,.tr-quote-form textarea{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.25);
  color:#fff;
}
.tr-quote-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:980px){.tr-quote-grid{grid-template-columns:1fr}}


.tr-toast{
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(15,22,34,.92);
  box-shadow: 0 18px 44px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  max-width: min(520px, calc(100vw - 36px));
}

.tr-toast__msg{
  color: rgba(255,255,255,.92);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
}

.tr-toast__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(34,197,94,.38);
  background: rgba(34,197,94,.16);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.tr-toast__btn:hover{ background: rgba(34,197,94,.22); }

.tr-toast__close{
  margin-left: 2px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 0;
}

.tr-quote-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
}

.tr-quote-link:hover{ background:rgba(255,255,255,.08); }

.tr-quote-count{
  min-width:22px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
  line-height:1;
  background:rgba(34,197,94,.22);
  border:1px solid rgba(34,197,94,.40);
}

.tr-quote-count.is-zero{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  opacity:.8;
}

/* =========================
   FORMULARIO COTIZACIÓN
========================= */

.tr-quote {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
}

/* títulos */
.tr-quote h2,
.tr-quote h3 {
  margin-bottom: 12px;
}

/* contenedor inputs */
.tr-quote-form,
.tr-quote form {
  margin-top: 16px;
}

/* GRID */
.tr-quote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

/* inputs base */
.tr-quote input,
.tr-quote textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 14px;
}

.tr-quote input::placeholder,
.tr-quote textarea::placeholder {
  color: rgba(255,255,255,.6);
}

.tr-quote textarea {
  resize: vertical;
  min-height: 90px;
}

/* botón */
#tr-quote-submit,
.tr-quote button.tr-btn--green {
  margin-top: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  background: linear-gradient(135deg,#1c7c45,#2ecc71);
  color: #fff;
  border: none;
  cursor: pointer;
}

#tr-quote-submit:hover {
  filter: brightness(1.1);
}

/* status */
#tr-quote-status {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

/* botón vaciar */
#tr-quote-clear {
  margin-top: 12px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  .tr-quote-grid {
    grid-template-columns: 1fr;
  }
}

