/* ==========================================================================
   LEGAL PAGES — Patricio Melo e Hijos
   Shared stylesheet for: Política de Privacidad, Términos y Condiciones,
   Envíos y Devoluciones.
   Paste into Elementor > Site Settings > Custom CSS, or WP Customizer >
   Additional CSS. Safe to load site-wide: every selector is scoped under
   .legal-page so it never touches other templates.
   ========================================================================== */

:root{
  /* Paleta oficial de Patricio Melo e Hijos (tailwind.config.js del tema) */
  --legal-accent:#FF9900;       /* pmi-primary */
  --legal-accent-dark:#E68A00;  /* pmi-primary-dark */
  --legal-accent-tint:#FFF4E5;  /* tinte suave derivado del naranja de marca */
  --legal-dark:#131921;         /* pmi-dark — header/footer del sitio */
  --legal-ink:#0F1111;          /* pmi-text */
  --legal-ink-soft:#565959;     /* pmi-text-secondary */
  --legal-line:#EAEDED;         /* pmi-gray-dark */
  --legal-bg:#F3F3F3;           /* pmi-gray */
  --legal-surface:#ffffff;      /* pmi-light */
  --legal-warning:#C7511F;      /* pmi-warning */
  --legal-radius:10px;
  --legal-max:880px;
}

@media (prefers-color-scheme:dark){
  .legal-page{
    --legal-accent:#FFA41C;
    --legal-accent-dark:#FFC266;
    --legal-accent-tint:#3a2a10;
    --legal-dark:#0b0f14;
    --legal-ink:#f1efec;
    --legal-ink-soft:#b9b4ad;
    --legal-line:#33383d;
    --legal-bg:#161a1d;
    --legal-surface:#1f2429;
    --legal-warning:#ff8a65;
  }
}
:root[data-theme="dark"] .legal-page{
  --legal-accent:#FFA41C;
  --legal-accent-dark:#FFC266;
  --legal-accent-tint:#3a2a10;
  --legal-dark:#0b0f14;
  --legal-ink:#f1efec;
  --legal-ink-soft:#b9b4ad;
  --legal-line:#33383d;
  --legal-bg:#161a1d;
  --legal-surface:#1f2429;
  --legal-warning:#ff8a65;
}
:root[data-theme="light"] .legal-page{
  --legal-accent:#FF9900;
  --legal-accent-dark:#E68A00;
  --legal-accent-tint:#FFF4E5;
  --legal-dark:#131921;
  --legal-ink:#0F1111;
  --legal-ink-soft:#565959;
  --legal-line:#EAEDED;
  --legal-bg:#F3F3F3;
  --legal-surface:#ffffff;
  --legal-warning:#C7511F;
}

/* -------------------------------------------------------------------- */
/* Base / reset (scoped)                                                 */
/* -------------------------------------------------------------------- */
.legal-page{
  background:var(--legal-bg);
  color:var(--legal-ink);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  padding-bottom:80px;
}
.legal-page *{box-sizing:border-box;}
.legal-page a{color:var(--legal-accent-dark);}
.legal-page a:hover{color:var(--legal-accent);}
.legal-page a:focus-visible,
.legal-page button:focus-visible{
  outline:3px solid var(--legal-accent);
  outline-offset:2px;
  border-radius:4px;
}

/* -------------------------------------------------------------------- */
/* Top identity bar (tagline) — optional, matches brand voice           */
/* -------------------------------------------------------------------- */
.legal-tagline-bar{
  background:var(--legal-dark);
  color:#fff;
  text-align:center;
  font-size:11px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  padding:8px 16px;
}
.legal-tagline-bar span{color:var(--legal-accent);}

/* -------------------------------------------------------------------- */
/* Breadcrumb                                                            */
/* -------------------------------------------------------------------- */
.legal-breadcrumb{
  max-width:var(--legal-max);
  margin:0 auto;
  padding:22px 20px 0;
}
.legal-breadcrumb ol{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  margin:0;
  padding:0;
  font-size:13px;
  color:var(--legal-ink-soft);
}
.legal-breadcrumb a{
  text-decoration:none;
  color:var(--legal-ink-soft);
  font-weight:600;
}
.legal-breadcrumb a:hover{color:var(--legal-accent-dark);}
.legal-breadcrumb li:not(:last-child)::after{
  content:"›";
  margin-left:6px;
  color:#c7c3bd;
}
.legal-breadcrumb li[aria-current="page"]{
  color:var(--legal-ink);
  font-weight:700;
}

