/* Shop: light hero with search and category tiles, sticky category chips, wide product cards with 3-side spin, quick view, cart drawer */

/* ---------- Hero (light, 2026-11-14): text + search on the left, products on a soft panel, category tiles below ---------- */
.shop-hero { position: relative; overflow: hidden; color: var(--graphite); background: var(--paper); border-bottom: 1px solid var(--line); padding: clamp(28px, 4vw, 56px) 0 clamp(28px, 4vw, 44px); }
.shop-hero > .wrap { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); }
.shop-hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; }
.shop-hero .hero-tag { color: var(--print-ink); }
.shop-hero h1 { color: var(--graphite); max-width: 13ch; margin-bottom: 14px; }
.shop-hero h1 span { color: var(--print); }
.shop-hero .lead { color: var(--graphite-2); max-width: 46ch; }
.hero-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 520px; margin-top: 22px; padding: 6px 6px 6px 46px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); box-shadow: 0 10px 30px rgba(35, 40, 43, .07); }
.hero-search:focus-within { border-color: var(--print); }
.hero-search svg { position: absolute; left: 17px; color: var(--graphite-2); }
.hero-search input { flex: 1; min-width: 0; height: 46px; min-height: 46px; border: 0; padding: 0; background: transparent; font-size: 1rem; box-shadow: none !important; }
.hero-search .btn { min-height: 46px; padding: 0 22px; }
.shop-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 18px 0 0; padding: 0; font-size: var(--fs-sm); color: var(--graphite-2); }
.shop-trust li { display: flex; align-items: center; gap: 8px; max-width: none; }
.shop-trust li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.shop-hero-art { position: relative; height: clamp(280px, 30vw, 400px); border-radius: 28px; background: #fff; border: 1px solid var(--line); }
.hero-glow { position: absolute; left: 50%; bottom: 8%; width: 70%; height: 10%; translate: -50% 0; border-radius: 50%; background: rgba(35, 40, 43, .14); filter: blur(14px); }
.hero-cut { position: absolute; bottom: 10%; height: auto; filter: drop-shadow(0 14px 18px rgba(35, 40, 43, .18)); transition: transform .4s cubic-bezier(.2, .7, .2, 1); transform: translate(calc(var(--mx, 0) * var(--d, 10px)), calc(var(--my, 0) * var(--d, 10px))); }
.hero-cut-1 { left: 7%; width: 34%; --d: 8px; rotate: -6deg; }
.hero-cut-3 { right: 6%; width: 34%; --d: 12px; rotate: 5deg; }
.hero-cut-2 { left: 50%; margin-left: -9%; width: 18%; bottom: 8%; z-index: 2; --d: 18px; }

.shop-hero .hero-scroll { color: var(--graphite-2); }

/* Shop by category */
.cat-tiles-title { margin: 0 0 14px; font-size: 1.15rem; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.cat-tile { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: var(--graphite); transition: border-color .2s, box-shadow .3s, transform .3s cubic-bezier(.2, .7, .2, 1); }
.cat-tile:hover, .cat-tile:focus-visible { border-color: #c3d9a6; box-shadow: 0 12px 26px rgba(35, 40, 43, .08); transform: translateY(-2px); }
.cat-tile-img { grid-row: span 2; width: 64px; height: 64px; border-radius: 12px; background: var(--paper); overflow: hidden; }
.cat-tile-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cat-tile-name { align-self: end; font-weight: 700; line-height: 1.25; }
.cat-tile-n { align-self: start; font-size: .82rem; color: var(--graphite-2); }

/* the "add your logo" strip above the products */
.brand-strip { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; margin: 0 0 18px; padding: 14px 18px; border-radius: 16px; background: var(--print-wash); border: 1px solid #d5e5c1; }
.brand-strip svg { flex: none; color: var(--print-ink); }
.brand-strip p { flex: 1; min-width: 220px; margin: 0; color: var(--graphite); }
.brand-strip .btn { min-height: 42px; padding: 0 18px; background: #fff; }

/* ---------- Sticky category chips + tools ---------- */
.shop-section { padding-top: 0; }
.shop-bar { position: sticky; top: var(--header-h); z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.shop-bar-in { display: flex; align-items: center; gap: 14px; padding-top: 12px; padding-bottom: 12px; }
.chips { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); padding-right: 30px; }
.chip {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--graphite); font: 600 .92rem var(--body); cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: #c3d9a6; }
.chip small { font-weight: 700; font-size: .75rem; color: var(--graphite-2); background: var(--paper); border-radius: 999px; padding: 1px 7px; }
.chip[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.chip[aria-pressed="true"] small { background: var(--print); color: #16240a; }
.chip.is-ghost { color: var(--graphite-2); cursor: default; }
.shop-tools { display: flex; gap: 8px; flex: none; }
.shop-search { position: relative; display: block; }
.shop-search svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--graphite-2); pointer-events: none; }
.shop-search input, .shop-sort select { height: 42px; min-height: 42px; border-radius: 999px; font-size: .92rem; }
.shop-search input { width: 220px; padding: 0 14px 0 38px; }
.shop-sort select { padding: 0 30px 0 14px; }
.shop-count { margin: 0 0 14px; font-weight: 600; color: var(--graphite-2); }

/* ---------- Product list: wide cards, photo left and details right (2 per row on desktop, 1 on phones) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr)); gap: 20px; }
.p-card {
  position: relative; display: grid; grid-template-columns: minmax(170px, 42%) 1fr; border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; background: #fff; transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, border-color .3s;
  animation: card-in .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 35ms);
}
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } }
@media (hover: hover) { .p-card:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(35, 40, 43, .1); border-color: #e9dccd; } }
.p-media { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--paper); cursor: zoom-in; }
.p-media .spin { height: 100%; min-height: 100%; aspect-ratio: auto; background: transparent; }
.p-card.is-out .p-media .spin img { opacity: .55; filter: grayscale(.4); }
.p-badges { position: absolute; left: 12px; top: 12px; right: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.p-stock, .p-flag { padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.p-stock.is-low { background: var(--yellow); color: var(--graphite); }
.p-stock.is-out { background: var(--graphite); color: #fff; }
.p-stock.is-in { background: var(--green-wash); color: var(--green-deep); }
.p-flag { background: var(--graphite); color: #fff; }
.p-turn { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: rgba(35, 40, 43, .78); color: #fff; font-size: .72rem; font-weight: 700; pointer-events: none; }
.p-body { display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 18px; min-width: 0; }
.p-cat { font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--print-ink); margin: 0; }
.p-name { font: 700 1.15rem/1.25 var(--display); margin: 0; }
.p-name button { all: unset; cursor: pointer; }
.p-name button:hover { color: var(--print-ink); }
.p-name button:focus-visible { outline: 3px solid var(--print); outline-offset: 2px; }
.p-desc { margin: 0; font-size: .88rem; color: var(--graphite-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-price { font: 800 1.45rem/1.2 var(--display); margin: 6px 0 0; }
.p-price small { font: 400 .75rem var(--body); color: var(--graphite-2); }
.p-avail { display: flex; align-items: center; gap: 7px; margin: 0; font-size: .85rem; font-weight: 600; }
.p-avail i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.p-avail.is-in { color: var(--green-deep); } .p-avail.is-in i { background: var(--green); }
.p-avail.is-low { color: var(--graphite); } .p-avail.is-low i { background: #e0b400; }
.p-avail.is-out { color: var(--graphite-2); } .p-avail.is-out i { background: #9aa1a5; }
.p-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 14px; }
.p-actions .btn { min-height: 42px; padding: .35em 1em; font-size: .95rem; }
.p-add { flex: 1; white-space: nowrap; }
.p-card .p-view { display: none; } /* the photo and the name open the quick view */
.qty-sm button { width: 32px; height: 40px; }
.qty-sm input { width: 34px; min-height: 40px; }

/* skeleton while loading */
.p-card.is-skeleton { animation: none; }
.p-card.is-skeleton { min-height: 230px; }
.is-skeleton .p-media { min-height: 230px; background: linear-gradient(100deg, var(--paper) 40%, #fff 50%, var(--paper) 60%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; }
.is-skeleton .p-body span { display: block; margin-bottom: 10px; height: 12px; width: 70%; border-radius: 6px; background: var(--paper); }
.is-skeleton .p-body span + span { width: 40%; height: 18px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Spin: one photo per side, turned with a 3D flip ---------- */
.spin { position: relative; aspect-ratio: 1; perspective: 900px; overflow: hidden; background: #fff; }
.spin img { width: 100%; height: 100%; object-fit: contain; padding: 8%; backface-visibility: hidden; transform-origin: 50% 50%; user-select: none; -webkit-user-drag: none; }
.spin-none { position: absolute; inset: 0; background: var(--paper) url("../img/brand/mark.webp") center / 30% no-repeat; opacity: .5; }
.spin-dots { position: absolute; left: 50%; bottom: 10px; z-index: 2; translate: -50% 0; display: flex; gap: 5px; }
.spin-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(35, 40, 43, .2); transition: background .2s, width .2s; }
.spin-dots i.is-on { width: 16px; border-radius: 4px; background: var(--print); }
.spin-lg { border-radius: var(--radius-l); border: 1px solid var(--line); cursor: grab; touch-action: pan-y; }
.spin-lg:active { cursor: grabbing; }
.spin-lg .spin-dots { display: none; }

.empty-state { grid-column: 1 / -1; padding: 40px; text-align: center; background: var(--paper); border-radius: var(--radius-m); }
.vat-note { margin-top: 22px; font-size: var(--fs-sm); color: var(--graphite-2); }

/* ---------- Quick view ---------- */
.quick-view { width: min(940px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: var(--radius-l); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.quick-view::backdrop { background: rgba(35, 40, 43, .6); backdrop-filter: blur(3px); }
.quick-view[open] { animation: qv-in .28s cubic-bezier(.2, .7, .2, 1); }
@keyframes qv-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.quick-view > .dialog-close { position: absolute; right: 10px; top: 10px; z-index: 3; background: #fff; }
.qv-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; padding: 24px; }
.qv-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.qv-thumbs button { width: 64px; aspect-ratio: 1; padding: 4px; border: 2px solid var(--line); border-radius: var(--radius-m); background: #fff; cursor: pointer; }
.qv-thumbs button[aria-pressed="true"] { border-color: var(--print); }
.qv-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.qv-hint { margin: 8px 0 0; font-size: .82rem; color: var(--graphite-2); }
.qv-info { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; }
.qv-info h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin: 0; }
.qv-price { margin: 6px 0; line-height: 1.5; }
.qv-price strong { font: 800 1.7rem/1.2 var(--display); }
.qv-price small, .qv-price span { color: var(--graphite-2); font-size: .85rem; }
.qv-desc { color: var(--graphite-2); }
.qv-buy { display: flex; gap: 10px; margin-top: 8px; }
.qv-buy .btn { flex: 1; }
.qv-logo {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-m);
  background: var(--print-wash); color: var(--graphite); text-decoration: none; font-size: .9rem; line-height: 1.4; border: 1px dashed #b7d396;
}
.qv-logo svg { flex: none; color: var(--print-ink); margin-top: 2px; }
.qv-logo:hover { background: #fbe4d2; color: var(--graphite); }

/* ---------- Qty stepper ---------- */
.qty { display: inline-flex; align-items: center; border: 1.5px solid #c9d0c1; border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 38px; height: 42px; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--graphite); }
.qty button:hover { background: var(--paper); }
.qty input { width: 44px; min-height: 42px; border: 0; padding: 0; text-align: center; border-radius: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { box-shadow: none; }

/* ---------- Sticky cart button (between the assistant and WhatsApp) ---------- */
.cart-fab {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 49;
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px;
  border: 0; border-radius: 999px; background: var(--graphite); color: #fff; font: 700 1rem var(--body);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .25); cursor: pointer;
}
.cart-fab[hidden] { display: none; }
.cart-fab.is-bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: translateX(-50%) scale(1.12); } }
.cart-badge { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--print); color: #16240a; display: grid; place-items: center; font-size: .85rem; }
.cart-fab-total { color: rgba(255, 255, 255, .8); font-weight: 600; }
.cart-toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 49; translate: -50% 10px; margin: 0; max-width: min(90vw, 380px);
  padding: 10px 16px; border-radius: 999px; background: var(--green-deep); color: #fff; font-size: .9rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s;
}
.cart-toast.is-on { opacity: 1; translate: -50% 0; }

/* ---------- Cart drawer ---------- */
.cart-drawer {
  margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(460px, 100vw);
  padding: 0; border: 0; border-radius: 0; box-shadow: -20px 0 60px rgba(0, 0, 0, .2);
}
.cart-drawer[open] { animation: drawer-in .3s cubic-bezier(.2, .7, .2, 1); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.cart-drawer::backdrop { background: rgba(35, 40, 43, .5); }
.cart-inner { display: flex; flex-direction: column; min-height: 100%; padding: 18px 20px 24px; }
.cart-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.cart-head h2 { margin: 0; font-size: 1.6rem; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { max-width: none; display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); }
.cart-line-name { font-weight: 700; line-height: 1.3; margin: 0 0 4px; }
.cart-line-price { font-size: var(--fs-sm); color: var(--graphite-2); margin: 0 0 8px; }
.cart-line-total { font-weight: 700; text-align: right; white-space: nowrap; }
.cart-remove { border: 0; background: none; color: var(--graphite-2); text-decoration: underline; cursor: pointer; padding: 6px 0; font-size: .85rem; display: block; margin-left: auto; }
.cart-warn { grid-column: 1 / -1; background: var(--print-wash); border-left: 4px solid var(--print); border-radius: var(--radius-s); padding: 10px 12px; font-size: .92rem; }
.cart-warn p { margin: 0 0 8px; }
.cart-warn .btn-row { gap: 8px; }
.cart-warn .btn { min-height: 38px; padding: .3em .9em; font-size: .88rem; }
.cart-pre { grid-column: 1 / -1; font-size: .88rem; color: var(--print-ink); font-weight: 600; margin: 0; }
.cart-empty { color: var(--graphite-2); padding: 20px 0; }
.cart-totals { margin: 16px 0 6px; }
.cart-totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.cart-totals dt { color: var(--graphite-2); }
.cart-totals dd { margin: 0; font-weight: 600; }
.cart-grand { border-top: 2px solid var(--graphite); margin-top: 6px; padding-top: 10px !important; }
.cart-grand dt, .cart-grand dd { color: var(--graphite); font: 800 1.25rem/1.2 var(--display); }
.cart-grand small { font: 400 .8rem var(--body); color: var(--graphite-2); }
.cart-totals-small { font-size: .95rem; }
.cart-note { font-size: var(--fs-sm); color: var(--graphite-2); }
.cart-cta { width: 100%; margin-top: 8px; }
.choice { border: 0; padding: 0; margin: 0 0 14px; }
.choice legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.choice label { display: flex; align-items: center; gap: 10px; font-weight: 400; padding: 8px 0; }
.choice input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--print); }

/* ---------- Tablets and phones ---------- */
@media (max-width: 860px) {
  .shop-hero-grid { grid-template-columns: 1fr; }
  .shop-hero-art { height: 230px; }
  .cat-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(200px, 64%); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; scroll-padding-inline: var(--gutter); scroll-snap-type: x proximity; }
  .cat-tiles::-webkit-scrollbar { display: none; }
  .cat-tile { scroll-snap-align: start; }
  .shop-bar-in { flex-wrap: wrap; gap: 10px; }
  .chips { flex-basis: 100%; order: 2; }
  .shop-tools { flex: 1; }
  .shop-search { flex: 1; }
  .shop-search input { width: 100%; }
  .qv-grid { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .qv-info { padding-top: 0; }
}
@media (max-width: 600px) {
  /* phones: one wide card per row, photo left */
  .product-grid { gap: 12px; }
  .p-card { grid-template-columns: 38% 1fr; border-radius: 16px; }
  .p-body { padding: 12px 12px 12px; gap: 4px; }
  .p-name { font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .p-desc { display: none; }
  .p-price { font-size: 1.15rem; margin-top: 2px; }
  .p-avail { font-size: .78rem; }
  .p-badges { left: 6px; top: 6px; }
  .p-stock, .p-flag { font-size: .68rem; padding: 3px 7px; }
  .p-turn { right: 6px; bottom: 6px; font-size: 0; padding: 5px; }
  .p-actions { padding-top: 10px; gap: 6px; flex-wrap: wrap; }
  .p-actions .btn { min-height: 38px; font-size: .88rem; padding: .3em .7em; }
  .qty-sm button { width: 28px; height: 36px; } .qty-sm input { width: 28px; min-height: 36px; }
  .hero-search .btn { padding: 0 16px; }
  .brand-strip .btn { width: 100%; }
  .qv-thumbs button { width: 56px; }
  /* phones: the cart sits above WhatsApp (the assistant greeting uses the left side), the toast above the cart */
  .cart-fab { left: auto; right: 12px; bottom: 86px; transform: none; min-height: 50px; padding: 0 16px; }
  .cart-fab.is-bump { animation-name: bump-phone; }
  .cart-fab-label { display: none; }
  .cart-toast { bottom: 146px; }
  /* the assistant greeting would cover the cart */
  .has-cart .ai-hello { display: none; }
}
@keyframes bump-phone { 40% { transform: scale(1.12); } }

@media (prefers-reduced-motion: reduce) {
  .hero-cut, .p-card, .cat-tile { animation: none; transition: none; }
}
