/* ============================================================
   Shop Design Build — Shopify storefront UI
   (cart drawer, product grids, catalog, product page)
   ============================================================ */

/* ---------- header tools (search + cart) ---------- */
.sf-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sf-icon-btn {
  position: relative; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 0;
  background: rgba(255,255,255,0.1); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 50%; cursor: pointer;
  transition: background .18s ease;
}
.sf-icon-btn:hover, .sf-search-btn[aria-expanded="true"] { background: rgba(255,255,255,0.24); }
.sf-cart-btn__count {
  position: absolute; top: -4px; right: -4px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 11px; background: var(--ember); color: var(--navy);
  font-size: 0.72rem; font-weight: 800; line-height: 21px; text-align: center;
}
.sf-tools + .menu-toggle { margin-left: 0; }
@media (max-width: 1180px) { .site-header .header-cta { margin-left: auto; } }
@media (max-width: 640px) { .sf-tools { margin-left: auto; gap: 8px; } .sf-icon-btn { width: 42px; height: 42px; } }

/* header search panel */
.sf-searchbar { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: 0 32px 48px -28px rgba(16,34,47,0.45); z-index: 95; }
.sf-searchbar .wrap { display: block !important; padding-top: 18px !important; padding-bottom: 18px !important; }
.sf-searchbar__form { display: flex; align-items: center; gap: 12px; }
.sf-searchbar__form > svg { color: var(--ink-soft); flex-shrink: 0; }
.sf-searchbar__form input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; padding: 14px 4px; border: 0; border-bottom: 2px solid var(--line); background: transparent; outline: none; }
.sf-searchbar__form input:focus { border-bottom-color: var(--blue); }
.sf-searchbar__form .btn { padding: 13px 22px; }
@media (max-width: 640px) { .sf-searchbar__form .btn { display: none; } }