/* -------------------------------------------------------------------- */
/* Page header                                                           */
/* -------------------------------------------------------------------- */
.legal-header{
  max-width:var(--legal-max);
  margin:0 auto;
  padding:18px 20px 28px;
  border-bottom:1px solid var(--legal-line);
}
.legal-header__eyebrow{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--legal-accent-dark);
  background:var(--legal-accent-tint);
  padding:5px 12px;
  border-radius:999px;
  margin-bottom:14px;
}
.legal-header h1{
  font-size:clamp(1.7rem,4vw,2.35rem);
  font-weight:800;
  line-height:1.25;
  margin:0 0 10px;
  color:var(--legal-ink);
}
.legal-header p{
  margin:0;
  color:var(--legal-ink-soft);
  font-size:15px;
  max-width:60ch;
}

/* -------------------------------------------------------------------- */
/* Layout: content + sticky side rail (index)                           */
/* -------------------------------------------------------------------- */
.legal-layout{
  max-width:var(--legal-max);
  margin:0 auto;
  padding:32px 20px 0;
  display:grid;
  grid-template-columns:220px 1fr;
  gap:40px;
  align-items:start;
}
@media (max-width:800px){
  .legal-layout{grid-template-columns:1fr;}
}

/* -------------------------------------------------------------------- */
/* Table of contents                                                     */
/* -------------------------------------------------------------------- */
.legal-toc{
  position:sticky;
  top:20px;
  background:var(--legal-surface);
  border:1px solid var(--legal-line);
  border-radius:var(--legal-radius);
  padding:18px;
}
@media (max-width:800px){
  .legal-toc{position:static;margin-bottom:8px;}
}
.legal-toc h2{
  font-size:11px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--legal-ink-soft);
  margin:0 0 12px;
}
.legal-toc ol{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:toc;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.legal-toc li{counter-increment:toc;}
.legal-toc a{
  display:flex;
  align-items:baseline;
  gap:8px;
  text-decoration:none;
  color:var(--legal-ink-soft);
  font-size:13.5px;
  font-weight:600;
  padding:7px 8px;
  border-radius:6px;
  line-height:1.4;
  transition:background .15s ease, color .15s ease;
}
.legal-toc a::before{
  content:counter(toc);
  flex:0 0 auto;
  width:18px;
  height:18px;
  border-radius:50%;
  background:var(--legal-accent-tint);
  color:var(--legal-accent-dark);
  font-size:10.5px;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.legal-toc a:hover{background:var(--legal-accent-tint);color:var(--legal-accent-dark);}
.legal-toc a.is-active{background:var(--legal-dark);color:#fff;}
.legal-toc a.is-active::before{background:var(--legal-accent);color:#fff;}

/* -------------------------------------------------------------------- */
/* Article content                                                       */
/* -------------------------------------------------------------------- */
.legal-content{min-width:0;}

.legal-content p{
  margin:0 0 16px;
  color:var(--legal-ink);
  font-size:15.5px;
}
.legal-content strong{color:var(--legal-ink);font-weight:700;}

.legal-section{
  scroll-margin-top:24px;
  padding-top:6px;
  margin-bottom:36px;
}
.legal-section:not(:first-child){
  padding-top:32px;
  border-top:1px solid var(--legal-line);
}

.legal-section__heading{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 16px;
}
.legal-section__badge{
  flex:0 0 auto;
  width:34px;
  height:34px;
  border-radius:9px;
  background:var(--legal-dark);
  color:#fff;
  font-size:14px;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.legal-section h2{
  margin:0;
  font-size:1.25rem;
  font-weight:800;
  color:var(--legal-ink);
  line-height:1.35;
}
.legal-section h3{
  font-size:1.02rem;
  font-weight:700;
  color:var(--legal-ink);
  margin:22px 0 10px;
}

/* -------------------------------------------------------------------- */
/* Lists — custom bullets                                                */
/* -------------------------------------------------------------------- */
.legal-content ul,
.legal-content ol{
  margin:0 0 18px;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.legal-content ul li,
.legal-content ol li{
  position:relative;
  padding-left:30px;
  font-size:15px;
  color:var(--legal-ink);
}
.legal-content ul li::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  width:9px;
  height:9px;
  border-radius:2px;
  background:var(--legal-accent);
  transform:rotate(45deg);
}
.legal-content ol{counter-reset:legalol;}
.legal-content ol > li{counter-increment:legalol;}
.legal-content ol > li::before{
  content:counter(legalol);
  position:absolute;
  left:0;
  top:0;
  width:20px;
  height:20px;
  border-radius:50%;
  background:var(--legal-accent-tint);
  color:var(--legal-accent-dark);
  font-size:11px;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
/* nested lists (e.g. inside step 1 of "proceso de devolución") */
.legal-content li ul,
.legal-content li ol{
  margin-top:10px;
}

/* -------------------------------------------------------------------- */
/* Callout boxes                                                         */
/* -------------------------------------------------------------------- */
.legal-callout{
  border-radius:var(--legal-radius);
  padding:18px 20px;
  margin:20px 0;
  border:1px solid var(--legal-line);
  background:var(--legal-surface);
  display:flex;
  gap:14px;
  align-items:flex-start;
}
.legal-callout__icon{
  flex:0 0 auto;
  width:30px;
  height:30px;
  border-radius:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
}
.legal-callout__body{font-size:14.5px;color:var(--legal-ink-soft);}
.legal-callout__body strong{color:var(--legal-ink);}
.legal-callout__body p{margin:0 0 6px;font-size:14.5px;}
.legal-callout__body p:last-child{margin-bottom:0;}
.legal-callout__body a{font-weight:700;}
.legal-callout__title{
  display:block;
  font-weight:800;
  color:var(--legal-ink);
  margin-bottom:4px;
  font-size:14.5px;
}

/* Contact callout — orange / brand */
.legal-callout--contact{
  border-color:#ffd8b3;
  background:var(--legal-accent-tint);
}
.legal-callout--contact .legal-callout__icon{background:var(--legal-accent);color:#fff;}

/* Date / validity callout — neutral ink */
.legal-callout--date{
  background:#f1f0ee;
}
.legal-callout--date .legal-callout__icon{background:var(--legal-dark);color:#fff;}

/* Warning callout — important restrictions (e.g. no-return cases). Uses
   pmi-warning (#C7511F), the same red the theme uses for sale/alert badges. */
.legal-callout--warning{
  border-color:#f0c4b3;
  background:#fdf1ec;
}
.legal-callout--warning .legal-callout__icon{background:var(--legal-warning);color:#fff;}
.legal-callout--warning .legal-callout__title{color:var(--legal-warning);}

@media (prefers-color-scheme:dark){
  .legal-callout--warning{border-color:#5c3322;background:#2a1e17;}
  .legal-callout--date{background:#23272b;}
}
:root[data-theme="dark"] .legal-callout--warning{border-color:#5c3322;background:#2a1e17;}
:root[data-theme="dark"] .legal-callout--date{background:#23272b;}
:root[data-theme="light"] .legal-callout--warning{border-color:#f0c4b3;background:#fdf1ec;}
:root[data-theme="light"] .legal-callout--date{background:#f1f0ee;}

/* -------------------------------------------------------------------- */
/* Cross-navigation between legal pages                                  */
/* -------------------------------------------------------------------- */
.legal-crosslinks{
  max-width:var(--legal-max);
  margin:48px auto 0;
  padding:28px 20px 0;
  border-top:1px solid var(--legal-line);
}
.legal-crosslinks h2{
  font-size:11px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--legal-ink-soft);
  margin:0 0 14px;
}
.legal-crosslinks__grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}
.legal-crosslinks a{
  display:block;
  text-decoration:none;
  background:var(--legal-surface);
  border:1px solid var(--legal-line);
  border-radius:var(--legal-radius);
  padding:16px 18px;
  color:var(--legal-ink);
  font-weight:700;
  font-size:14.5px;
  transition:border-color .15s ease, transform .15s ease;
}
.legal-crosslinks a:hover{border-color:var(--legal-accent);transform:translateY(-2px);}
.legal-crosslinks a span{
  display:block;
  margin-top:4px;
  font-weight:500;
  color:var(--legal-ink-soft);
  font-size:13px;
}
.legal-crosslinks a[aria-current="page"]{
  border-color:var(--legal-accent);
  background:var(--legal-accent-tint);
}

/* -------------------------------------------------------------------- */
/* Back to top button                                                    */
/* -------------------------------------------------------------------- */
.legal-back-to-top{
  position:fixed;
  right:22px;
  bottom:22px;
  width:46px;
  height:46px;
  border-radius:50%;
  border:none;
  background:var(--legal-dark);
  color:#fff;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.22);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transform:translateY(10px);
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease, background .15s ease;
  z-index:60;
}
.legal-back-to-top.is-visible{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
.legal-back-to-top:hover{background:var(--legal-accent);}

/* -------------------------------------------------------------------- */
/* Responsive tweaks                                                     */
/* -------------------------------------------------------------------- */
@media (max-width:480px){
  .legal-header h1{font-size:1.5rem;}
  .legal-section__badge{width:28px;height:28px;font-size:12px;}
  .legal-callout{flex-direction:column;}
}

/* -------------------------------------------------------------------- */
/* Print                                                                 */
/* -------------------------------------------------------------------- */
@media print{
  .legal-tagline-bar,
  .legal-toc,
  .legal-back-to-top,
  .legal-crosslinks,
  .legal-breadcrumb{display:none !important;}
  .legal-layout{display:block;padding:0;}
  .legal-page{background:#fff;padding-bottom:0;}
  .legal-callout{border:1px solid #999;background:#fff !important;}
  .legal-section{break-inside:avoid;}
  a{color:#000 !important;text-decoration:underline;}
}
