:root,
.wa-dark {
  --wa-border-radius-scale: 2.4;
  --wa-border-width-scale: 0.72;
  --wa-form-control-border-radius: var(--wa-border-radius-pill);
  --wa-form-control-border-width: 1px;
  --wa-panel-border-radius: 1.85rem;
  --ib-wash: rgba(28, 18, 40, 0.62);
  --ib-surface: rgba(32, 22, 46, 0.80);
  --ib-card: rgba(32, 22, 46, 0.60);
  --ib-ink: #f4eef8;
  --ib-muted: #c9b3d8;
  --ib-accent: #c9a0e8;
  --ib-gold: #e2c17a;
  --ib-line: rgba(201, 160, 232, 0.20);
  --ib-line-strong: rgba(201, 160, 232, 0.36);
  --ib-shadow: 0 16px 40px rgba(8, 0, 18, 0.36);
  --ib-video-fallback: #3a2428;
  --ib-header-0: rgba(238, 208, 200, 0.72);
  --ib-header-1: rgba(226, 183, 173, 0.62);
  --ib-header-2: rgba(203, 160, 150, 0.50);
  --ib-header-3: rgba(176, 121, 113, 0.34);
  --ib-header-4: rgba(154, 99, 92, 0.16);
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ib-ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  background: var(--ib-video-fallback);
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

#site-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  background: var(--ib-video-fallback);
  filter: brightness(0.68) saturate(0.92);
}

#app-root {
  position: relative;
  z-index: 1;
}

.masthead {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  position: relative;
  isolation: isolate;
  min-height: clamp(5.6rem, 16vw, 11rem);
  padding: 0;
  background: transparent;
}

.masthead-band {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 22rem 140% at 8rem 32%, var(--ib-header-0), transparent 70%),
    linear-gradient(
      90deg,
      var(--ib-header-0) 0,
      var(--ib-header-1) 10rem,
      var(--ib-header-2) 20rem,
      var(--ib-header-3) 30rem,
      var(--ib-header-4) calc(100% - 12rem),
      rgba(154, 99, 92, 0.06) calc(100% - 5rem),
      transparent 100%
    );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-mark {
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  min-width: 0;
  display: block;
  text-decoration: none;
  color: inherit;
  max-width: min(420px, calc(100% - 38rem));
}

