/* Heva Jewels additions on top of the original Heba&Co. theme.
   Uses the theme's own tokens (--hc-*, --heba-*) so everything new matches. */

/* ---------- smooth page-to-page */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2,.6,.2,1); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
html.heva-locked { overflow: hidden; }

/* ---------- logo */
.heva-logo { display: block; height: auto; width: clamp(104px, 11vw, 148px); }
.header-logo__image-container, .header-logo { max-width: none !important; }

/* ---------- reveal on scroll */
.heva-pre { opacity: 0; transform: translateY(22px); }
.heva-pre.heva-in { opacity: 1; transform: none;
  transition: opacity .9s cubic-bezier(.2,.6,.2,1) calc(var(--heva-i, 0) * 70ms),
              transform .9s cubic-bezier(.2,.6,.2,1) calc(var(--heva-i, 0) * 70ms); }

/* ---------- product card lift */
@media (hover: hover) {
  .product-card, .heva-result { transition: transform .5s cubic-bezier(.2,.6,.2,1); }
  .product-card:hover, .heva-result:hover { transform: translateY(-4px); }
  .product-card img, .heva-result img { transition: transform 1.1s cubic-bezier(.2,.6,.2,1); }
  .product-card:hover img, .heva-result:hover img { transform: scale(1.035); }
}

