/* ============================================================================
   Ditto interaction layer — Aged & Charred clone
   Reproduces the live Dawn theme's interactive states against the captured DOM.
   RULE: every selector here is gated on [open], :hover, or a .ditto-* class that
   only cloned-interactions.js applies — the page at rest renders pixel-identical
   to the static clone.
   ========================================================================== */

/* ---- 1. Desktop header dropdown (details-disclosure) ---------------------- */
@keyframes dittoMenuOpen {
  0%   { opacity: 0; transform: translateY(-15px); }
  100% { opacity: 1; transform: translateY(0); }
}
header details[id^="Details-HeaderMenu"][open] > ul[id^="HeaderMenu-MenuList"] {
  opacity: 1 !important;
  z-index: 10 !important;
  top: 100% !important;   /* live opens the panel below the nav item, not over it */
  transform: translateY(0) !important;
  animation: dittoMenuOpen 0.2s ease;
}
/* caret flips up while open (Dawn rotates the summary icon) */
header details[id^="Details-HeaderMenu"][open] > summary svg {
  transform: rotate(180deg);
}
header details[id^="Details-HeaderMenu"] > summary svg {
  transition: transform 0.15s ease;
}

/* ---- 2. Search modal (reconstructed full-width bar, matches live open state) */
/* Live open state: full-width black bar over the header (~152px tall), centered
   bordered input with magnifier inside on the right, close X to the right; page dimmed. */
.ditto-search-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 9.5rem;
  z-index: 30;
  background: rgb(0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 3rem;
}
.ditto-search-form { position: relative; width: min(48rem, calc(100vw - 12rem)); }
.ditto-search-inputwrap { position: relative; display: flex; align-items: center; }
.ditto-search-bar input[type="search"] {
  width: 100%;
  height: 2.75rem;
  padding: 0.75rem 3rem 0.75rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgb(0, 0, 0);
  color: rgb(255, 255, 255);
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.ditto-search-bar input[type="search"]::placeholder { color: rgba(187, 187, 187, 0.75); }
.ditto-search-bar input[type="search"]:focus { outline: none; }
.ditto-search-go {
  position: absolute;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: rgb(255, 255, 255); cursor: pointer;
}
.ditto-search-close {
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: rgb(255, 255, 255); cursor: pointer;
}
.ditto-search-go svg, .ditto-search-close svg { width: 1.1rem; height: 1.1rem; }

/* page-dim overlay while search is open */
.ditto-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(120, 120, 120, 0.55);
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* local predictive results panel (labeled — live uses Shopify's API) */
.ditto-search-results {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  width: 100%;
  max-height: 22rem;
  overflow: auto;
  z-index: 31;
  background: rgb(18, 18, 18);
  border: 1px solid rgba(187, 187, 187, 0.2);
}
.ditto-search-results a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  color: rgb(255, 255, 255);
  text-decoration: none;
  font-size: 0.9375rem;
}
.ditto-search-results a:hover { background: rgb(34, 34, 34); }
.ditto-search-results img { width: 2.5rem; height: 2.5rem; object-fit: cover; }
.ditto-search-results .ditto-search-note {
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  color: rgba(187, 187, 187, 0.75);
}

/* ---- 3. Sticky header (on-scroll-up, Dawn sticky-header) ------------------ */
.ditto-sticky-header {
  position: sticky;
  top: 0;
  z-index: 20;
  transition: transform 0.15s ease;
}
.ditto-header-hidden { transform: translateY(-105%); }

/* ---- 4. Product-card hover image swap ------------------------------------- */
/* Same curve/duration as live: opacity 0.4s cubic-bezier(0.25,0.46,0.45,0.94) */
.ditto-hover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}
li:hover > div .ditto-hover-img,
a:hover .ditto-hover-img {
  opacity: 1;
}

