/* Salt & Crystal — Extras: search overlay + product image zoom */

html.sc-no-scroll, html.sc-no-scroll body { overflow: hidden; }

/* ═════════════ SEARCH OVERLAY ═════════════ */
.sc-search-overlay {
  position: fixed; inset: 0; z-index: 10000;
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear .5s;
}
.sc-search-overlay.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }

.sc-search-panel {
  position: absolute; inset: 0;
  overflow-y: auto;
  background:
    radial-gradient(circle at 85% 0%, hsla(33,55%,50%,.10), transparent 40%),
    var(--bg, #fcfaf8);
  transform: translateY(-100%);
  transition: transform .5s cubic-bezier(.7,0,.2,1);
}
.sc-search-overlay.is-open .sc-search-panel { transform: none; }

.sc-search-inner {
  max-width: 860px; margin: 0 auto;
  padding: clamp(80px, 14vh, 140px) 24px 60px;
  opacity: 0; transform: translateY(-12px);
  transition: opacity .35s ease .2s, transform .35s ease .2s;
}
.sc-search-overlay.is-open .sc-search-inner { opacity: 1; transform: none; }

.sc-search-close {
  position: absolute; top: 22px; right: 22px;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border, #e8dfd3); background: #fff;
  transition: background .2s, transform .3s;
}
.sc-search-close svg { width: 20px; height: 20px; fill: none; stroke: var(--fg, #2a2622); stroke-width: 2; stroke-linecap: round; }
.sc-search-close:hover { background: var(--fg, #2a2622); transform: rotate(90deg); }
.sc-search-close:hover svg { stroke: #fff; }

.sc-search-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--primary, #c68739); text-align: center; margin-bottom: 18px;
}

.sc-search-form {
  position: relative; display: flex; align-items: center;
  border-bottom: 2px solid var(--fg, #2a2622);
  padding-bottom: 6px;
}
.sc-search-ico { width: 26px; height: 26px; flex-shrink: 0; fill: none; stroke: var(--muted, #7f756c); stroke-width: 2; stroke-linecap: round; }
.sc-search-form input[type="search"] {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-family: var(--heading, 'Playfair Display', serif);
  font-size: clamp(24px, 4.4vw, 42px);
  color: var(--fg, #2a2622);
  padding: 10px 16px;
  -webkit-appearance: none; appearance: none;
}
.sc-search-form input::placeholder { color: hsl(30,8%,70%); }
.sc-search-form input::-webkit-search-cancel-button { display: none; }
.sc-search-submit {
  flex-shrink: 0;
  padding: 13px 28px; border-radius: 999px;
  background: var(--primary, #c68739); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  transition: background .2s;
}
.sc-search-submit:hover { background: hsl(33,55%,42%); }

/* loading bar under the field */
.sc-search-form::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--primary, #c68739);
}
.sc-search-overlay.is-loading .sc-search-form::after { animation: sc-search-load 1s ease-in-out infinite; }
@keyframes sc-search-load { 0% { width: 0; left: 0; } 50% { width: 60%; left: 20%; } 100% { width: 0; left: 100%; } }

.sc-search-suggest { margin-top: 36px; display: grid; gap: 26px; }
.sc-search-suggest[hidden] { display: none; }
.sc-search-label {
  font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted, #7f756c); margin-bottom: 12px;
}
.sc-search-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-search-chip {
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--border, #e8dfd3); background: #fff;
  font-size: 14px; color: var(--fg, #2a2622);
  transition: border-color .2s, background .2s, color .2s;
}
.sc-search-chip:hover { border-color: var(--primary, #c68739); background: var(--accent, #f3e9dc); color: var(--primary, #c68739); }

.sc-search-results { margin-top: 32px; }
.sc-search-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sc-search-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px; border-radius: 14px;
  background: #fff; border: 1px solid var(--border, #e8dfd3);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.sc-search-item:hover { border-color: var(--primary, #c68739); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(42,38,34,.07); }
.sc-search-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--secondary, #f1ebe3); }
.sc-search-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sc-search-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sc-search-name { font-size: 15px; font-weight: 600; color: var(--fg, #2a2622); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sc-search-price { font-size: 13px; color: var(--primary, #c68739); font-weight: 600; }
.sc-search-all {
  display: inline-block; margin-top: 22px;
  font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--primary, #c68739); border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.sc-search-empty { color: var(--muted, #7f756c); font-size: 16px; text-align: center; padding: 30px 0; }

@media (max-width: 640px) {
  .sc-search-close { top: 14px; right: 14px; width: 40px; height: 40px; }
  .sc-search-inner { padding-top: 76px; }
  .sc-search-submit { display: none; }
  .sc-search-ico { width: 22px; height: 22px; }
  .sc-search-list { grid-template-columns: 1fr; }
}

/* ═════════════ PRODUCT IMAGE ZOOM ═════════════ */
.sc-single-gallery-col .sc-gallery-main.sc-zoomable { position: relative; cursor: zoom-in; }
.sc-single-gallery-col .sc-gallery-main.sc-zoomable img {
  transition: transform .25s ease-out, opacity .3s;
  will-change: transform;
}
.sc-single-gallery-col .sc-gallery-main.is-zooming img { transition: opacity .3s; }

.sc-zoom-btn {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); border: 1px solid var(--border, #e8dfd3);
  box-shadow: 0 4px 12px rgba(42,38,34,.10);
  transition: opacity .2s, background .2s;
}
.sc-zoom-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--fg, #2a2622); stroke-width: 2; stroke-linecap: round; }
.sc-zoom-btn:hover { background: var(--primary, #c68739); }
.sc-zoom-btn:hover svg { stroke: #fff; }
.sc-gallery-main.is-zooming .sc-zoom-btn { opacity: 0; }

/* Lightbox */
.sc-lightbox {
  position: fixed; inset: 0; z-index: 10001;
  background: var(--bg, #fcfaf8);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.sc-lightbox.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }

.sc-lb-stage {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 70px 90px; overflow: hidden;
}
.sc-lb-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  cursor: zoom-in; user-select: none; -webkit-user-drag: none;
  transition: transform .3s ease;
}
.sc-lightbox.is-zoomed .sc-lb-img { cursor: zoom-out; transition: transform .3s ease, transform-origin 0s; }

.sc-lb-close, .sc-lb-nav {
  position: absolute; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--border, #e8dfd3);
  transition: background .2s;
}
.sc-lb-close svg, .sc-lb-nav svg { width: 22px; height: 22px; fill: none; stroke: var(--fg, #2a2622); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc-lb-close:hover, .sc-lb-nav:hover { background: var(--fg, #2a2622); }
.sc-lb-close:hover svg, .sc-lb-nav:hover svg { stroke: #fff; }
.sc-lb-close { top: 20px; right: 20px; }
.sc-lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.sc-lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.sc-lb-count {
  position: absolute; top: 32px; left: 50%; transform: translateX(-50%);
  font-size: 13px; letter-spacing: .15em; color: var(--muted, #7f756c);
}
.sc-lb-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted, #7f756c); pointer-events: none;
}
.sc-lightbox.is-zoomed .sc-lb-hint { opacity: 0; }

@media (max-width: 640px) {
  .sc-lb-stage { padding: 64px 12px; }
  .sc-lb-nav { top: auto; bottom: 16px; transform: none; width: 44px; height: 44px; }
  .sc-lb-prev { left: 16px; }
  .sc-lb-next { right: 16px; }
  .sc-lb-close { top: 12px; right: 12px; }
  .sc-lb-count { top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-search-panel, .sc-search-inner, .sc-lightbox, .sc-lb-img,
  .sc-single-gallery-col .sc-gallery-main.sc-zoomable img { transition: none !important; }
}