/* ---------- add-to-cart confirmation */
.add-to-cart-button.heva-added { background: var(--hc-ivory, #f6f3ee) !important; color: #0a0a0a !important; transition: background .3s, color .3s; }

/* ---------- drawer */
.heva-drawer { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.heva-drawer__scrim { position: absolute; inset: 0; background: rgba(5,5,6,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .45s cubic-bezier(.2,.6,.2,1); }
.heva-drawer__panel { position: absolute; inset: 0 0 0 auto; width: min(440px, 100vw); display: flex; flex-direction: column;
  background: var(--hc-panel, #0b0b0d); color: var(--hc-ivory, #f6f3ee); border-left: 1px solid var(--hc-line, rgba(246,243,238,.14));
  box-shadow: var(--hc-shadow); transform: translateX(104%); transition: transform .6s cubic-bezier(.16,1,.3,1); outline: none; }
.heva-drawer[aria-hidden="false"] { pointer-events: auto; }
.heva-drawer[aria-hidden="false"] .heva-drawer__scrim { opacity: 1; }
.heva-drawer[aria-hidden="false"] .heva-drawer__panel { transform: none; }
.heva-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--hc-line, rgba(246,243,238,.14)); }
.heva-drawer__head h2 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.heva-drawer__x { background: none; border: 0; color: inherit; padding: 8px; margin: -8px; cursor: pointer; border-radius: 50%; }
.heva-drawer__x:hover { background: rgba(246,243,238,.08); }
.heva-drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.heva-drawer__foot { padding: 20px 24px 24px; border-top: 1px solid var(--hc-line, rgba(246,243,238,.14)); }

.heva-lines { list-style: none; margin: 0; padding: 0; }
.heva-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--hc-line, rgba(246,243,238,.14)); }
.heva-line:last-child { border-bottom: 0; }
.heva-line__img img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--hc-radius-sm, 12px); display: block; background: #111; }
.heva-line__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.heva-line__title { color: inherit; text-decoration: none; font-weight: 650; }
.heva-line__price { color: var(--hc-muted, #aaa49c); font-size: 14px; }
.heva-line__remove { background: none; border: 0; padding: 0; color: var(--hc-muted, #aaa49c); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.heva-line__remove:hover { color: var(--hc-ivory, #f6f3ee); }
.heva-qty { display: inline-flex; align-items: center; margin-top: 8px; border: 1px solid var(--hc-line-strong, rgba(246,243,238,.24)); border-radius: 999px; width: max-content; }
.heva-qty button { width: 36px; height: 34px; background: none; border: 0; color: inherit; font-size: 16px; cursor: pointer; border-radius: 999px; }
.heva-qty button:hover { background: rgba(246,243,238,.08); }
.heva-qty span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }

.heva-ship { margin-bottom: 16px; }
.heva-ship__bar { height: 3px; background: rgba(246,243,238,.12); border-radius: 3px; overflow: hidden; }
.heva-ship__bar span { display: block; height: 100%; width: calc(var(--p) * 100%); background: var(--heba-red, #dd1d1d); transition: width .6s cubic-bezier(.16,1,.3,1); }
.heva-ship p { margin: 8px 0 0; font-size: 12px; color: var(--hc-muted, #aaa49c); }
.heva-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.heva-total strong { font-size: 18px; }
.heva-fine { margin: 6px 0 16px; font-size: 12px; color: var(--hc-muted, #aaa49c); }
.heva-checkout { display: flex !important; justify-content: center; width: 100%; background: var(--heba-red, #dd1d1d) !important; color: #fff !important; border-color: var(--heba-red, #dd1d1d) !important; }
.heva-checkout:hover { background: var(--heba-red-hover, #b31717) !important; }
.heva-empty { padding: 48px 0; text-align: center; display: grid; gap: 18px; justify-items: center; color: var(--hc-muted, #aaa49c); }

/* ---------- cart page */
.heva-cartpage { width: var(--hc-page, min(1440px, 92vw)); margin: 0 auto; padding: clamp(40px, 7vw, 96px) 0 clamp(60px, 9vw, 120px); }
.heva-cartpage h1 { font-size: clamp(40px, 6vw, 80px); letter-spacing: -.05em; line-height: .95; margin: 0 0 clamp(24px, 4vw, 48px); }
.heva-cartpage__grid { display: grid; gap: clamp(24px, 4vw, 64px); }
@media (min-width: 900px) { .heva-cartpage__grid { grid-template-columns: 1fr 380px; align-items: start; } }
.heva-cartpage__sum { padding: 24px; border: 1px solid var(--hc-line, rgba(246,243,238,.14)); border-radius: var(--hc-radius-md, 18px); background: var(--hc-panel-raised, #111114); position: sticky; top: 110px; }

/* ---------- search + checkout pages */
.heva-page { width: var(--hc-page, min(1440px, 92vw)); margin: 0 auto; padding: clamp(40px, 7vw, 96px) 0 clamp(60px, 9vw, 120px); }
.heva-eyebrow { color: var(--hc-crimson-bright, #b1262b); font-size: 10px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 13px; }
.heva-page h1 { font-size: clamp(42px, 7vw, 88px); font-weight: 760; line-height: .92; letter-spacing: -.055em; margin: 0 0 clamp(24px, 4vw, 42px); }
.heva-searchbar { display: flex; gap: 10px; max-width: 640px; margin-bottom: 40px; }
.heva-searchbar input { flex: 1; min-width: 0; height: 52px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--hc-line-strong, rgba(246,243,238,.24)); background: var(--hc-panel, #0b0b0d); color: inherit; font: inherit; }
.heva-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 44vw), 1fr)); gap: clamp(12px, 2vw, 24px); }
.heva-result { display: grid; gap: 6px; color: inherit; text-decoration: none; font-size: 14px; }
.heva-result img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--hc-radius-md, 18px); background: #111; }
.heva-result span:last-child { color: var(--hc-muted, #aaa49c); }
.heva-noresults { color: var(--hc-muted, #aaa49c); }

@media (prefers-reduced-motion: reduce) {
  .heva-pre { opacity: 1 !important; transform: none !important; }
  .heva-drawer__panel, .heva-drawer__scrim { transition: none; }
  @view-transition { navigation: none; }
}

/* ---------- self-hosted: no customer accounts or currency switcher */
.account-popover, .account-drawer, header-actions .account-button,
.header-actions localization-form-component, .header-actions dropdown-localization-component,
.header__column localization-form-component, .header__column dropdown-localization-component,
.menu-drawer__localization, .drawer-localization, .menu-drawer__account { display: none !important; }

/* ---------- coming soon collections */
.heva-soon { display: grid; justify-items: center; gap: 14px; text-align: center; padding-block: clamp(32px, 6vw, 72px); }
.heva-soon .heva-eyebrow { margin: 0; }
.heva-soon p:not(.heva-eyebrow) { color: var(--hc-muted, #aaa49c); max-width: 42ch; margin: 0 0 8px; }

/* ---------- search suggestions inside the theme's search modal */
.predictive-search-results, .predictive-search__results { display: none !important; }
.heva-suggest { display: grid; gap: 2px; padding: 8px 0; }
.heva-suggest__item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 8px 12px; border-radius: 12px; color: inherit; text-decoration: none; }
.heva-suggest__item:hover, .heva-suggest__item:focus-visible { background: rgba(246,243,238,.06); }
.heva-suggest__item img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.heva-suggest__item span:last-child { color: var(--hc-muted, #aaa49c); font-size: 14px; }
.heva-suggest__all { padding: 12px; color: var(--hc-ivory, #f6f3ee); font-size: 13px; letter-spacing: .06em; }

/* ---------- checkout + policy prose */
.heva-co__h { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 14px; }
.heva-co__lede { color: var(--hc-muted, #aaa49c); max-width: 52ch; line-height: 1.6; }
.heva-co__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }
.heva-co__actions .button { flex: 1 1 200px; justify-content: center; }
.heva-co__order, .heva-co__online { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--hc-line, rgba(246,243,238,.14)); border-radius: var(--hc-radius-md, 18px); background: var(--hc-panel, #0b0b0d); }
.heva-co__online { margin-bottom: 16px; }
.heva-line--static { grid-template-columns: 64px 1fr; }
.heva-line--static .heva-line__img img { width: 64px; height: 64px; }
.heva-prose { max-width: 70ch; line-height: 1.7; color: rgba(246,243,238,.86); }
.heva-prose h2 { font-size: 20px; margin: 36px 0 10px; color: var(--hc-ivory, #f6f3ee); letter-spacing: -.01em; }
.heva-prose a { color: var(--hc-ivory, #f6f3ee); }

/* ---------- buttons: the hero's pill style (hc-btn), reused everywhere Heva adds a button */
.heva-btn, .heva-restock, .heva-soon .button, .heva-empty .button, .heva-checkout, .heva-co__actions .button, .heva-searchbar .button {
  min-height: 54px; padding: 0 26px; border-radius: 999px !important; display: inline-flex; align-items: center; justify-content: center;
  gap: 14px; text-decoration: none; font-size: 13px !important; font-weight: 700 !important; letter-spacing: .08em !important;
  text-transform: uppercase; background: #ff3b30; color: #fff !important; border: 1px solid #ff3b30 !important;
  transition: transform .25s ease, background .25s ease, border-color .25s ease; box-shadow: none !important; }
.heva-btn:hover, .heva-restock:hover, .heva-soon .button:hover, .heva-empty .button:hover, .heva-checkout:hover, .heva-co__actions .button:hover, .heva-searchbar .button:hover {
  transform: translateY(-3px); background: #ff554c !important; border-color: #ff554c !important; }
.heva-co__actions .button-secondary { background: transparent !important; border: 1px solid rgba(255,255,255,.25) !important; }
.heva-co__actions .button-secondary:hover { background: transparent !important; border-color: #ff3b30 !important; }
.heva-checkout { background: #ff3b30 !important; }

/* ---------- collection header: one title, aligned to the page gutter (the original doubled it on phones) */
#MainContent[data-template=collection] .facets-block-wrapper--drawer::before { content: none !important; display: none !important; }
@media (max-width: 749px) {
  #MainContent[data-template=collection] .facets-block-wrapper::before { padding-inline: calc((100vw - var(--hc-page)) / 2); }
}

/* ---------- collection toolbar: Shopify's server-side filters and sort don't exist here
   (every piece is the same price and in stock), so keep only the item count */
#MainContent[data-template=collection] .facets__filters-wrapper,
#MainContent[data-template=collection] .sorting-filter__container,
#MainContent[data-template=collection] sorting-filter-component,
#MainContent[data-template=collection] .facets-toggle,
#MainContent[data-template=collection] .facets-block-wrapper--drawer { display: none !important; }
#MainContent[data-template=collection] .facets { justify-content: flex-end; }

/* ---------- sold out: one full-width "text me" pill instead of a dead buy button */
.heva-restock { background: #ff3b30 !important; color: #fff !important; display: flex; width: 100%; justify-content: center; align-items: center; text-decoration: none; margin-top: 4px; }
