/* Back2Life Market — brand tokens. Keep in sync with reference/back2life-catalogo (template + build_pptx.ps1). */
:root{
  --bg:#FFFFFF;
  --card:#FFFFFF;
  --ink:#221F1B;
  --ink-soft:#7A7266;
  --line:#E5E5E5;
  --green:#7A1220;         /* brand accent = logo maroon (token name kept for compatibility) */
  --maroon:#7A1220;
  --teal:#7A1220;
  --teal-dark:#5E0D18;
  --cream:#FFFFFF;
  --font-script:"Caveat", "Indie Flower", cursive;
  --edit:#3B5C7A;
  --edit-ink:#F2F6FA;
  --shadow: 0 1px 2px rgba(34,31,27,.05), 0 6px 14px rgba(34,31,27,.07);
  --font-display:"Cormorant Garamond", Garamond, serif;
  --font-body:"Lora", Georgia, "Times New Roman", serif;
  --font-label:"Open Sans", "Segoe UI", sans-serif;
}
html{ color-scheme:light; }
*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{ margin:0; background:var(--bg); color:var(--ink); font-family:var(--font-body); line-height:1.5; }
h1,h2,h3{ text-wrap:balance; }
a{ color:var(--green); }
img{ max-width:100%; }
/* buttons: soft cream pills without a frame, the same on the web and in the panel (the panel fills its main one in maroon) */
.btn{
  font-family:var(--font-label); font-weight:600; letter-spacing:.02em; font-size:.85rem; line-height:1.25; /* same height for <a> and <button> */
  border-radius:999px; border:1px solid rgba(0,0,0,.06); padding:.55rem 1.15rem; cursor:pointer;
  text-decoration:none; display:inline-flex; align-items:center; gap:.4rem;
  background:rgba(255,255,255,.7); color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.06);
  transition:background-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:hover{ background:#fff; box-shadow:0 3px 10px rgba(0,0,0,.1); }
.btn:active{ transform:scale(.97); }
.btn:focus-visible{ outline:2px solid var(--maroon); outline-offset:2px; }
.btn-primary{ color:var(--maroon); }
.btn-primary.on{ background:var(--maroon); color:#fff; }
.btn-edit{ color:var(--edit); }
.btn-secondary{ color:var(--ink); }
.btn-danger{ background:transparent; color:var(--maroon); box-shadow:none; }
.btn-danger:hover{ background:rgba(122,18,32,.08); box-shadow:none; }
.btn:disabled{ opacity:.6; cursor:default; }
.toast{
  position:fixed; bottom:1.5rem; left:50%; transform:translateX(-50%);
  background:var(--ink); color:var(--bg); padding:.6rem 1.1rem; border-radius:8px; font-size:.85rem;
  box-shadow:var(--shadow); opacity:0; pointer-events:none; transition:opacity .25s ease; z-index:30;
  max-width:calc(100vw - 2rem); text-align:center;
}
.toast.show{ opacity:1; }
@media (prefers-reduced-motion: reduce){ *{ transition:none !important; } }

/* ---------- public site navigation (index, catalogo, nosotras) ---------- */
.nav{ position:sticky; top:0; z-index:30; background:rgba(255,255,255,.94); backdrop-filter:blur(6px); border-bottom:1px solid var(--line); }
.nav .in{ max-width:1100px; margin:0 auto; padding:.55rem 1.25rem; display:flex; align-items:center; gap:1.5rem; }
.nav .brand{ display:flex; flex:none; align-items:center; gap:.8rem; text-decoration:none; color:var(--maroon); white-space:nowrap; }
/* the logo already reads BACK 2 LIFE MARKET: the text next to it is not shown */
.nav .brand img{ width:104px; height:104px; object-fit:contain; margin:-.3rem 0; }
.nav .brand .t{ display:none; }
.nav .brand .t{ flex-direction:column; line-height:1; }
.nav .brand .t b{ font-family:var(--font-display); font-weight:700; font-size:1.5rem; letter-spacing:.12em; }
.nav .brand .t small{ font-family:var(--font-display); font-weight:600; font-size:.8rem; letter-spacing:.34em; margin-top:.25rem; padding-left:.1em; }
.nav ul{ list-style:none; margin:0 0 0 auto; padding:0; display:flex; gap:1.3rem; align-items:center; }
.nav li a{ text-decoration:none; color:var(--ink); font-family:var(--font-label); font-size:.95rem; letter-spacing:.04em; padding:.35rem 0; border-bottom:2px solid transparent; white-space:nowrap; }
.nav li a:hover, .nav li a.on{ border-color:var(--maroon); color:var(--maroon); }
.nav .ig{ font-family:var(--font-label); font-weight:600; font-size:.88rem; background:rgba(255,255,255,.7); color:var(--maroon); border:0; box-shadow:0 1px 2px rgba(0,0,0,.08); border-radius:999px; padding:.5rem 1.1rem; text-decoration:none; white-space:nowrap; transition:background-color .15s, box-shadow .15s; }
.nav .ig:hover{ background:#fff; box-shadow:0 3px 10px rgba(0,0,0,.1); }
.nav .burger{ display:none; margin-left:auto; background:none; border:none; font-size:1.6rem; line-height:1; cursor:pointer; color:var(--ink); }
@media (max-width:1080px){
  .nav ul{ display:none; position:absolute; left:0; right:0; top:100%; background:#fff; border-bottom:1px solid var(--line); flex-direction:column; align-items:stretch; gap:0; padding:.5rem 1.25rem 1rem; }
  .nav ul.open{ display:flex; }
  .nav li a{ display:block; padding:.7rem 0; border-bottom:1px solid var(--line); }
  .nav .ig{ margin-top:.8rem; text-align:center; }
  .nav .burger{ display:block; }
  .nav .brand img{ width:96px; height:96px; }
}
/* second bar: markets currently on sale + link to past ones (white ribbon, blue outlined tabs, handwritten names) */
.subnav{ background:#fff; border-bottom:1px solid var(--line); }
.subnav .in{ max-width:1100px; margin:0 auto; padding:.55rem 1.25rem; display:flex; align-items:center; gap:.7rem; overflow-x:auto; scrollbar-width:none; }
.subnav .in::-webkit-scrollbar{ display:none; }
.subnav a{ color:var(--teal-dark); text-decoration:none; font-family:var(--font-script); font-size:1.2rem; line-height:1; padding:.4rem .9rem; white-space:nowrap; border:1.5px solid var(--teal); border-radius:999px; }
.subnav a:hover{ background:var(--cream); }
.subnav a.on{ background:var(--teal); color:#fff; }
.subnav a.live::before{ content:"●"; color:var(--maroon); margin-right:.4rem; font-size:.6rem; vertical-align:middle; }
.subnav a.on.live::before{ color:#F6D36B; }
.subnav a.past{ margin-left:auto; border-color:var(--line); color:var(--ink-soft); font-family:var(--font-label); font-size:.78rem; }
.subnav .lbl{ color:var(--maroon); font-weight:700; font-family:var(--font-label); font-size:.8rem; letter-spacing:.1em; text-transform:uppercase; white-space:nowrap; }

/* ---------- shared footer (js/footer.js) ---------- */
/* page photos chosen in the panel (js/pagephoto.js) */
.page-photo{ width:100%; background:#3a2f28 center/cover no-repeat; }
.page-photo.tall{ height:min(52vh, 460px); } .page-photo.strip{ height:min(34vh, 300px); } .page-photo.slim{ height:min(26vh, 220px); }
.about-photo.custom{ width:min(340px, 80vw) !important; height:auto !important; aspect-ratio:4/5; object-fit:cover; border-radius:12px; box-shadow:var(--shadow); }
.site-footer{ margin-top:3rem; border-top:1px solid var(--line); background:#fff; }
.site-footer .sf-in{ max-width:1100px; margin:0 auto; padding:1.5rem 1.25rem 2rem; text-align:center; display:flex; flex-direction:column; gap:.9rem; align-items:center; }
.site-footer .sf-contact{ font-size:.9rem; color:var(--ink-soft); }
.site-footer .sf-contact a{ color:inherit; }
.site-footer .sf-ver{ font-family:var(--font-label); font-size:.7rem; letter-spacing:.06em; color:var(--ink-soft); opacity:.75; }
.site-footer .sf-ver a{ color:inherit; text-decoration:none; }
.site-footer .sf-ver a.sf-admin{ color:var(--ink); font-weight:600; }  /* a touch darker than the version, still discreet */
.site-footer .sf-legal{ font-family:var(--font-label); font-size:.75rem; color:var(--ink-soft); }
.site-footer .sf-legal a{ color:inherit; }
.site-footer .sf-by{ font-family:var(--font-label); font-size:.7rem; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-soft); opacity:.75; margin-top:-.4rem; }
/* Baomikao brand colours (from its logo): light blue "BAO", navy "MIKAO" */
.site-footer .sf-by a{ color:inherit; text-decoration:none; }
.site-footer .sf-by a:hover{ opacity:1; text-decoration:underline; text-decoration-color:#3E7CB1; }
.site-footer .sf-by b{ font-weight:700; color:#2B4A6F; }
.site-footer .sf-by b span{ color:#3E7CB1; }
.site-footer.admin{ margin-top:2rem; }

/* hand-drawn arrow produced by a "→" in an editable text */
.doodle-arrow{ height:1.1em; width:auto; vertical-align:-.25em; margin-left:.15em; }
.subnav .lbl .doodle-arrow{ height:1.9em; vertical-align:-.7em; color:var(--maroon); }

/* ---- market list rows (home, activos, finalizados): name + count + dates, cover, framed strip of item photos ---- */
/* one row per active market: name, then the cover with a strip of real item photos filling the right side */
.strip{ display:flex; flex-direction:column; gap:2rem; padding:.5rem 1.5rem 1rem; }
.strip a{ text-decoration:none; color:inherit; display:block; }
.strip .head{ display:flex; align-items:baseline; gap:.9rem; flex-wrap:wrap; margin:0 0 .6rem; }
.strip .name{ font-family:"Indie Flower", cursive; font-size:1.55rem; color:var(--maroon); line-height:1.1; }
.strip .tag{ font-family:var(--font-label); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-soft); display:inline-flex; align-items:center; gap:.55rem; }
.strip .tag b{ color:var(--maroon); font-weight:600; }
.strip .tag i{ width:4px; height:4px; border-radius:50%; background:var(--maroon); opacity:.6; font-style:normal; }
.strip .row{ display:grid; grid-template-columns:clamp(240px, 30vw, 360px) minmax(0, 1fr); gap:1rem; align-items:stretch; }
.strip .row.nocover{ grid-template-columns:minmax(0, 1fr); }
.strip .row.nothumbs{ grid-template-columns:clamp(240px, 30vw, 360px); }
.strip .row.nocover .tw{ height:clamp(160px, 20vw, 240px); }
.strip .cover{ aspect-ratio:4/3; background:var(--line); border-radius:6px; overflow:hidden; box-shadow:var(--shadow); }
.strip .cover img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s; }
.strip a:hover .cover img{ transform:scale(1.03); }
/* the strip lives in a framed box (same height as the cover) with a fade on the right: it is meant to be scrolled */
.strip .tw{ position:relative; min-width:0; border:1px solid var(--line); border-radius:8px; background:#fff; }
.strip .tw::after{ content:""; position:absolute; top:0; right:0; bottom:0; width:56px; border-radius:0 8px 8px 0; background:linear-gradient(to right, rgba(255,255,255,0), #fff 85%); pointer-events:none; }
.strip .tw::before{ content:"›"; position:absolute; right:12px; top:50%; transform:translateY(-55%); z-index:1; font-family:var(--font-display); font-size:2rem; line-height:1; color:var(--maroon); opacity:.7; pointer-events:none; }
.strip .thumbs{ position:absolute; inset:.55rem; display:flex; gap:.55rem; overflow-x:auto; scrollbar-width:none; padding-right:48px; cursor:grab; }
.strip .thumbs::-webkit-scrollbar{ display:none; }
.strip .thumbs span{ flex:0 0 auto; height:100%; aspect-ratio:3/4; border-radius:6px; overflow:hidden; background:var(--line); box-shadow:var(--shadow); }
.strip .thumbs img{ width:100%; height:100%; object-fit:cover; display:block; }
@media (max-width:760px){ .strip .row{ grid-template-columns:1fr; } .strip .tw{ height:110px; } }

/* panel menu (js/adminnav.js): under the header, the line moves below it */
.top.has-nav{ border-bottom:0 !important; padding-bottom:.4rem !important; }
.anav{ display:flex; flex-wrap:wrap; gap:.2rem 1.6rem; border-bottom:1px solid var(--line); }
/* text tabs, not buttons: the current page in maroon with an underline that sits on the line */
.anav a{ font-family:var(--font-label); font-size:.78rem; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-soft); text-decoration:none; padding:.55rem 0 .6rem; margin-bottom:-1px; border-bottom:2px solid transparent; transition:color .15s, border-color .15s; }
.anav a:hover{ color:var(--maroon); }
.anav a.on{ color:var(--maroon); font-weight:700; border-bottom-color:var(--maroon); }
.anav .cnt{ display:inline-block; min-width:1.35em; padding:.05em .4em; margin-left:.3em; border-radius:999px; background:var(--maroon); color:#fff; font-size:.68rem; letter-spacing:0; text-align:center; }

/* ---- panel only (html.panel, set by js/adminnav.js) ---- */
/* header and menu: same width on every panel page (the footer's), whatever the page's own width, so they never move */
/* the scrollbar's room is always kept, so pages with and without a scrollbar line up */
html.panel{ scrollbar-gutter:stable; }
html.panel .top, html.panel .anav{ width:min(1100px, calc(100vw - 2rem)); position:relative; left:50%; transform:translateX(-50%); }
html.panel .top .brand{ color:var(--maroon); }
html.panel .top .right{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.5rem; align-items:center; font-family:var(--font-label); font-size:.8rem; color:var(--ink-soft); }
/* account circle (js/adminnav.js), the same as on the public site */
html.panel .me{ position:relative; }
html.panel .me-btn{ width:40px; height:40px; border-radius:50%; border:2px solid #fff; background:var(--maroon); color:#fff; font-family:var(--font-label); font-weight:700; font-size:1rem; cursor:pointer; box-shadow:0 1px 4px rgba(0,0,0,.2); display:flex; align-items:center; justify-content:center; padding:0; }
html.panel .me-btn:hover{ filter:brightness(1.15); }
html.panel .me-menu{ position:absolute; right:0; top:calc(100% + .5rem); min-width:230px; background:#fff; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.18); padding:.4rem; z-index:60; font-size:.85rem; }
html.panel .me-menu[hidden]{ display:none; }
html.panel .me-menu .who{ padding:.55rem .7rem .6rem; color:var(--ink-soft); font-size:.75rem; border-bottom:1px solid var(--line); margin-bottom:.3rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html.panel .me-menu .who small{ display:block; opacity:.7; margin-top:.15rem; }
html.panel .me-menu button{ display:block; width:100%; text-align:left; padding:.55rem .7rem; border:0; background:none; border-radius:8px; color:var(--ink); font:inherit; cursor:pointer; }
html.panel .me-menu button:hover{ background:rgba(122,18,32,.07); color:var(--maroon); }
html.panel .envtag{ background:var(--maroon); color:#fff; border-radius:999px; padding:.15rem .5rem; font-size:.65rem; letter-spacing:.06em; }
/* the panel's main button is filled */
html.panel .btn-primary{ background:var(--maroon); color:#fff; box-shadow:0 1px 2px rgba(60,20,20,.18); }
html.panel .btn-primary:hover{ filter:brightness(1.12); box-shadow:0 3px 10px rgba(60,20,20,.22); }
/* moving between panel pages: header and menu stay put, only the content cross-fades (opt-in added by js/adminnav.js, panel only) */
html.panel .top{ view-transition-name:b2l-top; }
html.panel .anav{ view-transition-name:b2l-nav; }
::view-transition-old(root), ::view-transition-new(root){ animation-duration:.18s; }
