/* =========================================================================
   YNH — ynh.css
   1. Tokens   2. Base & typography   3. Components (button, status, badge, chip, panel)
   4. WooCommerce base (buttons, forms, qty, notices, price, tables)   5. Legacy single-product hooks
   Source of truth for values: uj-design/design-rendszer.md
   ========================================================================= */

/* ---------- 1. Tokens ---------- */
:root{
  --ynh-paper:#F4EFE8; --ynh-paper-2:#EBE3D7; --ynh-surface:#FBF8F3; --ynh-white:#FFFFFF; --ynh-line:#E2D8C9;
  --ynh-ink:#211B14; --ynh-ink-soft:#5E5347; --ynh-espresso:#2A2017;
  --ynh-clay:#9A6647; --ynh-clay-ink:#8A5A3D; --ynh-clay-soft:#C58C66; --ynh-sage:#76795F; --ynh-fjord:#657A97;
  --ynh-ok:#6E8F69; --ynh-ok-ink:#4F6B4B; --ynh-sup:#C9973E; --ynh-sup-ink:#8B6A2E; --ynh-pre:#657A97; --ynh-pre-ink:#5A6D86;
  --ynh-error:#A3402F;
  --ynh-r:20px; --ynh-r-sm:12px; --ynh-r-pill:999px;
  --ynh-maxw:1320px; --ynh-maxw-wide:1520px; --ynh-gutter:clamp(16px,4vw,48px); --ynh-sec:clamp(56px,8vw,112px);
  --ynh-shadow:0 30px 50px -34px rgba(33,27,20,.55);
  --ynh-serif:"Fraunces",Georgia,serif; --ynh-sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --ynh-ease:cubic-bezier(.2,.7,.2,1);
  --ynh-head-h:76px;
}
@media (max-width:767px){ :root{ --ynh-head-h:62px; } }