/* predictive suggestions */
.sf-suggest { margin-top: 12px; max-height: min(70vh, 560px); overflow-y: auto; }
.sf-shop-search .sf-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-block); color: var(--ink); text-align: left; }
.sf-suggest__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin: 12px 0 8px; }
.sf-suggest__row { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-suggest__item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r); font-size: 0.93rem; line-height: 1.3; }
.sf-suggest__item:hover { background: var(--ground); }
.sf-suggest__item small { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.sf-suggest__img { width: 52px; height: 52px; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden; }
.sf-suggest__img img { width: 100%; height: 100%; object-fit: contain; }
.sf-suggest__all { margin-top: 12px; font-size: 0.93rem; }

/* ---------- cart drawer ---------- */
html.sf-lock { overflow: hidden; }
.sf-drawer { position: fixed; inset: 0; z-index: 400; visibility: hidden; }
.sf-drawer.is-open { visibility: visible; }
.sf-drawer__scrim { position: absolute; inset: 0; background: rgba(16,34,47,0.5); opacity: 0; transition: opacity .2s ease; }
.sf-drawer.is-open .sf-drawer__scrim { opacity: 1; }
.sf-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  background: var(--paper); color: var(--ink);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease;
  box-shadow: -20px 0 50px -20px rgba(16,34,47,0.45);
}
.sf-drawer.is-open .sf-drawer__panel { transform: none; }
.sf-drawer.is-busy .sf-drawer__lines { opacity: .5; pointer-events: none; }
.sf-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.sf-drawer__head h3 { font-size: 1.4rem; }
.sf-x { background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--ink-soft); padding: 0 4px; }
.sf-drawer__lines { flex: 1; overflow-y: auto; padding: 8px 24px; transition: opacity .15s ease; }
.sf-drawer__foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.sf-drawer__foot:empty { display: none; }
.sf-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.sf-line__img { width: 72px; height: 72px; background: var(--ground); border-radius: var(--r); overflow: hidden; }
.sf-line__img img { width: 100%; height: 100%; object-fit: contain; }
.sf-line__title { display: block; font-weight: 600; font-size: 0.95rem; line-height: 1.35; }
.sf-line__title:hover { color: var(--blue); }
.sf-line__variant { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
.sf-line__price { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.sf-line__remove { margin-left: 10px; background: none !important; border: 0 !important; width: auto !important; font-size: 0.82rem; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
.sf-subtotal { display: flex; justify-content: space-between; font-size: 1.1rem; margin-bottom: 8px; }
.sf-note { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 16px; }

.sf-qty { display: inline-flex; align-items: center; gap: 0; margin-top: 10px; }
.sf-qty button { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 1rem; color: var(--ink); }
.sf-qty button:first-child { border-radius: var(--r) 0 0 var(--r); }
.sf-qty > span { min-width: 34px; height: 30px; line-height: 28px; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.sf-qty > span + button { border-radius: 0 var(--r) var(--r) 0; }
.sf-qty--lg { margin: 0; }
.sf-qty--lg button { width: 44px; height: 56px; font-size: 1.2rem; }
.sf-qty--lg input { width: 56px; height: 56px; border: 1px solid var(--line); border-left: 0; border-right: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; }
.sf-qty--lg input::-webkit-inner-spin-button { -webkit-appearance: none; }
.sf-qty--lg button:last-child { border-radius: 0 var(--r) var(--r) 0; }

.sf-empty { color: var(--ink-soft); padding: 24px 0; }
.sf-empty h1 { font-size: clamp(2rem, 4vw, 3rem); color: var(--ink); margin-bottom: 12px; }

/* ---------- product cards / grids ---------- */
.sf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
@media (max-width: 1024px) { .sf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sf-card {
  display: flex; flex-direction: column; background: var(--paper);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-block);
  transition: transform .18s ease, box-shadow .18s ease;
}
a.sf-card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(22,33,44,0.04), 0 24px 44px -22px rgba(16,34,47,0.45); }
.sf-card__img { position: relative; aspect-ratio: 1 / 1; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line-soft); }
.sf-card__img img { width: 100%; height: 100%; object-fit: contain; padding: 10%; }
.sf-card__noimg { font-size: 0.85rem; color: var(--ink-soft); }
.sf-card__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 18px; flex: 1; }
.sf-card__vendor { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.sf-card__title { font-weight: 600; font-size: 0.95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sf-card__price { margin-top: auto; padding-top: 8px; font-weight: 800; font-family: var(--font-display); font-size: 1.05rem; }
.sf-card__price s, .sf-pdp__price s { color: var(--ink-soft); font-weight: 500; font-size: 0.85em; margin-left: 6px; }
.sf-badge { position: absolute; top: 10px; left: 10px; background: var(--ember); color: var(--navy); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 9px; border-radius: var(--r); }
.sf-badge--muted { background: var(--ground-dim); color: var(--ink-soft); }

.sf-card--skel .sf-card__img { background: linear-gradient(90deg, var(--ground) 0%, var(--ground-dim) 50%, var(--ground) 100%); background-size: 200% 100%; animation: sf-shimmer 1.2s linear infinite; }
.sf-card--skel .sf-card__body span { display: block; height: 12px; border-radius: 3px; background: var(--ground); }
.sf-card--skel .sf-card__body span + span { width: 60%; }
@keyframes sf-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sf-card--skel .sf-card__img { animation: none; } a.sf-card:hover { transform: none; } }

.sf-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.sf-section-head .section-head { margin-bottom: 0; }

/* ---------- catalog ---------- */
.sf-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.sf-search { flex: 1 1 320px; display: flex; min-width: 0; max-width: 100%; }
.sf-search input {
  flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 15px 18px;
  border: 1px solid var(--line); border-right: 0; border-radius: var(--r) 0 0 var(--r); background: var(--paper);
}
.sf-search .btn { border-radius: 0 var(--r) var(--r) 0; padding: 15px 24px; }
.sf-toolbar select { font: inherit; font-size: 0.95rem; padding: 15px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.sf-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.sf-check input { width: 18px; height: 18px; accent-color: var(--blue); }
.sf-status { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 18px; min-height: 1.5em; }
.sf-facets { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.sf-facet { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sf-facet__label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin-right: 6px; }
.sf-chip { font: inherit; font-size: 0.88rem; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.sf-chip small { color: var(--ink-soft); margin-left: 3px; }
.sf-chip:hover { border-color: var(--blue); }
.sf-chip.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.sf-chip.is-on small { color: rgba(255,255,255,0.75); }
.sf-more { display: flex; margin: 36px auto 0; }

/* ---------- product page ---------- */
.sf-pdp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .sf-pdp { grid-template-columns: 1fr; } }
.sf-pdp__media { position: sticky; top: 110px; }
@media (max-width: 900px) { .sf-pdp__media { position: static; } }
.sf-pdp__main { aspect-ratio: 1 / 1; background: #fff; border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: var(--shadow-block); }
.sf-pdp__main img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.sf-pdp__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.sf-pdp__thumbs button { flex: 0 0 72px; height: 72px; padding: 4px; background: #fff; border: 2px solid transparent; border-radius: var(--r); cursor: pointer; }
.sf-pdp__thumbs button.is-on { border-color: var(--blue); }
.sf-pdp__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.sf-pdp__title { font-size: clamp(1.8rem, 3.2vw, 2.7rem); margin: 10px 0 16px; }
.sf-pdp__price { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; margin-bottom: 24px; }
.sf-opt { border: 0; padding: 0; margin: 0 0 20px; }
.sf-opt legend { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.sf-opt button { font: inherit; font-size: 0.92rem; padding: 10px 16px; margin: 0 8px 8px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); cursor: pointer; color: var(--ink); }
.sf-opt button.is-on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); font-weight: 600; }
.sf-buy { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 14px; }
.sf-buy .sf-add { flex: 1 1 200px; justify-content: center; }
.sf-add:disabled { opacity: .55; cursor: not-allowed; }
.sf-pdp__meta { font-size: 0.9rem; color: var(--ink-soft); }
.sf-pdp__install { background: var(--sky); border-radius: var(--r-lg); padding: 18px 20px; font-size: 0.95rem; margin: 20px 0 28px; }
.sf-pdp__install a { color: var(--blue); font-weight: 700; }
.sf-pdp__desc { font-size: 0.98rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 24px; overflow-wrap: anywhere; }
.sf-pdp__desc img { height: auto; }
.sf-pdp__desc table { width: 100%; border-collapse: collapse; font-size: 0.9rem; display: block; overflow-x: auto; }
.sf-pdp__desc td, .sf-pdp__desc th { border-bottom: 1px solid var(--line-soft); padding: 8px 10px 8px 0; text-align: left; }
.sf-pdp__desc h2, .sf-pdp__desc h3, .sf-pdp__desc h4 { font-size: 1.2rem; color: var(--ink); margin: 1.4em 0 .6em; }
.sf-pdp__desc ul { padding-left: 1.2em; }
.sf-page-crumb { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 28px; }
.sf-page-crumb a:hover { color: var(--blue); }

/* ---------- shop page ---------- */
.sf-shop-hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.sf-shop-hero .page-hero__bg { position: absolute; inset: 0; z-index: -1; }
.sf-shop-hero .page-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .4; }
.sf-shop-hero .wrap { padding-top: clamp(44px, 6vw, 84px); padding-bottom: clamp(44px, 6vw, 84px); }
.sf-shop-hero h1 { max-width: 18ch; }
.sf-shop-hero p { color: rgba(255,255,255,0.82); font-size: 1.15rem; max-width: 56ch; margin-top: 1rem; }
.sf-shop-search { position: relative; max-width: 760px; margin-top: 28px; }
.sf-shop-search form { display: flex; background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); }
.sf-shop-search input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 1.1rem; padding: 20px 22px; color: var(--ink); outline: none; }
.sf-shop-search .btn { border-radius: 0; padding: 0 30px; }
.sf-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sf-quick a { font-size: 0.88rem; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.35); color: #fff; }
.sf-quick a:hover { background: #fff; color: var(--navy); }

.sf-depts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
@media (max-width: 900px) { .sf-depts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sf-dept { display: flex; flex-direction: column; background: var(--paper); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-block); transition: transform .18s ease; }
.sf-dept:hover { transform: translateY(-3px); }
.sf-dept__img { aspect-ratio: 16 / 9; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.sf-dept__img img { width: 100%; height: 100%; object-fit: cover; }
.sf-dept__name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.1rem, 1.8vw, 1.45rem); letter-spacing: -0.02em; padding: 16px 18px 4px; }
.sf-dept__subs { font-size: 0.86rem; color: var(--ink-soft); padding: 0 18px 18px; }
@media (max-width: 560px) { .sf-dept__subs { display: none; } }
[data-sf-shop].is-browsing .sf-depts-wrap { display: none; }

.sf-catalog-top { scroll-margin-top: 110px; }
.sf-catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.sf-catalog-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.sf-catalog-head [data-sf-desc] { color: var(--ink-soft); max-width: 70ch; margin: 10px 0 0; font-size: 1rem; }
.sf-subs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: thin; }
.sf-subs .sf-chip { white-space: nowrap; flex-shrink: 0; }
.sf-facets details.sf-facet { display: block; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.sf-facets summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sf-facets summary::-webkit-details-marker { display: none; }
.sf-facets summary::after { content: '+'; font-size: 1rem; color: var(--ink-soft); }
.sf-facets details[open] summary::after { content: '2'; }
.sf-facet__vals { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-chip--more { display: none; }
.sf-facet__vals.is-expanded .sf-chip--more { display: inline-block; }
.sf-chip--toggle { background: transparent; border-style: dashed; }
.sf-clear { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-size: 0.9rem; color: var(--blue); text-decoration: underline; cursor: pointer; }

/* while browsing a collection or search, collapse the shop hero to just the search box */
[data-sf-shop].is-browsing .sf-shop-hero .wrap { padding-top: 22px; padding-bottom: 22px; }
[data-sf-shop].is-browsing .sf-shop-hero h1,
[data-sf-shop].is-browsing .sf-shop-hero .wrap > p,
[data-sf-shop].is-browsing .sf-quick { display: none; }
[data-sf-shop].is-browsing .sf-shop-search { margin-top: 0; }
