/* Shared components: buttons, header, logo, cards, drawer, app bar, footer, forms */

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 26px;
  border-radius: 999px; font-weight: 500; font-size: 15px; letter-spacing: .01em; white-space: nowrap;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-gold { background: var(--honey); color: var(--white); }
.btn-gold:hover { background: #b9772f; }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-light { background: var(--ivory-light); color: var(--olive-dark); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--gold); }
.link-arrow .ico { transition: transform .35s var(--ease); }
.link-arrow:hover .ico { transform: translateX(-4px); }
[dir="ltr"] .link-arrow .ico, [dir="ltr"] .flip-ltr { transform: scaleX(-1); }
[dir="ltr"] .link-arrow:hover .ico { transform: scaleX(-1) translateX(-4px); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; position: relative;
  transition: background .3s var(--ease); flex-shrink: 0; }
.icon-btn:hover { background: var(--line); }
.count-dot { position: absolute; top: 1px; inset-inline-end: -1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--honey); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }

/* Badges & chips */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--olive); color: var(--ivory); }
.badge-gold { background: var(--honey); color: #fff; }
.badge-soft { background: rgba(206, 137, 58, .12); color: var(--honey); }
.badge-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--text-soft); }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 14px; transition: all .3s var(--ease); white-space: nowrap; }
.chip:hover { border-color: var(--gold); }
.chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Announcement + header */
.announce { background: var(--olive-dark); color: var(--ivory); font-size: 13px; text-align: center; padding: 9px var(--gutter); letter-spacing: .02em; }
.announce .ico { color: var(--honey-light); margin-inline-end: 6px; }
.site-header { position: sticky; top: 0; z-index: 40; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 74px; }
.header-start { display: none; align-items: center; }
.header-brand { display: flex; align-items: center; min-width: 0; flex-shrink: 0; }
.main-nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; white-space: nowrap; }
.main-nav a { position: relative; padding: 8px 10px; font-size: 14px; font-weight: 500; color: var(--text-soft); transition: color .3s var(--ease); }
.main-nav a::after { content: ""; position: absolute; inset-inline: 10px; bottom: 2px; height: 1.5px; background: var(--gold);
  transform: scaleX(0); transition: transform .35s var(--ease); }
.main-nav a:hover, .main-nav a.is-current { color: var(--text); }
.main-nav a:hover::after, .main-nav a.is-current::after { transform: scaleX(1); }
.header-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2.5px; gap: 2px; background: rgba(255,255,255,.55); }
.seg button { height: 28px; min-width: 34px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-soft);
  transition: all .25s var(--ease); }
.seg button.is-active { background: var(--accent); color: var(--accent-ink); }
.menu-toggle { display: none; border: 1px solid var(--line); background: rgba(255,255,255,.65); }

/* Logo with graceful fallback */
.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; max-width: 100%; }
.logo img { height: 50px; width: auto; max-width: 190px; object-fit: contain; }
.logo-fallback { display: none; align-items: center; gap: 10px; }
.logo.is-fallback img { display: none; }
.logo.is-fallback .logo-fallback { display: inline-flex; }
.logo-mark { width: 38px; height: 38px; color: var(--gold); flex-shrink: 0; }
.logo-word { display: flex; flex-direction: column; line-height: 1.05; }
.logo-word b { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--text); }
.logo-word small { font-size: 9px; letter-spacing: .24em; color: var(--muted); text-transform: uppercase; margin-top: 2px; }

/* Mobile & Tablet Header Fix — Clean 3-column grid so menu NEVER overlaps or clips the logo */
@media (max-width: 1024px) {
  .main-nav, .header-tools .hide-m { display: none !important; }
  .header-start { display: flex; }
  .menu-toggle { display: inline-grid; width: 38px; height: 38px; }
  .header-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    height: 62px;
  }
  .header-start { justify-self: start; }
  .header-brand { justify-self: center; max-width: 155px; overflow: hidden; }
  .header-tools { justify-self: end; margin-inline-start: 0; gap: 5px; }
  .logo img { height: 38px; max-width: 148px; }
  .logo-mark { width: 32px; height: 32px; }
  .logo-word b { font-size: 20px; }
  .logo-word small { font-size: 8px; letter-spacing: .18em; }
  .seg-lang button { height: 26px; min-width: 28px; padding: 0 7px; font-size: 11.5px; }
  .header-bag-btn { width: 38px; height: 38px; border: 1px solid var(--line); background: rgba(255,255,255,.65); }
}

@media (max-width: 380px) {
  .header-brand { max-width: 128px; }
  .logo img { height: 30px; max-width: 118px; }
  .logo-word small { display: none; }
}

