/* =========================================================
   Parton Tali — Shop (prémium, világos, Apple-ihletésű UX)
   Önálló stíluslap (nem függ a fő /style.css-től)
   ========================================================= */
:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --surface-2: #f3ece2;
  --ink: #1c1710;
  --muted: #8c7b68;
  --line: rgba(28, 23, 16, .10);
  --orange: #fe3001;
  --orange-2: #fd6302;
  --grad: linear-gradient(100deg, #fe3001, #fd6302);
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1240px;
  --nav-h: 60px;
  --shadow-sm: 0 2px 10px rgba(80, 50, 15, .06);
  --shadow: 0 20px 50px rgba(90, 55, 20, .12);
  --ease: cubic-bezier(.22, .8, .22, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink);
  line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #fff; font-weight: 600; font-size: 1rem;
  padding: 15px 30px; border: none; border-radius: 100px; cursor: pointer;
  text-decoration: none; box-shadow: 0 10px 26px rgba(254, 48, 1, .28);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(254, 48, 1, .38); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--ink); font-weight: 600; font-size: 1rem;
  padding: 14px 28px; border: 1.5px solid var(--line); border-radius: 100px;
  text-decoration: none; cursor: pointer; transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--ink); }
.link-muted { color: var(--muted); text-decoration: none; font-weight: 500; transition: color .2s; }
.link-muted:hover { color: var(--orange); }

/* ---------- nav ---------- */
.shopnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  background: rgba(250, 246, 240, .72); backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.shopnav__inner {
  max-width: var(--maxw); height: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 clamp(18px, 4vw, 40px);
}
.shopnav__logo img { height: 26px; width: auto; display: block; }
.shopnav__links { display: flex; gap: 30px; }
.shopnav__links a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink); opacity: .7; transition: opacity .2s; }
.shopnav__links a:hover, .shopnav__links a.is-shop { opacity: 1; }
.shopnav__cart { position: relative; display: inline-flex; align-items: center; color: var(--ink); padding: 6px; transition: transform .2s; }
.shopnav__cart:hover { transform: scale(1.06); }
.shopnav__count {
  position: absolute; top: -3px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 100px;
}

/* ---------- container ---------- */
.shop {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(96px, 12vh, 150px) clamp(18px, 4vw, 40px) 90px;
  min-height: 70vh;
}

/* ---------- fade-up ---------- */
.fade-up { animation: fadeUp .6s var(--ease) both; }
.fade-up-2 { animation: fadeUp .6s var(--ease) .06s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* =========================================================
   KATALÓGUS
   ========================================================= */
.cat-head { max-width: 720px; margin: 0 auto clamp(44px, 6vw, 72px); text-align: center; }
.cat-head .eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); margin-bottom: 16px; }
.cat-head h1 {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: clamp(2.3rem, 5.5vw, 3.8rem); line-height: 1.02; letter-spacing: -.025em;
}
.cat-head p { color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); margin-top: 16px; }

.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 2.4vw, 36px);
}
.pcard {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .4s var(--ease);
}
.pcard__media {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-2); box-shadow: var(--shadow-sm);
  transition: box-shadow .4s var(--ease);
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); will-change: transform; }
.pcard:hover { transform: translateY(-6px); }
.pcard:hover .pcard__media { box-shadow: var(--shadow); }
.pcard:hover .pcard__media img { transform: scale(1.05); }
.pcard__body { padding: 18px 4px 4px; text-align: center; }
.pcard__name { font-family: "Bricolage Grotesque", sans-serif; font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }
.pcard__price { color: var(--ink); font-weight: 500; margin-top: 4px; }
.pcard__price .from { color: var(--muted); font-weight: 400; font-size: .9rem; }

/* diszkrét badge */
.tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px);
  color: var(--orange); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 100px; box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.tag--muted { color: var(--muted); }

/* =========================================================
   TERMÉKOLDAL (PDP)
   ========================================================= */
.pd-back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .92rem; margin-bottom: 28px; transition: color .2s; }
.pd-back:hover { color: var(--orange); }
.pd { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px, 5vw, 72px); align-items: start; }

/* gallery */
.gal { position: sticky; top: calc(var(--nav-h) + 24px); }
.gal__main { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-sm); }
.gal__track { display: flex; transition: transform .45s var(--ease); touch-action: pan-y; }
.gal__slide { min-width: 100%; aspect-ratio: 4 / 5; }
.gal__slide img { width: 100%; height: 100%; object-fit: cover; }
.gal__btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); color: var(--ink);
  font-size: 1.25rem; line-height: 1; box-shadow: 0 3px 12px rgba(0, 0, 0, .16);
  transition: transform .2s, background .2s; opacity: 0;
}
.gal:hover .gal__btn { opacity: 1; }
.gal__btn:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.gal__btn--prev { left: 14px; }
.gal__btn--next { right: 14px; }
.gal__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gal__thumb { width: 66px; height: 82px; border-radius: 12px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: var(--surface-2); padding: 0; transition: border-color .2s; }
.gal__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gal__thumb.on { border-color: var(--ink); }

