/* daju template only. Old shop palette: cream page, orange brand. */
html.daju-theme .vault-scope,
html.daju-theme body.vault-tokens {
  --bg: #fbf6e9;
  --bg-warm: #fff6e8;
  --surface: #ffffff;
  --surface-2: #fff6e8;
  --ink: #2a2118;
  --ink-2: #6d5648;
  --ink-3: #a0806c;
  --border: #f4ddc0;
  --border-strong: #e7c7a4;
  --red: #e85d1a;
  --red-strong: #c44a0e;
  --red-soft: #ffe4d0;
  --gold: #e0a317;
  --gold-strong: #b48410;
  --gold-soft: #fff3d1;
  --plum: #e85d1a;
  --plum-soft: #ffe4d0;
  --on-red: #ffffff;
  --on-gold: #2a2118;
  --ring: 0 0 0 4px rgba(232, 93, 26, 0.22);
  --shadow-sm: 0 2px 8px -3px rgba(232, 93, 26, 0.16);
  --shadow: 0 14px 30px -18px rgba(232, 93, 26, 0.28);
  --shadow-lg: 0 26px 50px -24px rgba(232, 93, 26, 0.3);
}

html.dark.daju-theme .vault-scope,
html.dark.daju-theme body.vault-tokens {
  --bg: #1c120c;
  --bg-warm: #26180f;
  --surface: #2b1c13;
  --surface-2: #3a261a;
  --ink: #fff6ee;
  --ink-2: #e4cbb8;
  --ink-3: #b08974;
  --border: #4a3224;
  --border-strong: #6b4632;
  --red: #ff8e48;
  --red-strong: #ffb07a;
  --red-soft: #4a2a18;
  --gold: #f0b429;
  --gold-strong: #ffd27a;
  --gold-soft: #3a2c12;
  --plum: #ff8e48;
  --plum-soft: #4a2a18;
  --on-red: #2a2118;
  --on-gold: #2a2118;
  --ring: 0 0 0 4px rgba(255, 142, 72, 0.32);
  --shadow-sm: 0 2px 8px -3px rgba(0, 0, 0, 0.45);
  --shadow: 0 16px 32px -18px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 28px 54px -22px rgba(0, 0, 0, 0.62);
}