/* Product card (legacy fallback) */
.p-card { position: relative; display: flex; flex-direction: column; background: var(--card-bg); color: var(--card-text);
  border-radius: var(--r-lg); overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.p-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.p-media { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.p-card:hover .p-media img { transform: scale(1.05); }
.p-flags { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.p-fav { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; background: rgba(255,255,255,.85); color: var(--olive-dark); }
.p-fav.is-on { color: var(--honey); }
.p-fav.is-on svg { fill: currentColor; }
.p-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.p-cat { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.p-name { font-size: 16.5px; font-weight: 600; line-height: 1.45; }
.p-name a:hover { color: var(--gold); }
.weights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.weights button { height: 30px; padding: 0 4px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit;
  transition: all .25s var(--ease); background: transparent; }
.weights button:hover { border-color: var(--gold); }
.weights button.is-active { border-color: var(--olive); background: var(--olive); color: var(--ivory); }
.weights button.is-vip.is-active { border-color: var(--honey); background: var(--honey); color: #fff; }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.price { font-size: 18px; font-weight: 600; color: var(--card-text); }
.price-old { font-size: 13.5px; color: var(--muted); text-decoration: line-through; }
.save-tag { font-size: 11.5px; color: var(--honey); font-weight: 600; }
.p-add { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; font-size: 14px; font-weight: 500;
  background: var(--olive); color: var(--ivory); transition: background .3s var(--ease); }
.p-add:hover { background: var(--olive-dark); }
.p-add.is-done { background: var(--honey); }

/* Category tile */
.cat-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.cat-tile .cat-img { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--surface-2);
  border: 1px solid var(--line); transition: border-color .4s var(--ease); }
.cat-tile .cat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.cat-tile:hover .cat-img { border-color: var(--gold); }
.cat-tile:hover img { transform: scale(1.06); }
.cat-tile span { font-size: 14.5px; font-weight: 500; }

/* Bundle card */
.bundle { position: relative; border-radius: var(--r-xl); overflow: hidden; min-height: 460px; display: flex; align-items: flex-end; color: #fff; isolation: isolate; }
.bundle > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.4s var(--ease); }
.bundle::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(30,32,16,.05) 0%, rgba(30,32,16,.55) 40%, rgba(30,32,16,.94) 100%); }
.bundle:hover > img { transform: scale(1.05); }
.bundle-body { padding: 30px; width: 100%; }
.bundle-body h3 { font-family: var(--font-display); font-size: 30px; margin: 10px 0 8px; }
.bundle-body p { color: rgba(255, 246, 233, .82); font-size: 14.5px; }
.bundle-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); }
.bundle .price, .bundle .price-old { color: #fff; }
.bundle .price-old { opacity: .6; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.pillar { padding: 28px 22px; border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); }
.pillar b { display: block; font-family: var(--font-display); font-size: 30px; color: var(--text); }
.pillar small { font-size: 11px; letter-spacing: .22em; color: var(--gold); text-transform: uppercase; }
.pillar .num-idx { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .pillars { grid-template-columns: repeat(2, 1fr); } .pillar { padding: 20px 16px; } .pillar b { font-size: 24px; } }

/* Trust strip */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-item .ico-wrap { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--gold); flex-shrink: 0; }
.trust-item b { display: block; font-size: 15px; font-weight: 600; }
.trust-item span { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .trust { grid-template-columns: repeat(2, 1fr); } }

/* Gift card preview */
.gift-card { position: relative; aspect-ratio: 1.6; border-radius: 18px; padding: 26px 28px; color: var(--ivory); overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, #3a3b1d 0%, var(--olive-dark) 55%, var(--olive-deep) 100%);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; justify-content: space-between; }
.gift-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(232, 168, 90, .45); border-radius: 12px; pointer-events: none; }
.gift-card .gc-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: .26em; color: var(--honey-light); }
.gift-card .gc-to { font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); color: #fff; line-height: 1.3; min-height: 1.3em; }
.gift-card .gc-msg { font-family: var(--font-display); font-size: 16px; color: rgba(255,246,233,.85); min-height: 1.5em; }
.gift-card .gc-from { font-size: 12px; color: var(--honey-light); }
.gift-card .gc-pattern { position: absolute; inset-inline-end: -40px; bottom: -40px; width: 200px; height: 200px; color: rgba(232,168,90,.12); }

/* Forms */
.field, .form-grid input:not([type=checkbox]):not([type=radio]):not([type=file]), .form-grid select, .form-grid textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
textarea.field { min-height: 90px; resize: vertical; }
.field:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(206, 137, 58, .15); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; color: var(--text-soft); }
.form-grid .errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: #b0412e; font-size: 13px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* Alerts / toast */
.alert { padding: 14px 18px; border-radius: 12px; background: rgba(80, 81, 43, .08); border: 1px solid var(--line); margin-bottom: 18px; display: flex; gap: 10px; align-items: center; }
.alert.error { background: rgba(176, 65, 46, .08); color: #8d3324; }
.toast { position: fixed; z-index: 90; bottom: 32px; inset-inline-start: 50%; transform: translateX(50%); background: var(--olive-dark); color: var(--ivory);
  padding: 12px 20px; border-radius: 999px; font-size: 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); }
