/* Shop additions loaded after shop.css: the share sheet, one clear button in search boxes, the cart above the bottom bar, and the
   wide-screen layout (1024px and up, chosen by media queries only). Logical properties, so English flips by itself. */

/* One clear button only: ours. The browser's own cross in a search box is removed. */
body.shop input[type='search']::-webkit-search-cancel-button,
body.shop input[type='search']::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
body.shop input[type='search'] { -webkit-appearance: none; appearance: none; }

/* ---------- share sheet ---------- */
.sheet.share-sheet { height: fit-content; }
.share-body { padding: 4px 12px 16px; flex: 0 1 auto; }
.share-grid { display: flex; flex-direction: column; gap: 2px; }
body.shop .share-opt { display: flex; flex-direction: row; align-items: center; gap: 14px; width: 100%; height: 60px; padding: 0 8px; border-radius: 16px; background: transparent; border: 0; font-size: 15px; font-weight: 600; color: var(--s-ink); text-align: start; }
body.shop .share-opt:hover, body.shop .share-opt:active { background: #f3f6fd; }
.share-opt i { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--s-blue); flex: none; }
.share-opt svg { width: 24px; height: 24px; }
.share-opt.whatsapp i { background: #25d366; }
.share-opt.whatsapp svg.wa-i { fill: currentColor; stroke: none; }
.share-opt.facebook i { background: #1877f2; }
.share-opt.telegram i { background: #229ed9; }
.share-opt.instagram i { background: linear-gradient(45deg, #f9a03f, #e1306c 55%, #833ab4); }
.share-opt:focus-visible { outline: 2px solid var(--s-blue); outline-offset: 2px; }

/* ---------- the cart page has the bottom bar now, so its total bar floats just above it ---------- */
.shop-wrap.cart-wrap { padding-bottom: 250px; }
.cart-wrap .cartbar { bottom: 88px; inset-inline: 14px; max-width: 402px; border-radius: 22px; box-shadow: 0 10px 28px rgba(11, 27, 63, 0.16); padding-bottom: 16px; }
.page-head h1 { min-width: 0; }

/* ---------- wrappers that only matter on wide screens: invisible on phones ---------- */
.cart-cols, .cart-main, .pp-top, .pp-info, .shop-layout, .shop-main { display: contents; }
.side, .pp-thumbs { display: none; }
.pp-thumbs[hidden] { display: none !important; }
.co-fields, .co-side { display: flex; flex-direction: column; gap: 14px; }

/* ---------- wide screens ---------- */
@media (min-width: 1024px) {
  .shop-wrap, .shop-wrap.no-nav, .shop-wrap.cart-wrap { max-width: 1280px; padding: 0 24px 64px; }
  .shop-top { display: none; }
  .toast { bottom: 32px; }

  /* Bottom sheets become centered windows. */
  .sheet { inset: 0; margin: auto; width: 520px; max-width: calc(100vw - 48px); height: min(640px, 86dvh); max-height: 86dvh; border-radius: 26px; transform: scale(0.96); opacity: 0; pointer-events: none; transition: transform 0.2s ease-out, opacity 0.2s; padding-bottom: 0; }
  .sheet.open { transform: none; opacity: 1; pointer-events: auto; }
  .sheet.share-sheet { height: fit-content; width: 440px; }

  /* Products: filters in a side panel, chips for the categories, a bigger grid. */
  .pills { display: none; }
  .shop-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 24px; }
  .shop-main { display: block; min-width: 0; }
  .side { scrollbar-width: thin; display: block; position: sticky; top: 96px; max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain; background: #fff; border-radius: 24px; padding: 8px 0 12px; box-shadow: 0 6px 18px rgba(11, 27, 63, 0.05); }
  .side-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 8px; }
  .side-head b { font-size: 16px; }
  .side-head .clear { border: 0; background: transparent; color: var(--s-red); font-size: 12px; font-weight: 600; }
  .side-group { border-top: 1px solid var(--s-line); padding: 6px 0; }
  .side-group h3 { margin: 10px 20px 4px; font-size: 13px; color: var(--s-muted); font-weight: 700; }
  .side-list { max-height: 260px; overflow-y: auto; }
  .side .pick { height: 46px; font-size: 13px; padding: 0 20px; }
  .side .pick .logo { width: 30px; height: 30px; }
  .side .frow { height: 52px; font-size: 13px; }
  .side .price-fields { padding: 8px 20px 12px; }
  .side :focus-visible { outline: 2px solid var(--s-blue); outline-offset: -2px; }
  .cats { padding: 0 0 6px; flex-wrap: wrap; overflow: visible; gap: 8px; scroll-snap-type: none; }
  .cat { width: auto; height: 44px; flex-direction: row; gap: 8px; padding: 0 16px 0 6px; border-radius: 999px; box-shadow: none; border: 1.5px solid var(--s-chip); font-size: 13px; }
  .cat:dir(ltr) { padding: 0 6px 0 16px; }
  .cat .ic { width: 32px; height: 32px; border-radius: 50%; }
  .cat .ic svg { width: 18px; height: 18px; }
  .cat.on { background: var(--s-field); }
  .chips { padding: 6px 0 0; }
  .didyou { margin: 10px 0 0; }
  .cross-note { margin: 8px 0 0; }
  .listhead { padding: 14px 0 12px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; }
  .card { padding: 12px; border-radius: 24px; }
  .card .photo { height: 170px; }
  .card .nm { font-size: 13.5px; height: 42px; }
  .card .pr b { font-size: 15.5px; }
  .card:hover { box-shadow: 0 12px 28px rgba(11, 27, 63, 0.1); }

  /* One product: the gallery on one side, the details and the buy buttons on the other, the specs under both. */
  .pp-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 24px; }
  .pp-gallery { height: auto; border-radius: 28px; display: flex; flex-direction: column; }
  .pp-slides { height: 500px; }
  .pp-slide { padding: 48px; }
  .pp-dots { display: none; }
  .pp-thumbs { display: flex; gap: 10px; padding: 0 20px 20px; justify-content: center; flex-wrap: wrap; }
  .pp-thumb { width: 72px; height: 72px; border-radius: 16px; background: #fff; border: 2px solid transparent; padding: 4px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(11, 27, 63, 0.08); }
  .pp-thumb img { width: 100%; height: 100%; object-fit: contain; }
  .pp-thumb.on { border-color: var(--s-blue); }
  .pp-info { display: flex; flex-direction: column; gap: 16px; }
  .pp-body { border-radius: 24px; padding: 24px; gap: 14px; }
  .pp-name { font-size: 26px; }
  .pp-price b { font-size: 34px; }
  .stickybar { position: static; max-width: none; margin: 0; padding: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .stickybar .p { display: none; }
  .stickybar .add { height: 56px; }
  .stickybar .wa { height: 56px; width: 56px; }
  .pp-info .pp-sec { border-radius: 24px; padding: 8px 24px 16px; }
  .raffle-card { margin: 0; }
  .visit { padding: 0 4px; }
  .pp-top + .pp-sec { margin-top: 24px; border-radius: 24px; padding: 12px 24px 24px; }

  /* Cart: the items on one side, the summary box (sticky) on the other. */
  .page-head { margin-top: 24px; border-radius: 22px; padding: 0 20px; }
  .cart-cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
  .cart-main { display: block; min-width: 0; }
  .lines { padding: 16px 0; }
  .note { margin: 0; }
  .cart-wrap .cartbar { position: sticky; top: 96px; bottom: auto; inset-inline: auto; max-width: none; margin: 16px 0 0; border-radius: 24px; padding: 22px; box-shadow: 0 10px 30px rgba(11, 27, 63, 0.1); }
  .cartbar .btns { flex-direction: column; }
  .cartbar .btns .ghost { width: 100%; }

  /* Checkout: the form and the map side by side. */
  .sumcard { margin: 16px 0; }
  .form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 0; align-items: start; }
  .map-box { height: 380px; }
  .pagefoot { position: static; max-width: 560px; margin: 0; padding: 24px 0 0; box-shadow: none; background: transparent; }
  .done { padding-top: 80px; }
  .done .acts { max-width: 420px; }
}
@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  /* Arrows sit in the middle of the big picture and show when the mouse is over the gallery (or one has the keyboard focus). */
  .pp-nav { top: 250px; width: 44px; height: 44px; }
  .pp-nav svg { width: 22px; height: 22px; }
  .pp-gallery .pp-nav { opacity: 0; }
  .pp-gallery:hover .pp-nav, .pp-gallery:focus-within .pp-nav { opacity: 1; }
  .pp-gallery .pp-nav:disabled { opacity: 0; }
  .pp-gallery:hover .pp-nav:disabled { opacity: 0.35; }
  .pp-lightbox .pp-nav, .pp-lightbox:hover .pp-nav { opacity: 1; top: 50%; }
  .pp-thumb { cursor: pointer; }
  .pp-thumb:hover { border-color: #b8c8f5; }
  .pp-thumb.on { border-color: var(--s-blue); }
}

@media (min-width: 1024px) {
  .card .photo { height: 190px; }
}
