/* =========================================================
   NOIR — inner page components (shop, product, forms, cart,
   account, journal, legal). Loaded alongside style.css.
   ========================================================= */

/* ---- origin banner (shop, forwarded from map) ---- */
.origin-banner{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
  margin-top:1.4rem;padding:.85rem 1.2rem;border:1px solid var(--accent);border-radius:12px;
  background:var(--green-deep);font-size:0.95rem}
.origin-banner[hidden]{display:none}
.origin-banner b{color:var(--accent-soft)}
.origin-banner a{color:var(--accent-soft);font-weight:600;text-decoration:underline;text-underline-offset:3px}

/* ---- journal article modal ---- */
.article-modal{position:fixed;inset:0;z-index:80;display:flex;align-items:flex-start;justify-content:center;
  padding:clamp(16px,5vh,70px) 16px;overflow-y:auto;visibility:hidden;
  transition:visibility 0s linear .42s}
.article-modal.open{visibility:visible;transition:visibility 0s}
.article-modal .am-backdrop{position:fixed;inset:0;background:rgba(3,6,4,.55);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  opacity:0;transition:opacity .42s var(--ease);will-change:opacity}
.article-modal.open .am-backdrop{opacity:1}
.article-card{position:relative;z-index:1;max-width:760px;width:100%;background:var(--bg-2);
  border:1px solid var(--line-strong);border-radius:20px;overflow:hidden;will-change:transform,opacity;
  transform:translateY(42px) scale(.965);opacity:0;
  transition:transform .55s cubic-bezier(.16,.84,.34,1) .06s,opacity .42s var(--ease) .06s}
.article-modal.open .article-card{transform:none;opacity:1}
.article-card .am-hero{position:relative;aspect-ratio:16/8;overflow:hidden}
.article-card .am-hero img{width:100%;height:100%;object-fit:cover}
.article-card .am-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent,rgba(10,15,12,.9))}
.am-close{position:absolute;inset-block-start:14px;inset-inline-start:14px;z-index:2;width:38px;height:38px;
  border-radius:10px;background:rgba(6,8,7,.7);border:1px solid var(--line);color:var(--text);
  backdrop-filter:blur(6px);transition:background .25s,border-color .25s}
.am-close:hover{background:var(--panel);border-color:var(--accent)}
.am-body{padding:clamp(1.4rem,4vw,2.6rem)}
.am-body .cat{display:inline-block;font-size:0.78rem;letter-spacing:.2em;text-transform:uppercase;
  color:var(--accent-soft);margin-bottom:.8rem}
.am-body h2{font-size:clamp(1.5rem,3.5vw,2.2rem);line-height:1.3;margin-bottom:.6rem}
.am-body .pmeta{color:var(--muted-2);font-size:.82rem;margin-bottom:1.4rem}
.am-body p{color:var(--muted);line-height:1.9;margin-bottom:1.1rem;max-width:62ch}
.am-body p strong{color:var(--sage)}

/* ---- shared page head ---- */
.page-head{padding-top:calc(var(--nav-h) + 72px);padding-bottom:0;position:relative;z-index:1}
.breadcrumb{display:flex;flex-wrap:wrap;gap:.5rem;font-size:.82rem;color:var(--muted-2);margin-bottom:1.1rem}
.breadcrumb a{color:var(--muted)}
.breadcrumb a:hover{color:var(--accent-soft)}
.breadcrumb .sep{color:var(--muted-2)}
.page-title{font-size:clamp(2rem,5.2vw,3.3rem);font-weight:800;letter-spacing:-.01em;line-height:1.15}
.page-head .lead{margin-top:1.1rem}

/* chips / filters */
.chips{display:flex;gap:.6rem;flex-wrap:wrap}
.chip{padding:.55rem 1.15rem;border-radius:999px;border:1px solid var(--line);font-size:0.88rem;
  color:var(--muted);cursor:pointer;background:transparent;transition:all .3s var(--ease)}
.chip:hover,.chip.active{border-color:var(--accent);color:var(--text);background:var(--green-deep)}

/* ===================== PRODUCTS ===================== */
.shop-section{padding-block:clamp(48px,7vh,80px);
  transition:opacity .35s var(--ease),transform .35s var(--ease),filter .35s var(--ease)}
.shop-section.sec-out{opacity:0;transform:translateY(14px);filter:blur(7px);pointer-events:none}
@keyframes cardIn{from{opacity:0;transform:translateY(22px);filter:blur(8px)}to{opacity:1;transform:none;filter:blur(0)}}
.origin-banner .ob-all{color:var(--accent-soft);font-weight:600;background:none;border:0;cursor:pointer;
  font-size:inherit;text-decoration:underline;text-underline-offset:3px;font-family:inherit}
.shop-section .sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1.5rem;
  margin-bottom:2rem;border-bottom:1px solid var(--line);padding-bottom:1rem}