html.daju-theme .bg-\[linear-gradient\(135deg\,\#7b74f2\,var\(--red\)\)\] {
  background-image: linear-gradient(135deg, #ff8e48, var(--red));
}

html.daju-theme .bg-\[linear-gradient\(135deg\,\#9b6cf5\,var\(--plum\)\)\] {
  background-image: linear-gradient(135deg, #ff8e48, var(--plum));
}

/* Legal pages sit inside the shop: keep the current header, drop the extra page chrome. */
html:has(.daju-legal-doc) main > div {
  max-width: 1120px;
  padding-top: 8px;
}

html:has(.daju-legal-doc) main > div > * > h1 {
  display: none !important;
}

html:has(.daju-legal-doc) main > div > * {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

html .daju-legal-doc {
  background: transparent;
}

html .daju-legal-doc .hero {
  padding-top: 8px;
}

html.dark .daju-legal-doc {
  --ink: #fff6ee;
  --muted: #e4cbb8;
  --line: #4a3224;
  --page: transparent;
  --card: #2b1c13;
  color: var(--ink);
}

/* Keep the first paint on the daju cream page instead of the classic white shell. */
html.daju-theme,
html.daju-theme body {
  background: #fbf6e9;
}

html.daju-theme #app:not(:has(.vault-scope)) {
  visibility: hidden;
}

html.daju-theme .theme-overlay {
  background: rgba(251, 246, 233, 0.94) !important;
  color: #2a2118;
}

html.dark.daju-theme,
html.dark.daju-theme body,
html.dark.daju-theme .theme-overlay {
  background: #1c120c !important;
  color: #fff6ee;
}

header nav a .daju-nav-icon,
footer a .daju-nav-icon {
  flex: none;
}

.daju-auth-shell {
  width: min(1080px, calc(100% - 16px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 460px);
  gap: 28px;
  align-items: center;
}

.daju-auth-visual {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #fff4e6;
}

.daju-auth-visual img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .daju-auth-shell {
    width: min(460px, 100%);
    grid-template-columns: 1fr;
  }
}

html.daju-tutorial-page main.flex-1 > :not(#daju-tutorial-root) {
  display: none !important;
}

html.daju-tutorial-page .tg-crumb {
  display: none !important;
}

#daju-tutorial-root {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.daju-tutorial-status {
  margin: 48px auto;
  max-width: 640px;
  padding: 0 20px;
  color: #8a7560;
  font-size: 15px;
}

html.daju-theme [class*="md:min-h-[300px]"] {
  min-height: 188px !important;
}

@media (max-width: 639px) {
  html.daju-theme [class*="min-h-[180px]"] {
    min-height: 128px !important;
  }
}

html.daju-theme a[class*="min-h-[116px]"] {
  min-height: 76px !important;
  padding: 12px 14px !important;
  gap: 8px !important;
}

html.daju-theme .py-9 {
  padding-top: 1.15rem !important;
  padding-bottom: 1.15rem !important;
}

html.daju-theme .text-\[28px\].font-extrabold {
  font-size: 22px !important;
}

html.daju-theme .h-\[280px\].rounded-lg.bg-card {
  height: 160px !important;
}

@media (max-width: 759px) {
  html.daju-theme [class*="minmax(228px,1fr)"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  html.daju-theme .mt-auto.flex.items-end.justify-between {
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 6px;
  }

  html.daju-theme .mt-auto .flex.min-w-0.flex-col {
    min-width: 0;
  }

  html.daju-theme .mt-auto .flex.flex-wrap.items-baseline {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0;
  }

  html.daju-theme .mt-auto .text-xl.font-extrabold.tabular-nums,
  html.daju-theme .mt-auto .font-extrabold.tabular-nums.text-primary,
  html.daju-theme .mt-auto .text-sm.font-semibold.line-through {
    white-space: nowrap;
  }

  html.daju-theme .mt-auto .text-xl.font-extrabold.tabular-nums,
  html.daju-theme .mt-auto .font-extrabold.tabular-nums.text-primary {
    font-size: 13px !important;
    line-height: 1.25;
  }

  @media (max-width: 370px) {
    html.daju-theme .mt-auto .text-xl.font-extrabold.tabular-nums,
    html.daju-theme .mt-auto .font-extrabold.tabular-nums.text-primary {
      font-size: 12px !important;
    }
  }

  html.daju-theme .mt-auto .text-sm.font-semibold.line-through {
    font-size: 11px !important;
    line-height: 1.2;
  }

  html.daju-theme .mt-auto.flex.items-end.justify-between > button.rounded-full,
  html.daju-theme .mt-auto.flex.items-end.justify-between > span.rounded-full {
    flex: none;
    margin-left: auto;
    padding: 4px 6px !important;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }

  html.daju-theme body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }
}

html.daju-theme .daju-usd {
  display: block;
  margin-top: 1px;
  color: var(--ink-2, #8a7560);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

html.daju-theme .daju-mobile-nav {
  display: none;
}

@media (max-width: 900px) {
  html.daju-theme header a[href="/cart"],
  html.daju-theme header a[href="/guest/orders"] {
    display: none !important;
  }

  html.daju-theme header .relative.max-\[900px\]\:hidden {
    display: block !important;
  }

  html.daju-theme header .relative.hidden.max-\[900px\]\:block {
    display: none !important;
  }

  html.daju-theme .daju-mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    box-sizing: border-box;
    height: calc(58px + env(safe-area-inset-bottom));
    padding: 4px 6px env(safe-area-inset-bottom);
    border-top: 1px solid var(--border, #ead9c4);
    background: var(--surface, #fffaf3);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
  }

  html.daju-theme .daju-mobile-nav a {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 44px;
    width: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--ink-2, #8a7560);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
  }

  html.daju-theme .daju-mobile-nav a.is-active {
    color: #e85d1a;
    font-weight: 800;
  }

  html.daju-theme .daju-mobile-nav svg {
    width: 22px;
    height: 22px;
  }

  html.daju-theme .daju-cart-count {
    position: absolute;
    top: 0;
    left: calc(50% + 4px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #e85d1a;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
  }
}

html.daju-theme .daju-spec-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

html.daju-theme .daju-spec-label {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #9a6233;
}

html.daju-theme .daju-spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 1100px) {
  html.daju-theme [class*="minmax(228px,1fr)"] {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  html.daju-theme [class*="248px_1fr"] [class*="minmax(228px,1fr)"] {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html.daju-theme.daju-cols-5 [class*="minmax(228px,1fr)"] {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  html.daju-theme.daju-cols-5 [class*="248px_1fr"] [class*="minmax(228px,1fr)"] {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 760px) and (max-width: 1099px) {
  html.daju-theme [class*="minmax(228px,1fr)"] {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html.daju-theme [class*="248px_1fr"] [class*="minmax(228px,1fr)"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"]) {
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  box-shadow: 0 8px 18px rgba(232, 93, 26, 0.22);
}

html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"])::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  pointer-events: none;
}

html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"]):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(232, 93, 26, 0.32);
}

html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"]):hover::after {
  animation: daju-btn-shine 0.6s ease forwards;
}

html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"]):active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 3px 8px rgba(196, 74, 14, 0.28);
  background-color: #c44a0e !important;
}

html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"]):disabled,
html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"]):disabled:hover,
html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"]):disabled:active {
  transform: none;
  box-shadow: none;
  background-color: inherit;
}

html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"]):disabled::after {
  display: none;
}

@keyframes daju-btn-shine {
  to { left: 160%; }
}

@media (prefers-reduced-motion: reduce) {
  html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"]),
  html.daju-theme main button.rounded-full.font-bold.bg-primary:not([class*="border"])::after {
    transition: none;
    animation: none;
  }
}