[dir="ltr"] .toast { transform: translateX(-50%); }
.toast .ico { color: var(--honey-light); }

/* Cart drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(20, 21, 10, .45); z-index: 70; backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(440px, 100%); background: var(--ivory-light); color: var(--ink); z-index: 80;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line);
  padding-top: max(22px, env(safe-area-inset-top, 0px)); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); background: #fff;
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px)); }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; background: var(--ivory); }
.cart-line b { font-size: 14.5px; font-weight: 600; display: block; line-height: 1.4; }
.cart-line small { color: var(--muted); font-size: 12.5px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; height: 34px; }
.qty button { width: 32px; height: 32px; display: grid; place-items: center; }
.qty span { min-width: 22px; text-align: center; font-size: 14px; }
.empty-state { text-align: center; padding: 60px 10px; color: var(--muted); }
.empty-state .ico { color: var(--gold); margin-bottom: 12px; }
.drawer-enter { transition: transform .35s var(--ease); }
.drawer-from { transform: translateX(100%); }
[dir="rtl"] .drawer-from { transform: translateX(-100%); }
.drawer-to { transform: translateX(0); }
.fade-enter { transition: opacity .35s var(--ease); }
.fade-from { opacity: 0; }
.fade-to { opacity: 1; }

/* Mobile Slide-Out Navigation Drawer (Clean, Unclipped, Luxury Styling) */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 21, 10, 0.52);
  backdrop-filter: blur(3px);
  z-index: 74;
}
.mobile-sheet {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: min(330px, 86vw);
  z-index: 75;
  background: var(--ivory-light);
  color: var(--ink);
  padding: 18px 20px 24px;
  padding-top: max(18px, env(safe-area-inset-top, 0px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border-inline-end: 1px solid rgba(206, 137, 58, 0.28);
}
.mobile-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.mobile-sheet-head .logo img {
  height: 34px;
  max-width: 140px;
}
.mobile-sheet-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  flex: 1;
}
.mobile-sheet-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 8px;
  border-bottom: 1px solid rgba(80, 81, 43, 0.1);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--olive-dark);
  border-radius: 10px;
  transition: background 0.2s ease;
}
.mobile-sheet-nav a:hover {
  background: rgba(206, 137, 58, 0.1);
}
.mobile-nav-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(206, 137, 58, 0.12);
  color: var(--honey);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.mobile-nav-arr {
  margin-inline-start: auto;
  color: var(--muted);
  opacity: 0.6;
}
.mobile-sheet-foot {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

/* Footer */
.site-footer { background: var(--olive-deep); color: rgba(255, 246, 233, .78); padding-top: clamp(56px, 8vw, 96px); margin-top: 0; }
.site-footer .logo img { height: 58px; max-width: 210px; }
.site-footer .logo-word b { color: var(--ivory); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h4 { color: var(--ivory); font-size: 14px; letter-spacing: .08em; margin-bottom: 16px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14.5px; }
.site-footer a:hover { color: var(--honey-light); }
.footer-bottom { margin-top: 56px; padding: 22px 0; border-top: 1px solid rgba(255, 246, 233, .12); display: flex; justify-content: space-between; gap: 16px; font-size: 13px; flex-wrap: wrap; }
.socials { display: flex; gap: 8px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,246,233,.2); display: grid; place-items: center; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Page hero (inner pages) */
.page-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 4vw, 44px); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.page-hero h1 { margin: 10px 0 12px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--gold); }

/* SEO prose */
.prose { max-width: 72ch; color: var(--text-soft); }
.prose h2 { font-size: 22px; color: var(--text); margin: 26px 0 10px; }
.prose h3 { font-size: 18px; color: var(--text); margin: 20px 0 8px; }
.p-media.is-pack img { object-fit: contain; padding: 9%; }

/* ==========================================================================
   Image placeholder (.ph) — Lightweight, fast-rendering image frame
   ========================================================================== */
.ph.ph {
  background-color: var(--ph-bg);
}
.ph.ph.is-loaded {
  background-image: none;
}
.ph.ph.is-failed {
  background-image: var(--brand-mark), var(--brand-pattern);
  background-size: clamp(28px, 18%, 56px) auto, var(--brand-pattern-size);
  background-repeat: no-repeat, repeat;
  background-position: center, center;
}
.js .ph img { opacity: 0; transition: opacity .25s ease; }
.js .ph img.is-loaded { opacity: 1; }
.js .ph img.is-failed { opacity: 0 !important; }
.ph-img.ph-img { background-color: var(--ph-bg); }

/* Expand tap targets on touch without changing visible control size */
@media (pointer: coarse) {
  .icon-btn::after,
  .menu-toggle::after,
  .header-bag-btn::after,
  .qty button::after,
  .socials a::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }
  .qty button { position: relative; }
}