/* ---- 5. Cart count bubble + add feedback ---------------------------------- */
.ditto-cart-bubble {
  position: absolute;
  bottom: 0.45rem;
  right: -0.4rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.2rem;
  border-radius: 50%;
  background: rgb(255, 181, 72);
  color: rgb(18, 18, 18);
  font-size: 0.6875rem;
  line-height: 1.05rem;
  text-align: center;
  font-weight: 600;
}
.ditto-added-note {
  display: inline-block;
  margin-left: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ditto-added-note.ditto-show { opacity: 1; }

/* ---- 6. Mobile menu drawer (reconstructed — panel wasn't captured) -------- */
#Details-menu-drawer-container[open] .ditto-menu-drawer { transform: translateX(0); visibility: visible; }
.ditto-menu-drawer {
  position: fixed;
  top: var(--ditto-header-bottom, 151px);
  left: 0;
  bottom: 0;
  width: min(25rem, calc(100vw - 3rem));
  z-index: 30;
  background: rgb(18, 18, 18);
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.29, 0.63, 0.44, 1), visibility 0.25s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  border-top: 1px solid rgba(187, 187, 187, 0.15);
}
.ditto-menu-drawer nav { padding: 1.25rem 0; }
.ditto-menu-drawer a, .ditto-menu-drawer summary {
  display: block;
  padding: 0.7rem 2rem;
  color: rgba(255, 255, 255, 0.87);
  font-size: 1.125rem;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}
.ditto-menu-drawer summary::-webkit-details-marker { display: none; }
.ditto-menu-drawer a:hover, .ditto-menu-drawer summary:hover { color: rgb(255, 181, 72); }
.ditto-menu-drawer details ul { padding: 0; margin: 0; list-style: none; }
.ditto-menu-drawer details ul a { padding-left: 3rem; font-size: 1rem; }
.ditto-menu-drawer .ditto-drawer-utils {
  padding: 1.25rem 2rem 2rem;
  border-top: 1px solid rgba(187, 187, 187, 0.15);
}
.ditto-menu-drawer .ditto-drawer-utils a {
  display: inline-flex;
  padding: 0.5rem 0.75rem 0 0;
}
.ditto-menu-drawer .ditto-drawer-utils svg { width: 1.1rem; height: 1.1rem; }
/* hamburger → X swap while open (both svgs exist in the captured summary) */
#Details-menu-drawer-container[open] summary svg:first-of-type { opacity: 0; }
#Details-menu-drawer-container[open] summary svg:last-of-type { opacity: 1 !important; }

/* ---- 7. Cart page items (localStorage simulation, reconstructed) ---------- */
.ditto-cart-header { max-width: 60rem; margin: 0 auto; padding: 2.5rem 3rem 0; }
.ditto-cart-header .ditto-cart-logo { color: rgba(187,187,187,0.85); text-decoration: none; font-size: 0.875rem; }
.ditto-cart-header .ditto-cart-logo:hover { color: rgb(255,181,72); }
.ditto-cart-header h1 { color: #fff; font-size: 2rem; margin: 0.75rem 0 0; }
.ditto-cart-items { max-width: 60rem; margin: 0 auto; padding: 1rem 3rem 3rem; color: rgb(255,255,255); }
.ditto-cart-items table { width: 100%; border-collapse: collapse; }
.ditto-cart-items th {
  text-align: left; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(187,187,187,0.75); font-weight: 400; padding: 0.6rem 0.5rem; border-bottom: 1px solid rgba(187,187,187,0.2);
}
.ditto-cart-items td { padding: 1rem 0.5rem; border-bottom: 1px solid rgba(187,187,187,0.12); vertical-align: middle; }
.ditto-cart-items img { width: 4.5rem; height: 4.5rem; object-fit: cover; }
.ditto-cart-items .ditto-line-title { color: rgb(255,255,255); text-decoration: none; }
.ditto-cart-items .ditto-qty { display: inline-flex; align-items: center; border: 1px solid rgba(187,187,187,0.35); }
.ditto-cart-items .ditto-qty button { width: 2rem; height: 2.25rem; background: none; border: none; color: #fff; cursor: pointer; font-size: 1rem; }
.ditto-cart-items .ditto-qty span { min-width: 2rem; text-align: center; }
.ditto-cart-items .ditto-remove { background: none; border: none; color: rgba(187,187,187,0.75); cursor: pointer; text-decoration: underline; font-size: 0.8125rem; }
.ditto-cart-items .ditto-cart-note {
  margin-top: 1rem; font-size: 0.75rem; color: rgba(187,187,187,0.6);
}
.ditto-cart-total { text-align: right; margin-top: 1.25rem; font-size: 1.125rem; }