.header-mark {
  display: block;
  height: clamp(5.6rem, 16vw, 11rem);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  -webkit-mask-image: linear-gradient(to right, #000 84%, transparent 100%);
  mask-image: linear-gradient(to right, #000 84%, transparent 100%);
}

.brand-mark h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.masthead-actions {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  margin-left: 0.4rem;
  padding: 0.7rem 1.4rem 0.7rem 0.4rem;
  justify-content: flex-end;
}

.site-nav-desktop {
  display: none;
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.7rem 0.2rem;
}

.nav-menu {
  display: block;
  flex: 0 0 auto;
}

.nav-trigger {
  max-width: 100%;
}

.nav-trigger::part(base),
.nav-trigger::part(button),
.site-menu-trigger::part(base),
.site-menu-trigger::part(button) {
  background: linear-gradient(180deg, #f0c98a 0%, #c98446 52%, #8d3f2e 100%);
  color: #fffaf4;
  border: 1px solid rgba(255, 244, 228, 0.85);
  box-shadow:
    0 0 0 1px rgba(80, 28, 18, 0.28),
    0 12px 28px rgba(70, 18, 14, 0.48);
  outline: none;
  opacity: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-menu {
  display: block;
  flex: 0 0 auto;
}

.site-menu:not(:defined),
.nav-menu:not(:defined) {
  overflow: hidden;
  max-height: 3rem;
}

.site-menu:not(:defined) {
  max-width: 3.2rem;
}

.site-menu:not(:defined) wa-dropdown-item,
.site-menu:not([open]) wa-dropdown-item,
.nav-menu:not(:defined) wa-dropdown-item,
.nav-menu:not([open]) wa-dropdown-item,
wa-dropdown-item:not(:defined) {
  display: none !important;
}

.site-menu-trigger {
  min-width: 2.6rem;
}

.site-menu-trigger wa-icon {
  font-size: 1.15rem;
}

.nav-menu wa-dropdown-item.is-active,
.site-menu wa-dropdown-item.is-active {
  font-weight: 700;
}

.cart-total {
  min-width: 0;
  opacity: 1;
  filter: none;
}

.cart-total::part(base),
.cart-total::part(button) {
  background: linear-gradient(180deg, #cbb6f4 0%, #8a5cc8 52%, #4e2d86 100%);
  color: #faf6ff;
  border: 1px solid rgba(244, 232, 255, 0.85);
  box-shadow:
    0 0 0 1px rgba(48, 20, 80, 0.28),
    0 12px 28px rgba(40, 12, 70, 0.48);
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 1;
}

.cart-total.has-count::part(base),
.cart-total.has-count::part(button) {
  padding-inline-end: 0;
}

.cart-total::part(end) {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
}

.cart-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  padding-inline: 0.85rem;
  margin: 0;
  border: 0;
  border-inline-start: 1px solid rgba(250, 246, 255, 0.55);
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.storefront {
  padding: 1.15rem 6vw 4rem;
}

.category,
.option {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}

.option.is-active {
  transform: translateY(-4px);
  box-shadow: var(--ib-shadow);
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }
.card:nth-child(6) { animation-delay: 0.25s; }

.card.is-selected .product {
  transform: translateY(-6px);
  border-color: var(--ib-line-strong);
  box-shadow:
    0 0 0 1px var(--ib-line),
    0 18px 40px rgba(125, 79, 179, 0.14);
}

.product {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--ib-line);
  border-radius: 1.85rem;
  background: var(--ib-card);
  backdrop-filter: blur(3px);
  box-shadow: var(--ib-shadow);
  cursor: pointer;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease,
    border-color 0.45s ease;
}

.product:hover {
  transform: translateY(-5px);
  border-color: var(--ib-line-strong);
}

.photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: rgba(232, 220, 242, 0.70);
  opacity: 0.7;
}

.details {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.05rem 1.15rem 1.25rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ib-gold);
}

.product h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.description {
  margin: 0;
  color: var(--ib-muted);
  font-size: 0.92rem;
}

.price {
  margin: 0.3rem 0 0;
  font-weight: 700;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: auto;
}

.source-link {
  color: var(--ib-accent);
  font-weight: 600;
}

.veil {
  position: fixed;
  inset: 0;
  background: rgba(24, 10, 36, 0.34);
  z-index: 8;
}

.panel {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  width: min(28rem, calc(100% - 1.5rem));
  z-index: 9;
  overflow: auto;
  padding: 1.25rem 1.35rem 2rem;
  background: var(--ib-surface);
  border: 1px solid var(--ib-line);
  border-radius: 1.85rem;
  box-shadow: var(--ib-shadow);
  backdrop-filter: blur(16px);
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.lines {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.cart-line,
.quantity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.cart-line {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ib-line);
}

.options {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
}

.option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  height: auto;
  white-space: normal;
}

.option span {
  font-weight: 400;
  opacity: 0.8;
  font-size: 0.85rem;
}

.pay,
.panel-total {
  width: 100%;
}

.loading,
.empty,
.notice,
.site-footer {
  text-align: center;
}

.loading {
  padding: 4rem 0;
}

.site-footer {
  padding: 1rem 6vw 2.5rem;
  color: var(--ib-muted);
}

wa-button::part(button),
wa-button::part(base) {
  border-radius: var(--wa-border-radius-pill);
  border-width: 1px;
}

wa-input::part(input),
wa-input::part(base) {
  border-radius: var(--wa-border-radius-pill);
  border-width: 1px;
}

wa-callout {
  border-radius: 1.4rem;
}

wa-badge::part(base) {
  border-radius: var(--wa-border-radius-pill);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 901px) {
  .site-nav-desktop {
    display: flex;
  }

  .site-menu {
    display: none;
  }
}

@media (max-width: 900px) {
  .masthead {
    flex-wrap: nowrap;
    align-items: center;
  }

  .brand-mark {
    flex: 1 1 auto;
    max-width: none;
  }

  .header-mark {
    width: auto;
    height: 4.8rem;
    max-width: 100%;
    max-height: none;
  }

  .masthead-actions {
    flex: 0 0 auto;
    width: auto;
    box-sizing: border-box;
    justify-content: flex-end;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    margin-left: auto;
  }

  .cart-total {
    min-width: 0;
    flex: 0 0 auto;
  }

  .storefront,
  .site-footer {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .panel {
    top: auto;
    right: 0.6rem;
    left: 0.6rem;
    bottom: 0.6rem;
    width: auto;
    max-height: 86vh;
  }
}

@media (max-width: 420px) {
  .cart-total::part(base),
  .cart-total::part(button) {
    padding-inline: 0.55rem;
    gap: 0.3rem;
  }

  .cart-total.has-count::part(base),
  .cart-total.has-count::part(button) {
    padding-inline-end: 0;
  }

  .cart-count {
    padding-inline: 0.65rem;
  }
}