/* info */
.pd-info { padding-top: 4px; }
.pd-info h1 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.04; letter-spacing: -.02em; }
.pd-price { font-size: 1.5rem; font-weight: 600; margin: 14px 0 4px; }
.pd-last { display: inline-flex; align-items: center; gap: 6px; color: var(--orange); font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.pd-last::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.pd-desc { color: var(--muted); line-height: 1.65; margin: 22px 0 30px; white-space: pre-line; max-width: 46ch; }

.pd-field-label { font-weight: 600; font-size: .92rem; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; }
.pd-field-label .hint { color: var(--muted); font-weight: 400; font-size: .82rem; }
.seg { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.seg button {
  min-width: 56px; padding: 13px 18px; border-radius: 100px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink);
  font-weight: 600; font-size: .98rem; transition: border-color .2s, background .2s, color .2s, transform .1s;
}
.seg button:hover:not(:disabled) { border-color: var(--ink); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg button:disabled { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
.seg-note { font-size: .84rem; color: var(--muted); min-height: 1.15em; margin-bottom: 26px; }
.seg-note.warn { color: var(--orange); font-weight: 500; }

.pd-buy { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 100px; background: var(--surface); }
.stepper button { width: 44px; height: 50px; border: none; background: none; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.stepper button:hover { color: var(--orange); }
.stepper span { min-width: 34px; text-align: center; font-weight: 600; }
.pd-buy .btn-primary { flex: 1; min-width: 180px; padding: 17px 30px; }

.pd-meta { margin-top: 28px; border-top: 1px solid var(--line); }
.pd-meta details { border-bottom: 1px solid var(--line); }
.pd-meta summary { cursor: pointer; padding: 16px 2px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.pd-meta summary::-webkit-details-marker { display: none; }
.pd-meta summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; font-weight: 400; }
.pd-meta details[open] summary::after { content: "–"; }
.pd-meta .meta-body { padding: 0 2px 18px; color: var(--muted); line-height: 1.6; }
.sizetable { width: 100%; border-collapse: collapse; font-size: .9rem; color: var(--ink); }
.sizetable th, .sizetable td { border: 1px solid var(--line); padding: 8px 12px; text-align: center; }
.sizetable th { background: var(--surface-2); font-weight: 600; }

/* =========================================================
   KOSÁR
   ========================================================= */
.cart { max-width: 760px; margin: 0 auto; }
.cart h1 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 2.8rem); letter-spacing: -.02em; margin-bottom: 30px; }
.citem { display: grid; grid-template-columns: 92px 1fr auto; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.citem__img { width: 92px; height: 108px; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
.citem__name { font-family: "Bricolage Grotesque", sans-serif; font-weight: 600; font-size: 1.1rem; }
.citem__meta { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.citem__price { font-weight: 600; margin-top: 8px; }
.citem__right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.citem__remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .84rem; text-decoration: underline; padding: 0; }
.citem__remove:hover { color: var(--orange); }
.cart__summary { margin-top: 30px; display: flex; flex-direction: column; gap: 8px; }
.cart__row { display: flex; justify-content: space-between; color: var(--muted); }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.4rem; color: var(--ink); padding-top: 12px; border-top: 1px solid var(--line); margin-top: 6px; }
.cart__actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.cart__actions .btn-primary { padding: 17px 40px; }
.cart__note { color: var(--muted); font-size: .84rem; margin-top: 16px; text-align: center; }

/* =========================================================
   STICKY MOBIL VÁSÁRLÓSÁV
   ========================================================= */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 5vw, 24px); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(250, 246, 240, .9); backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.buybar__info { display: flex; flex-direction: column; line-height: 1.2; }
.buybar__name { font-weight: 600; font-size: .92rem; }
.buybar__price { color: var(--muted); font-size: .9rem; }
.buybar__btn { padding: 13px 26px; }

/* =========================================================
   ÁLLAPOTOK
   ========================================================= */
.shop-loading, .shop-empty, .shop-error { text-align: center; padding: 90px 20px; color: var(--muted); }
.shop-empty h2, .shop-error h2 { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.9rem; color: var(--ink); margin-bottom: 12px; letter-spacing: -.01em; }
.shop-empty p, .shop-error p { max-width: 420px; margin: 0 auto; }
.shop-empty .btn-primary, .shop-error .btn-primary, .shop-empty .btn-ghost { margin-top: 26px; }
.shop-spinner { width: 36px; height: 36px; border: 3px solid rgba(254, 48, 1, .18); border-top-color: var(--orange); border-radius: 50%; margin: 0 auto 20px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 14px 26px; border-radius: 100px; font-weight: 500;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28); z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   FOOTER
   ========================================================= */
.shopfoot { border-top: 1px solid var(--line); margin-top: 40px; }
.shopfoot__inner { max-width: var(--maxw); margin: 0 auto; padding: 40px clamp(18px, 4vw, 40px); display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.shopfoot__brand img { height: 34px; width: auto; }
.shopfoot__links { display: flex; gap: 24px; margin-left: auto; }
.shopfoot__links a { text-decoration: none; color: var(--muted); font-weight: 500; transition: color .2s; }
.shopfoot__links a:hover { color: var(--orange); }
.shopfoot__copy { width: 100%; color: var(--muted); font-size: .84rem; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .pd { grid-template-columns: 1fr; }
  .gal { position: static; }
}
@media (max-width: 620px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .shopnav__links { display: none; }
  .pcard__body { padding-top: 14px; }
  .citem { grid-template-columns: 74px 1fr; }
  .citem__right { grid-column: 2; flex-direction: row; justify-content: space-between; width: 100%; align-items: center; }
  /* mobilon a fő PDP CTA-t a sticky sáv váltja ki */
  .pd .pd-buy .btn-primary { display: none; }
  .pd .pd-buy { gap: 0; }
  .buybar.show { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .fade-up, .fade-up-2 { animation: none; }
  .gal__track { transition: none; }
  .shop-spinner { animation: none; }
}