.shop-section h2{font-size:clamp(1.5rem,3.4vw,2.2rem)}
.shop-section .sec-head span{color:var(--accent-soft);font-size:0.82rem}
.product-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.2rem}
.product-card{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:16px;
  overflow:hidden;background:linear-gradient(165deg,var(--panel),var(--bg-2));
  transition:transform .45s var(--ease),border-color .45s var(--ease)}
.product-card:hover{transform:translateY(-6px);border-color:var(--line-strong)}
.product-card .ph{position:relative;aspect-ratio:1/1;overflow:hidden;
  background:radial-gradient(120% 100% at 60% 20%,var(--green-deep),var(--bg))}
.product-card .ph img{width:100%;height:100%;object-fit:cover;transition:transform .6s var(--ease);
  filter:saturate(.95) brightness(.92)}
.product-card:hover .ph img{transform:scale(1.07);filter:saturate(1.04) brightness(1)}
.product-card .tag{position:absolute;inset-block-start:10px;inset-inline-end:10px;z-index:2;
  font-size:0.78rem;letter-spacing:.06em;padding:.3rem .6rem;border-radius:999px;
  background:rgba(8,16,12,.8);border:1px solid var(--line);color:var(--accent-soft);backdrop-filter:blur(6px)}
.product-card .body{padding:1.1rem 1.1rem 1.2rem;display:flex;flex-direction:column;gap:.35rem;flex:1}
.product-card h3{font-size:1.05rem;font-weight:700}
.product-card a.h3l:hover{color:var(--accent-soft)}
.product-card .meta{color:var(--muted);font-size:.82rem;line-height:1.6}
.product-card .price-row{margin-top:auto;display:flex;align-items:center;justify-content:space-between;
  gap:.6rem;padding-top:1rem}
.price{font-weight:700;font-size:1.05rem;font-variant-numeric:tabular-nums}
.price small{display:block;color:var(--muted);font-weight:400;font-size:0.78rem}
.add-btn{display:inline-flex;align-items:center;gap:.4em;padding:.6em 1.05em;border-radius:999px;
  background:var(--accent);color:#04130b;font-size:0.82rem;font-weight:600;white-space:nowrap;cursor:pointer;
  transition:background .3s var(--ease),transform .3s var(--ease)}
.add-btn:hover{background:var(--accent-soft);transform:translateY(-2px)}
.add-btn.added{background:var(--green)}

/* product detail */
.pd{display:grid;grid-template-columns:1fr 1fr;gap:clamp(2rem,5vw,4rem);align-items:start}
.pd-main{aspect-ratio:1/1;border-radius:22px;overflow:hidden;border:1px solid var(--line);
  background:radial-gradient(120% 100% at 60% 20%,var(--green-deep),var(--bg))}
.pd-main img{width:100%;height:100%;object-fit:cover}
.pd-thumbs{display:flex;gap:.7rem;margin-top:.9rem}
.pd-thumb{width:74px;aspect-ratio:1;border-radius:12px;overflow:hidden;border:1px solid var(--line);
  cursor:pointer;opacity:.55;transition:opacity .3s,border-color .3s}
.pd-thumb img{width:100%;height:100%;object-fit:cover}
.pd-thumb.active,.pd-thumb:hover{opacity:1;border-color:var(--accent)}
.pd-info .eyebrow{margin-bottom:.8rem}
.pd-info h1{font-size:clamp(1.8rem,4vw,2.6rem);margin-bottom:.6rem}
.pd-info .price{font-size:1.7rem;margin-block:1rem}
.pd-info .desc{color:var(--muted);line-height:1.9;margin-bottom:1.5rem}
.specs{list-style:none;border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-bottom:1.6rem}
.specs li{display:flex;justify-content:space-between;padding:.8rem 1.1rem;font-size:0.88rem;
  border-bottom:1px solid var(--line)}