/* ---------- 2. Base & typography ---------- */
html{ scroll-padding-top:calc(var(--ynh-head-h) + 16px); }
body{ font-family:var(--ynh-sans); color:var(--ynh-ink); background:var(--ynh-paper); line-height:1.6; -webkit-font-smoothing:antialiased; overflow-x:hidden; }
h1,h2,h3,h4,h5,h6{ font-family:var(--ynh-serif); font-weight:500; line-height:1.08; letter-spacing:-.02em; color:var(--ynh-ink); margin-top:0; }
h1{ font-size:clamp(2.2rem,4.6vw,4rem); }
h2{ font-size:clamp(1.8rem,3.4vw,2.8rem); }
h3{ font-size:clamp(1.3rem,2vw,1.7rem); }
h4{ font-size:1.2rem; }
a{ color:inherit; text-decoration:none; transition:color .2s; }
.entry-content a, .woocommerce-info a, .woocommerce-message a{ color:var(--ynh-clay-ink); text-decoration:underline; text-underline-offset:2px; }
::selection{ background:var(--ynh-clay-soft); color:#fff; }
:focus-visible{ outline:2px solid var(--ynh-clay); outline-offset:3px; }
img{ max-width:100%; height:auto; }
hr{ border:0; border-top:1px solid var(--ynh-line); }

.ynh-wrap{ max-width:var(--ynh-maxw-wide); margin:0 auto; padding:0 var(--ynh-gutter); }
.ynh-eyebrow{ font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.22em; color:var(--ynh-clay-ink); }
.ynh-em{ font-style:italic; font-weight:400; color:var(--ynh-clay); }
.ynh-sr{ position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---------- 3. Components ---------- */
.ynh-btn{ display:inline-flex; align-items:center; justify-content:center; gap:.55em; padding:.95em 1.7em; border-radius:var(--ynh-r-pill); font-family:var(--ynh-sans); font-size:.92rem; font-weight:500; line-height:1.2; white-space:nowrap; border:1px solid transparent; cursor:pointer; transition:background .25s,color .25s,border-color .25s; }
.ynh-btn svg{ width:1.1em; height:1.1em; }
.ynh-btn--primary{ background:var(--ynh-espresso); color:var(--ynh-paper); }
.ynh-btn--primary:hover{ background:#3c2e21; color:var(--ynh-paper); }
.ynh-btn--ghost{ border-color:rgba(33,27,20,.3); color:var(--ynh-ink); background:transparent; }
.ynh-btn--ghost:hover{ border-color:var(--ynh-ink); }
.ynh-btn--light{ background:var(--ynh-paper); color:var(--ynh-ink); }
.ynh-btn--block{ width:100%; min-height:56px; font-size:1rem; }

.ynh-link{ display:inline-flex; align-items:center; gap:.4em; font-weight:500; font-size:.9rem; border-bottom:1px solid transparent; transition:gap .2s,border-color .2s; }
.ynh-link:hover{ gap:.7em; border-color:currentColor; }

.ynh-status{ display:inline-flex; align-items:center; gap:.5em; font-size:.82rem; font-weight:500; }
.ynh-status::before{ content:""; width:7px; height:7px; border-radius:50%; flex:none; }
.ynh-status--instock{ color:var(--ynh-ok-ink); }   .ynh-status--instock::before{ background:var(--ynh-ok); }
.ynh-status--supplier{ color:var(--ynh-sup-ink); } .ynh-status--supplier::before{ background:var(--ynh-sup); }
.ynh-status--preorder{ color:var(--ynh-pre-ink); } .ynh-status--preorder::before{ background:var(--ynh-pre); }

.ynh-badge{ display:inline-flex; align-items:center; font-size:.66rem; font-weight:600; letter-spacing:.06em; padding:.42em .8em; border-radius:var(--ynh-r-pill); background:var(--ynh-espresso); color:var(--ynh-paper); }
.ynh-badge--new{ background:var(--ynh-sage); color:#fff; }
.ynh-badge--sale{ background:var(--ynh-clay); color:#fff; }

.ynh-chip{ width:32px; height:32px; border-radius:9px; background:var(--ynh-paper); color:var(--ynh-clay); display:grid; place-items:center; flex:none; }
.ynh-chip svg{ width:17px; height:17px; }
.ynh-panel{ background:var(--ynh-surface); border:1px solid var(--ynh-line); border-radius:var(--ynh-r-sm); }

/* ---------- 4. WooCommerce base (Hello ships almost no Woo styling) ---------- */

/* buttons */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce-page a.button, .woocommerce-page button.button, .wc-block-components-button:not(.is-link),
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt{
  display:inline-flex; align-items:center; justify-content:center; gap:.5em;
  padding:.95em 1.7em; border-radius:var(--ynh-r-pill); border:1px solid var(--ynh-espresso);
  background:var(--ynh-espresso); color:var(--ynh-paper); font-family:var(--ynh-sans); font-size:.92rem; font-weight:500; line-height:1.2;
  text-transform:none; letter-spacing:0; box-shadow:none; cursor:pointer; transition:background .25s,border-color .25s,color .25s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .wc-block-components-button:not(.is-link):hover{
  background:#3c2e21; border-color:#3c2e21; color:var(--ynh-paper);
}
.woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled], .woocommerce a.button.disabled{ opacity:.45; cursor:not-allowed; }
.woocommerce a.button.loading{ opacity:.7; }
.woocommerce a.added_to_cart{ display:inline-block; margin-left:.8em; font-size:.85rem; font-weight:500; color:var(--ynh-clay-ink); text-decoration:underline; text-underline-offset:2px; }
/* secondary buttons (update cart, apply coupon) */
.woocommerce button[name="update_cart"], .woocommerce button[name="apply_coupon"]{ background:transparent; color:var(--ynh-ink); border-color:rgba(33,27,20,.3); }
.woocommerce button[name="update_cart"]:hover, .woocommerce button[name="apply_coupon"]:hover{ background:transparent; color:var(--ynh-ink); border-color:var(--ynh-ink); }

/* form fields */
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single, .woocommerce-page form .input-text, #coupon_code,
.wc-block-components-text-input input, .wc-block-components-textarea{
  min-height:48px; padding:.75rem 1rem; border:1px solid var(--ynh-line); border-radius:var(--ynh-r-sm);
  background:var(--ynh-white); color:var(--ynh-ink); font-family:var(--ynh-sans); font-size:.95rem; box-shadow:none; transition:border-color .2s, box-shadow .2s;
}
.woocommerce form .form-row textarea{ min-height:120px; }
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus, .woocommerce form .form-row select:focus, #coupon_code:focus{
  outline:0; border-color:var(--ynh-ink); box-shadow:0 0 0 3px rgba(154,102,71,.18);
}
.woocommerce .select2-container .select2-selection--single{ display:flex; align-items:center; height:48px; }
.woocommerce .select2-container .select2-selection--single .select2-selection__rendered{ padding:0; line-height:1.4; color:var(--ynh-ink); }
.woocommerce .select2-container .select2-selection--single .select2-selection__arrow{ height:46px; right:10px; }
.select2-dropdown{ border-color:var(--ynh-line); border-radius:var(--ynh-r-sm); overflow:hidden; }
.select2-container--default .select2-results__option--highlighted[aria-selected]{ background:var(--ynh-espresso); }
.woocommerce form .form-row label{ font-size:.84rem; font-weight:500; color:var(--ynh-ink-soft); margin-bottom:.35rem; }
.woocommerce form .form-row .required{ color:var(--ynh-clay); text-decoration:none; }
.woocommerce form .form-row.woocommerce-invalid input.input-text, .woocommerce form .form-row.woocommerce-invalid select{ border-color:var(--ynh-error); }
.woocommerce form .form-row.woocommerce-validated input.input-text{ border-color:var(--ynh-line); }
.woocommerce input[type="checkbox"], .woocommerce input[type="radio"]{ accent-color:var(--ynh-espresso); width:18px; height:18px; vertical-align:-3px; }

/* quantity */
.woocommerce .quantity{ display:inline-flex; align-items:center; }
.woocommerce .quantity .qty{
  width:4.2em; height:56px; padding:0 .5rem; text-align:center; border:1px solid var(--ynh-line); border-radius:var(--ynh-r-pill);
  background:var(--ynh-surface); font-family:var(--ynh-sans); font-weight:600; font-size:1rem; color:var(--ynh-ink); -moz-appearance:textfield;
}
.woocommerce .quantity .qty::-webkit-inner-spin-button, .woocommerce .quantity .qty::-webkit-outer-spin-button{ -webkit-appearance:none; margin:0; }
.woocommerce .quantity .qty:focus{ outline:0; border-color:var(--ynh-ink); }
.woocommerce div.product form.cart{ display:flex; flex-wrap:wrap; gap:.6rem; align-items:stretch; margin-bottom:1.2rem; }
.woocommerce div.product form.cart div.quantity{ float:none; margin:0; }
.woocommerce div.product form.cart .button{ float:none; flex:1; min-height:56px; font-size:1rem; }

/* notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner{
  position:relative; margin:0 0 1.5rem; padding:1rem 1.2rem 1rem 3rem; list-style:none;
  border:1px solid var(--ynh-line); border-left-width:3px; border-radius:var(--ynh-r-sm); background:var(--ynh-surface);
  color:var(--ynh-ink); font-size:.92rem; line-height:1.5;
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.6rem 1rem;
}
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before{
  content:""; position:absolute; left:1.15rem; top:1.25rem; width:9px; height:9px; border-radius:50%; font-family:inherit;
}
.woocommerce-message{ border-left-color:var(--ynh-ok); }   .woocommerce-message::before{ background:var(--ynh-ok); }
.woocommerce-info{ border-left-color:var(--ynh-fjord); }   .woocommerce-info::before{ background:var(--ynh-fjord); }
.woocommerce-error{ border-left-color:var(--ynh-error); }  .woocommerce-error::before{ background:var(--ynh-error); }
.woocommerce-error li{ margin:0; }
.woocommerce-message .button, .woocommerce-info .button, .woocommerce-error .button{ order:2; padding:.6em 1.2em; font-size:.84rem; float:none; }
.woocommerce-message .button.wc-forward{ background:transparent; color:var(--ynh-ink); border-color:rgba(33,27,20,.3); }

/* prices, sale, stock */
.woocommerce .price, .woocommerce div.product p.price, .woocommerce div.product span.price, .woocommerce ul.products li.product .price{
  color:var(--ynh-ink); font-family:var(--ynh-sans); font-weight:600; font-variant-numeric:tabular-nums;
}
.woocommerce div.product p.price{ font-size:1.6rem; letter-spacing:-.01em; }
.woocommerce .price del{ color:var(--ynh-ink-soft); font-weight:400; opacity:1; margin-right:.4em; }
.woocommerce .price ins{ text-decoration:none; color:var(--ynh-clay-ink); }
.woocommerce span.onsale{ min-width:0; min-height:0; padding:.42em .8em; border-radius:var(--ynh-r-pill); background:var(--ynh-clay); color:#fff; font-size:.66rem; font-weight:600; letter-spacing:.06em; line-height:1.2; top:12px; left:12px; right:auto; margin:0; }
.woocommerce div.product .stock{ display:none; } /* availability is shown by .ynh-status */

/* tables (cart, order review, my account) */
.woocommerce table.shop_table{ border:1px solid var(--ynh-line); border-radius:var(--ynh-r-sm); border-collapse:separate; background:var(--ynh-surface); }
.woocommerce table.shop_table th{ font-size:.78rem; font-weight:600; text-transform:uppercase; letter-spacing:.12em; color:var(--ynh-ink-soft); }
.woocommerce table.shop_table td, .woocommerce table.shop_table th{ border-color:var(--ynh-line); padding:1rem; }
.woocommerce a.remove{ color:var(--ynh-ink-soft)!important; font-weight:400; }
.woocommerce a.remove:hover{ background:var(--ynh-paper-2); color:var(--ynh-ink)!important; }

/* tabs & star rating (if ever shown) */
.woocommerce div.product .woocommerce-tabs ul.tabs li{ background:transparent; border-color:var(--ynh-line); border-radius:var(--ynh-r-pill) var(--ynh-r-pill) 0 0; }
.woocommerce .star-rating span::before, .woocommerce p.stars a{ color:var(--ynh-clay); }

/* pagination */
.woocommerce nav.woocommerce-pagination ul{ border:0; display:flex; gap:.4rem; justify-content:center; }
.woocommerce nav.woocommerce-pagination ul li{ border:0; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span{
  min-width:42px; height:42px; display:grid; place-items:center; border-radius:var(--ynh-r-pill); border:1px solid var(--ynh-line); background:var(--ynh-surface); color:var(--ynh-ink);
}
.woocommerce nav.woocommerce-pagination ul li span.current{ background:var(--ynh-espresso); border-color:var(--ynh-espresso); color:var(--ynh-paper); }

/* ---------- 5. Legacy single-product hooks (inc/product-page.php, until phase 5) ---------- */
.ynh-brand-logo{ display:inline-flex; margin:.4rem 0 1rem; line-height:0; transition:opacity .2s; }
.ynh-brand-logo:hover{ opacity:.75; }
.ynh-brand-logo__img{ height:30px; width:auto; }
.ynh-brand-logo__name{ font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.16em; color:var(--ynh-ink-soft); line-height:1.4; }
.ynh-est{ display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .8rem; margin:0 0 1.2rem; font-size:.9rem; color:var(--ynh-ink-soft); }
.ynh-est strong{ color:var(--ynh-ink); font-weight:600; }