.specs li:last-child{border-bottom:0}
.specs .k{color:var(--muted)}
.specs .v{font-weight:600}
.buy-row{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.qty{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;
  overflow:hidden;background:var(--panel)}
.qty button{width:44px;height:46px;font-size:1.15rem;color:var(--text);transition:background .25s}
.qty button:hover{background:var(--green-deep)}
.qty input{width:46px;height:46px;text-align:center;background:none;border:0;color:var(--text);
  font-family:inherit;font-size:1rem;font-variant-numeric:tabular-nums}
.select-row{display:flex;gap:.6rem;flex-wrap:wrap;margin-bottom:1.4rem}
.opt{padding:.6rem 1rem;border:1px solid var(--line);border-radius:10px;font-size:.88rem;cursor:pointer;
  color:var(--muted);transition:all .3s}
.opt.active,.opt:hover{border-color:var(--accent);color:var(--text);background:var(--green-deep)}

/* ===================== FORMS ===================== */
.field{margin-bottom:1.1rem}
.field label{display:block;font-size:0.82rem;color:var(--muted);margin-bottom:.5rem}
.field.req label::after{content:" *";color:var(--accent-soft)}
.field input,.field textarea,.field select{width:100%;background:var(--panel);color:var(--text);
  border:1px solid var(--line);border-radius:12px;padding:.85rem 1rem;font-family:inherit;font-size:.95rem;
  transition:border-color .3s,background .3s}
.field input::placeholder,.field textarea::placeholder{color:var(--muted-2)}
.field input:focus,.field textarea:focus,.field select:focus{outline:none;border-color:var(--accent);
  background:var(--panel-2)}
.field textarea{min-height:140px;resize:vertical;line-height:1.7}
.field .hint{font-size:0.78rem;color:var(--muted-2);margin-top:.4rem}
.field .err{font-size:.78rem;color:#e9756b;margin-top:.4rem;display:none}
.field.invalid input,.field.invalid textarea{border-color:#a14b43}
.field.invalid .err{display:block}
/* Scoped to the contact form on purpose. `.form-row` is WooCommerce's class for
   every row of every form it renders — checkout, address, login, payment — so
   an unscoped two-column grid here reached into all of them: it is what put the
   «ثبت سفارش» button in a 124px column with its label wrapped onto two lines. */
.ct-form .form-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.form-note{padding:1rem 1.2rem;border:1px solid var(--line);border-radius:12px;background:var(--panel);
  color:var(--muted);font-size:.88rem;line-height:1.7;margin-bottom:1.6rem}
.form-ok{display:none;padding:1rem 1.2rem;border-radius:12px;background:var(--green-deep);
  border:1px solid var(--accent);color:var(--accent-soft);font-size:0.95rem;margin-bottom:1.2rem}
.form-ok.show{display:block}

.contact-grid{display:grid;grid-template-columns:1fr 1.25fr;gap:clamp(2rem,5vw,3.5rem);align-items:start}
.info-card{border:1px solid var(--line);border-radius:16px;padding:1.4rem;background:var(--panel);margin-bottom:1rem}
.info-card .ic{width:34px;height:34px;color:var(--accent-soft);margin-bottom:.8rem}
.info-card h4{font-size:1rem;margin-bottom:.3rem}
.info-card p{color:var(--muted);font-size:0.88rem;line-height:1.7}

/* ===================== ACCORDION ===================== */
.acc{border-top:1px solid var(--line);max-width:840px}
.acc-item{border-bottom:1px solid var(--line)}
.acc-q{width:100%;text-align:start;display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:1.35rem .2rem;font-size:1.05rem;font-weight:600;cursor:pointer;color:var(--text)}
.acc-q .ic{flex:0 0 auto;width:22px;height:22px;position:relative;transition:transform .35s var(--ease)}
.acc-q .ic::before,.acc-q .ic::after{content:"";position:absolute;background:var(--accent-soft);
  inset-block-start:50%;inset-inline-start:50%;translate:-50% -50%}
.acc-q .ic::before{width:12px;height:1.5px}
.acc-q .ic::after{width:1.5px;height:12px;transition:transform .35s var(--ease)}
.acc-item.open .acc-q .ic::after{transform:translate(-50%,-50%) scaleY(0)}
.acc-a{max-height:0;overflow:hidden;transition:max-height .45s var(--ease)}
.acc-a .inner{padding:0 .2rem 1.4rem;color:var(--muted);line-height:1.9;font-size:.95rem}

/* ===================== CART ===================== */
.cart-grid{display:grid;grid-template-columns:1fr 350px;gap:2.5rem;align-items:start}
.cart-row{display:grid;grid-template-columns:90px 1fr auto;gap:1.1rem;align-items:center;
  padding:1.2rem 0;border-bottom:1px solid var(--line)}
.cart-row .thumb{width:90px;aspect-ratio:1;border-radius:12px;overflow:hidden;border:1px solid var(--line);
  background:var(--green-deep)}
.cart-row .thumb img{width:100%;height:100%;object-fit:cover}
.cart-row h4{font-size:1rem;margin-bottom:.25rem}
.cart-row .cm{color:var(--muted);font-size:.82rem}
.cart-row .rm{color:var(--muted-2);font-size:0.82rem;margin-top:.5rem;cursor:pointer;background:none;border:0}
.cart-row .rm:hover{color:#e9756b}
.cart-row .ce{display:flex;flex-direction:column;align-items:flex-end;gap:.7rem}
.summary{border:1px solid var(--line);border-radius:18px;padding:1.6rem;background:var(--panel);
  position:sticky;top:90px}
.summary h3{font-size:1.15rem;margin-bottom:1.2rem}
.summary-row{display:flex;justify-content:space-between;padding:.55rem 0;color:var(--muted);font-size:0.95rem}
.summary-row .v{color:var(--text);font-variant-numeric:tabular-nums}
.summary-row.total{color:var(--text);font-weight:700;font-size:1.15rem;border-top:1px solid var(--line);
  margin-top:.6rem;padding-top:1rem}
.coupon{display:flex;gap:.5rem;margin:1rem 0}
.coupon input{flex:1;background:var(--panel-2);border:1px solid var(--line);border-radius:10px;
  padding:.7rem .9rem;color:var(--text);font-family:inherit}
.coupon button{padding:.7rem 1.1rem;border-radius:10px;border:1px solid var(--line);color:var(--text);font-size:0.82rem}
.coupon button:hover{border-color:var(--accent)}
.cart-empty{text-align:center;padding:4rem 1rem;border:1px dashed var(--line);border-radius:18px}
.steps{display:flex;gap:1.4rem;flex-wrap:wrap;margin-bottom:2.2rem}
.step{display:flex;align-items:center;gap:.6rem;color:var(--muted);font-size:0.88rem}
.step .n{width:26px;height:26px;border-radius:50%;border:1px solid var(--line);display:grid;
  place-items:center;font-size:0.82rem}
.step.active{color:var(--text)}
.step.active .n{background:var(--accent);color:#04130b;border-color:var(--accent)}

/* ===================== ACCOUNT ===================== */
.account{display:grid;grid-template-columns:240px 1fr;gap:2.5rem;align-items:start}
.acct-nav{border:1px solid var(--line);border-radius:16px;padding:.6rem;background:var(--panel);
  position:sticky;top:90px}
.acct-nav a{display:flex;align-items:center;gap:.7rem;padding:.8rem 1rem;border-radius:10px;
  color:var(--muted);font-size:0.95rem;transition:background .3s,color .3s;cursor:pointer}
.acct-nav a:hover,.acct-nav a.active{background:var(--green-deep);color:var(--text)}
.acct-panel{border:1px solid var(--line);border-radius:18px;padding:clamp(1.2rem,3vw,2rem);background:var(--bg-2)}
.acct-panel h3{font-size:1.3rem;margin-bottom:1.4rem}
.auth-tabs{display:flex;gap:.5rem;margin-bottom:1.8rem;border:1px solid var(--line);border-radius:999px;
  padding:.3rem;max-width:320px}
.auth-tabs button{flex:1;padding:.65rem;border-radius:999px;color:var(--muted);font-size:0.88rem;font-weight:600}
.auth-tabs button.active{background:var(--accent);color:#04130b}
.data-table{width:100%;border-collapse:collapse;font-size:0.88rem}
.data-table th,.data-table td{text-align:start;padding:.9rem .8rem;border-bottom:1px solid var(--line)}
.data-table th{color:var(--muted);font-weight:600;font-size:0.82rem}
.badge{display:inline-block;padding:.25rem .7rem;border-radius:999px;font-size:0.78rem;
  background:var(--green-deep);color:var(--accent-soft);border:1px solid var(--line)}
.acct-section{display:none}
.acct-section.active{display:block}

/* ===================== JOURNAL ===================== */
.journal-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.6rem}
/* smoother staggered entrance for journal posts */
.post-featured[data-fade],.journal-grid > [data-fade]{transform:translateY(40px) scale(.955);
  transition-duration:.95s;transition-timing-function:cubic-bezier(.16,.84,.34,1)}
.post-featured[data-fade].revealed,.journal-grid > [data-fade].revealed{transform:none}
.post{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:16px;overflow:hidden;
  background:var(--panel);transition:transform .45s var(--ease),border-color .45s var(--ease)}
.post:hover{transform:translateY(-6px);border-color:var(--line-strong)}
.post .ph{aspect-ratio:16/10;overflow:hidden;background:var(--green-deep)}
.post .ph img{width:100%;height:100%;object-fit:cover;transition:transform .6s var(--ease);
  filter:saturate(.95) brightness(.9)}
.post:hover .ph img{transform:scale(1.06)}
.post .body{padding:1.2rem;display:flex;flex-direction:column;gap:.6rem;flex:1}
.post .cat{font-size:0.78rem;letter-spacing:.14em;text-transform:uppercase;color:var(--accent-soft)}
.post h3{font-size:1.15rem;line-height:1.5}
.post p{color:var(--muted);font-size:0.88rem;line-height:1.7}
.post .pmeta{margin-top:auto;padding-top:.6rem;color:var(--muted-2);font-size:0.82rem}
.post-featured{grid-column:1/-1;display:grid;grid-template-columns:1.25fr 1fr;gap:0;
  border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--panel);margin-bottom:.4rem}
/* Side by side, the photo should be as tall as the copy beside it — no more.
   `height:100%` on the image resolves to auto here (the cell has no definite
   height), so the image fell back to its own proportions and a square photo
   made a 594px-tall square banner. Taking it out of the flow lets the copy set
   the height and the photo crop to whatever that turns out to be. */
.post-featured .ph{aspect-ratio:auto;min-height:340px;position:relative;overflow:hidden}
.post-featured .ph > a{position:absolute;inset:0;display:block}
.post-featured .ph img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.post-featured .body{padding:clamp(1.5rem,4vw,3rem);justify-content:center}
.post-featured h2{font-size:clamp(1.6rem,3vw,2.4rem);line-height:1.35;margin-block:.5rem .8rem}

/* ===================== EDITORIAL / LEGAL ===================== */
.statement{font-size:clamp(1.6rem,4vw,2.7rem);font-weight:700;line-height:1.5;max-width:22ch;
  letter-spacing:-.01em}
.prose{max-width:68ch}
.prose p{color:var(--muted);margin-bottom:1.3rem;line-height:1.95}
.prose h3{font-size:1.3rem;margin:2.2rem 0 1rem;color:var(--text)}
.prose strong{color:var(--sage)}
.about-split{display:grid;grid-template-columns:1fr 1fr;gap:clamp(2rem,5vw,4rem);align-items:center}
.about-img{aspect-ratio:1/1.1;border-radius:22px;overflow:hidden;border:1px solid var(--line)}
.about-img img{width:100%;height:100%;object-fit:cover}
.legal{display:grid;grid-template-columns:230px 1fr;gap:3rem;align-items:start}
.toc{position:sticky;top:90px;border-inline-start:1px solid var(--line);padding-inline-start:1.2rem}
.toc a{display:block;padding:.45rem 0;color:var(--muted);font-size:0.88rem}
.toc a:hover,.toc a.active{color:var(--accent-soft)}

/* ===================== INNER RESPONSIVE ===================== */
@media (max-width:1024px){
  .product-grid{grid-template-columns:repeat(3,1fr)}
  .journal-grid{grid-template-columns:repeat(2,1fr)}
  .account{grid-template-columns:1fr}
  .acct-nav{position:static;display:flex;flex-wrap:wrap}
  .legal{grid-template-columns:1fr}
  .toc{position:static;border:0;padding:0;display:flex;flex-wrap:wrap;gap:1rem;
    border-bottom:1px solid var(--line);padding-bottom:1rem}
}
@media (max-width:820px){
  .pd{grid-template-columns:1fr}
  .contact-grid{grid-template-columns:1fr}
  .cart-grid{grid-template-columns:1fr}
  .summary{position:static}
  .about-split{grid-template-columns:1fr}
  .post-featured{grid-template-columns:1fr}
  /* Side by side the photo takes its height from the column beside it, so it
     needs no ratio of its own. Stacked, `aspect-ratio:auto` plus a 340px floor
     made it whatever shape the source file was — a square for a square photo.
     Give it the banner shape it is cropped to. */
  .post-featured .ph{aspect-ratio:16/9;min-height:0}
}
@media (max-width:560px){
  .product-grid{grid-template-columns:repeat(2,1fr)}
  .journal-grid{grid-template-columns:1fr}
  .ct-form .form-row{grid-template-columns:1fr}
  .product-card .body{padding:.9rem}
}

/* ===================== AUTH / LOGIN (glassmorphism) ===================== */
.auth-wrap{position:relative;min-height:100svh;display:grid;place-items:center;
  padding:clamp(86px,13vh,130px) var(--gut) 60px;overflow:hidden}
.auth-bg{position:absolute;inset:0;z-index:0;background:url("../assets/hero-beans.jpg") center/cover;
  filter:blur(7px) brightness(.42) saturate(.85);transform:scale(1.12)}
.auth-overlay{position:absolute;inset:0;z-index:1;
  background:radial-gradient(110% 90% at 50% 18%,rgba(31,81,56,.34),rgba(6,8,7,.92))}
.auth-wrap .bg-circles{z-index:2}
.auth-top{position:absolute;inset-block-start:0;inset-inline:0;z-index:5;display:flex;align-items:center;
  justify-content:space-between;padding:1.3rem var(--gut)}
.auth-top .brand{font-family:var(--display);font-size:1.5rem;letter-spacing:.26em;color:var(--text)}
.auth-top a.back{color:var(--muted);font-size:0.88rem;transition:color .25s}
.auth-top a.back:hover{color:var(--accent-soft)}

.auth-card{position:relative;z-index:4;width:min(450px,100%);
  background:linear-gradient(160deg,rgba(255,255,255,.085),rgba(255,255,255,.02));
  -webkit-backdrop-filter:blur(26px) saturate(135%);backdrop-filter:blur(26px) saturate(135%);
  border:1px solid rgba(255,255,255,.14);border-radius:26px;padding:clamp(1.8rem,4vw,2.8rem);
  box-shadow:0 40px 90px -35px rgba(0,0,0,.85),inset 0 1px 0 rgba(255,255,255,.14)}
.auth-enter{animation:authIn .7s var(--ease) both}
@keyframes authIn{from{opacity:0;transform:translateY(28px) scale(.98);filter:blur(8px)}to{opacity:1;transform:none;filter:blur(0)}}
.auth-head .brand-logo{height:38px}
.auth-top .brand-logo{height:22px}
@media (prefers-reduced-motion:reduce){.auth-enter{animation:none}}
.auth-head .brand{display:inline-block;font-family:var(--display);font-size:2rem;letter-spacing:.24em;margin-bottom:.7rem}
.auth-head h1{font-size:1.3rem;margin-bottom:.35rem}
.auth-head p{color:var(--muted);font-size:.88rem}
.auth-tabs{display:flex;gap:.35rem;padding:.3rem;border-radius:14px;margin-bottom:1.5rem;
  background:rgba(0,0,0,.28);border:1px solid rgba(255,255,255,.08)}
.auth-tabs button{flex:1;padding:.7em;border-radius:10px;color:var(--muted);font-weight:600;font-size:0.95rem;
  transition:background .3s var(--ease),color .3s var(--ease)}
.auth-tabs button.active{background:rgba(255,255,255,.11);color:var(--text);
  box-shadow:0 2px 10px -4px rgba(0,0,0,.5)}
.auth-form{display:flex;flex-direction:column;gap:1.05rem}
.auth-form[hidden]{display:none}
.auth-field{display:flex;flex-direction:column;gap:.45rem}
.auth-field label{font-size:.82rem;color:var(--muted)}
.auth-input{position:relative;display:flex;align-items:center}
.auth-input input{width:100%;padding:.85em 1em;border-radius:12px;color:var(--text);font-family:inherit;
  font-size:.95rem;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.14);
  transition:border-color .25s var(--ease),background .25s var(--ease),box-shadow .25s}
.auth-input input::placeholder{color:var(--muted-2)}
.auth-input input:focus{outline:none;border-color:var(--accent);background:rgba(255,255,255,.09);
  box-shadow:0 0 0 3px rgba(62,142,95,.18)}
.auth-input.has-eye input{padding-inline-start:2.7em}
.auth-input .eye{position:absolute;inset-inline-start:.5em;width:30px;height:30px;border-radius:8px;
  display:grid;place-items:center;color:var(--muted);transition:color .25s}
.auth-input .eye:hover{color:var(--text)}
.auth-input .eye svg{width:19px;height:19px}
.auth-row{display:flex;align-items:center;justify-content:space-between;font-size:0.82rem;gap:1rem}
.auth-row label{display:flex;align-items:center;gap:.45rem;color:var(--muted);cursor:pointer}
.auth-row input[type=checkbox]{width:16px;height:16px;accent-color:var(--accent)}
.auth-row a{color:var(--accent-soft)}
.auth-card .btn-primary{width:100%;margin-top:.2rem}
.auth-divider{display:flex;align-items:center;gap:1rem;color:var(--muted-2);font-size:.78rem;margin:.3rem 0}
.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:rgba(255,255,255,.1)}
.auth-alt .btn-ghost{width:100%;border-color:rgba(255,255,255,.16)}
.auth-alt .btn-ghost svg{width:1.1em;height:1.1em}
.auth-foot{text-align:center;margin-top:1.3rem;font-size:0.88rem;color:var(--muted)}
.auth-foot a{color:var(--accent-soft);font-weight:600;cursor:pointer}
.auth-msg{margin-top:1rem;padding:.7rem 1rem;border-radius:10px;font-size:0.88rem;text-align:center;
  background:rgba(62,142,95,.16);border:1px solid var(--accent);color:var(--accent-soft);
  opacity:0;transform:translateY(6px);transition:opacity .35s var(--ease),transform .35s var(--ease)}
.auth-msg.show{opacity:1;transform:none}
@media (max-width:560px){.auth-top .brand{font-size:1.3rem}}

/* account profile header */
.acct-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
  margin-bottom:1.8rem;padding-bottom:1.6rem;border-bottom:1px solid var(--line)}
.acct-id{display:flex;align-items:center;gap:1rem}
.acct-avatar{width:54px;height:54px;border-radius:50%;flex:0 0 auto;display:flex;align-items:center;
  justify-content:center;background:linear-gradient(150deg,var(--accent),var(--green));
  color:#fff;font-weight:800;font-size:1.3rem;box-shadow:0 8px 24px -10px rgba(62,142,95,.6)}
.acct-id-txt{display:flex;flex-direction:column}
.acct-id-txt b{font-size:1.15rem;font-weight:700}
.acct-id-txt span{color:var(--muted);font-size:0.88rem}

/* =========================================================
   AUTH v2 — premium login/register UX
   ========================================================= */
/* sliding pill tabs */
.auth-tabs.v2{position:relative}
.auth-tabs.v2 .tab-pill{position:absolute;top:4px;bottom:4px;left:4px;width:calc(50% - 8px);
  border-radius:10px;background:var(--accent);z-index:0;
  transition:left .45s cubic-bezier(.3,1.1,.35,1),width .45s cubic-bezier(.3,1.1,.35,1);
  box-shadow:0 6px 16px -8px rgba(0,0,0,.45)}
.auth-tabs.v2 button{position:relative;z-index:1;background:none!important;transition:color .3s var(--ease)}
.auth-tabs.v2 button.active{color:#fff;box-shadow:none}
html[data-theme="dark"] .auth-tabs.v2 button.active{color:#1d1207}

/* animated panes (crossfade + slide + height) */
.auth-panes{position:relative;overflow:hidden;transition:height .45s var(--ease)}
.auth-panes .pane{transition:opacity .38s var(--ease),transform .42s var(--ease)}
.auth-panes .pane:not(.is-active):not(.leaving){display:none}
.auth-panes .pane.leaving{position:absolute;inset-inline:0;top:0;opacity:0;transform:translateY(-14px) scale(.985);pointer-events:none}
.auth-panes .pane.is-active{animation:paneIn .45s var(--ease) both}
@keyframes paneIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
  .auth-panes,.auth-panes .pane{transition:none}
  .auth-panes .pane.is-active{animation:none}
}

/* field interaction states */
.auth-field{position:relative}
.auth-field label{transition:color .3s var(--ease)}
.auth-field.focus label{color:var(--accent-soft)}
.auth-input input{transition:border-color .3s var(--ease),background .3s var(--ease),box-shadow .3s var(--ease)}
.auth-field .state-ic{position:absolute;inset-inline-end:.8em;top:50%;translate:0 -50%;
  width:20px;height:20px;pointer-events:none}
.auth-field .state-ic svg{position:absolute;inset:0;width:100%;height:100%;
  opacity:0;transform:scale(.4);transition:opacity .3s var(--ease),transform .35s cubic-bezier(.3,1.5,.5,1)}
.auth-field.valid .state-ic .ok{opacity:1;transform:none;color:#4c8f5f}
.auth-field.invalid .state-ic .bad{opacity:1;transform:none;color:#c04b3a}
.auth-field.valid .auth-input input{border-color:rgba(76,143,95,.55)}
.auth-field.invalid .auth-input input{border-color:rgba(192,75,58,.65);
  box-shadow:0 0 0 3px rgba(192,75,58,.12)}
.auth-field.invalid .auth-input input:focus{border-color:#c04b3a}
.auth-input.has-eye input{padding-inline-end:2.4em}
.auth-input .eye.on{color:var(--accent-soft)}

/* inline error text */
.field-err{max-height:0;overflow:hidden;opacity:0;transform:translateY(-4px);margin:0;
  color:#c04b3a;font-size:0.78rem;line-height:1.6;
  transition:max-height .35s var(--ease),opacity .3s var(--ease),transform .35s var(--ease)}
.field-err.show{max-height:3em;opacity:1;transform:none;margin-top:.15rem}
html[data-theme="dark"] .field-err{color:#e08a7a}
html[data-theme="dark"] .auth-field.invalid .state-ic .bad{color:#e08a7a}
html[data-theme="dark"] .auth-field.valid .state-ic .ok{color:#7fc492}

/* password strength meter */
.pw-meter{display:none;align-items:center;gap:.6rem;margin-top:.35rem}
.pw-meter.on{display:flex}
.pw-meter .bar{flex:1;height:4px;border-radius:4px;background:var(--line);overflow:hidden}
.pw-meter .bar i{display:block;height:100%;transform-origin:right center;transform:scaleX(0);
  border-radius:4px;transition:transform .45s var(--ease),background .4s;background:#c04b3a}
.pw-meter[data-level="2"] .bar i{background:#c78e3f}
.pw-meter[data-level="3"] .bar i{background:#8fae4e}
.pw-meter[data-level="4"] .bar i{background:#4c8f5f}
.pw-meter .pw-label{font-size:0.78rem;color:var(--muted);min-width:3em;text-align:left}

/* loading / success button */
.btn-load{position:relative;overflow:hidden}
.btn-load .bl-spin,.btn-load .bl-ok{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  opacity:0;transition:opacity .25s var(--ease)}
.btn-load .bl-spin::after{content:"";width:20px;height:20px;border-radius:50%;
  border:2.5px solid rgba(255,255,255,.35);border-top-color:#fff;animation:blSpin .7s linear infinite}
html[data-theme="dark"] .btn-load .bl-spin::after{border-color:rgba(20,14,8,.3);border-top-color:#1d1207}
@keyframes blSpin{to{transform:rotate(360deg)}}
.btn-load .bl-ok{font-size:1.3rem;font-weight:800}
.btn-load.loading .bl-label,.btn-load.done .bl-label{opacity:0}
.btn-load.loading .bl-spin{opacity:1}
.btn-load.done .bl-ok{opacity:1}
.btn-load.loading,.btn-load.done{pointer-events:none}
.btn-load .bl-label{transition:opacity .25s var(--ease)}

/* card shake on invalid submit */
.auth-card.shake{animation:authShake .5s cubic-bezier(.36,.07,.19,.97)}
@keyframes authShake{
  10%,90%{transform:translateX(-2px)}20%,80%{transform:translateX(3px)}
  30%,50%,70%{transform:translateX(-5px)}40%,60%{transform:translateX(5px)}}

/* message variants */
.auth-msg{border:1px solid transparent}
.auth-msg.err{background:rgba(192,75,58,.1);border-color:rgba(192,75,58,.35);color:#b3462f}
.auth-msg.ok{background:rgba(76,143,95,.12);border-color:rgba(76,143,95,.4);color:#3d7a4f}
html[data-theme="dark"] .auth-msg.err{color:#e6988a}
html[data-theme="dark"] .auth-msg.ok{color:#8fd0a2}
.check-line{display:flex;align-items:center;gap:.5rem;color:var(--muted);font-size:0.82rem;cursor:pointer}
.check-line input{width:16px;height:16px;accent-color:var(--accent)}
.check-line a{color:var(--accent-soft);text-decoration:underline;text-underline-offset:3px}

/* =========================================================
   FIX — grid min-content blowout on narrow viewports
   (1fr tracks default to minmax(auto,1fr); auto minimum lets
   wide card content expand the layout viewport on mobile)
   ========================================================= */
.product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:1024px){.product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:820px){.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:420px){.product-grid{grid-template-columns:minmax(0,1fr)}}
.product-grid>*,.cat-grid>*,.journal-grid>*,.adv-grid>*,
.footer-top>*,.origin-list>*,.pd>*{min-width:0}
.product-card .price-row{flex-wrap:wrap;row-gap:.6rem}
.product-card .body{min-width:0}

/* Anything a link can jump to sits under the fixed header without this — the
   legal page's sections, the shop's category blocks, the product accordion. */
.legal .prose h3,
.shop-section,
.acc-item,
[id^="tab-"]{scroll-margin-top:calc(var(--nav-h, 72px) + 24px)}

/* ---------- article footer: post navigation and comments ---------- */
.post-nav{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:820px;margin:3rem auto 0}
.post-nav-link{display:block;padding:1.1rem 1.3rem;border:1px solid var(--line);border-radius:var(--r-md,14px);
  transition:border-color .3s var(--ease),background .3s var(--ease)}
.post-nav-link:hover{border-color:var(--accent-soft);background:var(--surface-2,rgba(255,255,255,.03))}
.post-nav-link span{display:block;font-size:.78rem;color:var(--muted-2);margin-bottom:.35rem}
.post-nav-link b{display:block;font-weight:600;line-height:1.7}
.post-nav-next{text-align:end}
.post-nav:has(> :only-child){grid-template-columns:1fr}

.comments{max-width:820px;margin:3.5rem auto 0;padding-top:2.5rem;border-top:1px solid var(--line)}
.comments-title{font-size:1.15rem;margin-bottom:1.6rem}
.comment-list,.comment-list .children{list-style:none;margin:0;padding:0}
.comment-list .children{margin-inline-start:clamp(1rem,4vw,2.5rem);margin-top:1rem}
.comment-list li{margin-bottom:1.2rem}
.comment-body{padding:1.2rem 1.4rem;border:1px solid var(--line);border-radius:var(--r-md,14px)}
.comment-meta{display:flex;align-items:center;gap:.7rem;margin-bottom:.7rem}
.comment-author img{width:36px;height:36px;border-radius:50%}
.comment-author .fn{font-style:normal;font-weight:600}
.comment-metadata{font-size:.78rem;color:var(--muted-2)}
.comment-content{color:var(--muted);line-height:1.9;font-size:.95rem}
.comment-content p{margin:0 0 .8rem}
.reply a,.comment-reply-link{font-size:.82rem;color:var(--accent-soft)}
.comment-form{margin-top:2rem;display:grid;gap:1rem}
.comment-form .field,.comment-form p{margin:0}
.comment-form label{display:block;font-size:0.82rem;color:var(--muted);margin-bottom:.4rem}
.comment-form input[type=text],.comment-form input[type=email],
.comment-form input[type=url],.comment-form textarea{width:100%;padding:.8rem 1rem;color:inherit;
  background:transparent;border:1px solid var(--line);border-radius:var(--r-sm,10px);font:inherit;
  transition:border-color .3s var(--ease)}
.comment-form input:focus,.comment-form textarea:focus{outline:none;border-color:var(--accent-soft)}
.comment-form .comment-form-cookies-consent{display:flex;align-items:center;gap:.5rem;font-size:0.82rem;color:var(--muted-2)}
.comment-form .comment-form-cookies-consent label{margin:0}
.no-comments{color:var(--muted-2);font-size:0.88rem}
@media (max-width:640px){.post-nav{grid-template-columns:1fr}.post-nav-next{text-align:start}}

/* =========================================================
   Admin bar
   The site header, the mobile menu and the cart drawer are all
   position:fixed, so WordPress's `html{margin-top:32px}` does not move them —
   the admin bar sat on top of the header for every logged-in user. Offset them
   by hand, following the admin bar's own breakpoints: 32px on desktop, 46px
   between 601 and 782, and nothing at 600 and below, where WordPress makes the
   bar scroll away with the page.
   ========================================================= */
body.admin-bar .nav { inset-block-start: 32px }
body.admin-bar .mobile-menu,
body.admin-bar .mini-cart { top: 32px; height: calc(100dvh - 32px) }

@media screen and (max-width: 782px) {
  body.admin-bar .nav { inset-block-start: 46px }
  body.admin-bar .mobile-menu,
  body.admin-bar .mini-cart { top: 46px; height: calc(100dvh - 46px) }
}
@media screen and (max-width: 600px) {
  body.admin-bar .nav { inset-block-start: 0 }
  body.admin-bar .mobile-menu,
  body.admin-bar .mini-cart { top: 0; height: 100dvh }
}
