/* Shared UI, loaded after Tailwind. */
:root { --ds-green: #00856f; --ds-ink: #123d36; --ds-mint: #eaf7f0; }
[x-cloak] { display: none !important; }
.ds-header-shell { display: contents; }
.ds-site-header { box-shadow: 0 4px 24px rgb(18 61 54 / 4%); }
.ds-header-desktop { min-height: 82px; }
.ds-header-mobile { height: 68px; }
.ds-desktop-nav { min-height: 48px; }
.ds-brand { display: inline-flex; align-items: center; flex-shrink: 0; max-width: 100%; width: 200px; border-radius: 12px; overflow: hidden; vertical-align: middle; }
.ds-brand--xs { width: 120px; }
.ds-brand--sm { width: 172px; }
.ds-brand--md { width: 200px; }
.ds-brand--lg { width: 230px; }
.ds-brand--xl { width: 290px; }
.ds-brand--2xl { width: 360px; }
.ds-brand--footer { width: 300px; }
.ds-brand--icon { width: 48px; }
.ds-brand-image { display: block; width: 100%; height: auto; object-fit: contain; }
.ds-icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; height: 44px; width: 44px; border-radius: 12px; color: var(--ds-ink); cursor: pointer; transition: background-color 180ms ease, transform 180ms ease; }
.ds-icon-button:hover { background: var(--ds-mint); }
.ds-account-button { background: var(--ds-mint); color: var(--ds-green); }
.ds-desktop-link { position: relative; padding: 13px 15px; font-size: 13px; font-weight: 600; color: var(--color-text-muted); transition: color 180ms ease; }
.ds-desktop-link::after { content: ''; position: absolute; bottom: 0; left: 15px; right: 15px; height: 3px; border-radius: 3px 3px 0 0; background: var(--ds-green); transform: scaleX(0); transition: transform 200ms ease; }
.ds-desktop-link:hover, .ds-desktop-link.is-active { color: var(--ds-green); }
.ds-desktop-link:hover::after, .ds-desktop-link.is-active::after { transform: scaleX(1); }
.ds-search-submit { position: absolute; right: 6px; top: 6px; bottom: 6px; padding: 0 14px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--ds-mint); color: var(--ds-green); cursor: pointer; }
.ds-search-icon { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--ds-mint); color: var(--ds-green); cursor: pointer; }
.ds-drawer-layer { position: fixed; inset: 0; z-index: 80; }
.ds-drawer-backdrop { position: absolute; inset: 0; background: rgb(8 30 27 / 48%); backdrop-filter: blur(3px); }
.ds-drawer-panel { position: absolute; inset: 0 auto 0 0; display: flex; flex-direction: column; width: min(360px, calc(100vw - 36px)); height: 100%; height: 100dvh; background: #fff; box-shadow: 20px 0 70px rgb(8 30 27 / 18%); border-radius: 0 22px 22px 0; overflow: hidden; }
.ds-drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(16px, env(safe-area-inset-top)) 16px 16px; border-bottom: 1px solid var(--color-border); flex-shrink: 0; }
.ds-drawer-heading .ds-brand { width: min(200px, 65%); flex-shrink: 1; }
.ds-drawer-body { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 18px; }
.ds-eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 12px; }
.ds-drawer-link { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 48px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--color-text); transition: background-color 180ms ease, color 180ms ease; }
.ds-drawer-link:hover, .ds-drawer-link.is-active { background: var(--ds-mint); color: var(--ds-green); }
.ds-drawer-link.is-active { box-shadow: inset 3px 0 var(--ds-green); }
.ds-drawer-help { border-top: 1px solid var(--color-border); margin-top: 22px; padding-top: 20px; }
.ds-drawer-footer { flex-shrink: 0; padding: 16px 18px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--color-border); background: #f7fbf9; }
.ds-drawer-dark { background: var(--color-brand-dark); color: #cbd5e1; }
.ds-drawer-dark .ds-drawer-footer { background: transparent; }
.ds-dashboard-sidebar { position: sticky; top: 0; height: 100dvh; }
.ds-dashboard-topbar { position: sticky; top: 0; z-index: 30; min-height: 68px; height: auto; padding-block: 12px; }
.ds-dashboard-topbar h1 { overflow-wrap: anywhere; line-height: 1.35; }
.ds-dashboard-main { min-width: 0; }
.ds-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border-radius: inherit; }
.ds-table-scroll table { min-width: 580px; }
.ds-table-scroll:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
main :is(h1, h2, h3, p, dd) { overflow-wrap: anywhere; }
main .grid > * { min-width: 0; }
main .flex > div:not(.shrink-0) { min-width: 0; }
main :is(input, select, textarea) { max-width: 100%; }
main :is(.flex):has(> h1, > h2, > h3) { flex-wrap: wrap; gap: 12px; }
main .ipm-card { border-radius: 18px; }
main .ipm-card > .flex:has(> div > h1, > div > h2) { flex-wrap: wrap; gap: 12px; }
.ds-hero { background: linear-gradient(125deg, #f0faf4, #fff 60%, #f4fbf9); }
.ds-hero-heading { font-size: clamp(2rem, 3.8vw, 3.25rem); line-height: 1.12; }
.ds-hero-visual { padding: 8px 12px 36px; }
.ds-hero-media { height: clamp(220px, 30vw, 380px); }
.ds-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ds-hero-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d8ebe1; background: #fff; padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--ds-ink); }
.ds-hero-badge svg { width: 14px; height: 14px; color: var(--ds-green); }
.ds-reveal-pending { opacity: 0; transform: translateY(18px); }
.ds-visible { transition: opacity 520ms ease var(--ds-reveal-delay, 0ms), transform 520ms cubic-bezier(.2,.7,.2,1) var(--ds-reveal-delay, 0ms), box-shadow 200ms ease; }
.btn { transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.btn:active, .ds-icon-button:active { transform: scale(.97); }
.btn-primary { box-shadow: 0 3px 12px rgb(0 133 111 / 12%); }
.btn-primary:hover { box-shadow: 0 6px 18px rgb(0 133 111 / 20%); }
:where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .ipm-card-hover:hover { transform: translateY(-4px); }
}
@media (max-width: 1023px) {
    .ds-mobile-brand { width: clamp(145px, 49vw, 220px); flex-shrink: 1; }
    .ds-drawer-layer { display: block; }
    .ds-dashboard-topbar h1 { font-size: 15px; }
}
@media (max-width: 639px) {
    .ds-brand--lg, .ds-brand--xl, .ds-brand--footer { width: 240px; }
    .ipm-card:not([class*="!p-"]) { padding: 18px; }
    .toast { min-width: 0; max-width: 100%; }
    .form-input, select.form-input, textarea.form-input { font-size: 16px !important; }
    .ds-page-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
    .ds-page-toolbar > :is(.flex, form) { flex-wrap: wrap; gap: 8px; }
    .ds-hero-visual { margin-top: 4px; padding: 0 0 12px; }
    .ds-hero-floating { display: none; }
    .ds-chat-shell { height: auto; min-height: calc(100dvh - 160px); }
    .ds-chat-list { max-height: 220px; min-height: 160px; border-right: 0; border-bottom: 1px solid var(--color-border); }
    .ds-chat-active { min-height: 460px; height: calc(100dvh - 200px); }
    .ds-chat-active input { min-width: 0; }
    main .min-w-\[240px\] { min-width: 0; width: 100%; }
}
@media (max-width: 767px) and (min-width: 640px) {
    .ds-chat-shell { height: auto; }
    .ds-chat-list { max-height: 240px; border-bottom: 1px solid var(--color-border); }
    .ds-chat-active { height: 550px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
    .ds-reveal-pending { opacity: 1; transform: none; }
}

@keyframes ds-enter { from { opacity: 0; } to { opacity: 1; } }
.ds-auth-enter { animation: ds-enter 420ms ease both; }

.ds-visible { animation: ds-enter 420ms ease var(--ds-reveal-delay, 0ms) both; }
/* Custom display styles keep Tailwind's navigation breakpoints intact. */
.ds-icon-button.hidden { display: none; }
@media (min-width: 640px) { .ds-icon-button.hidden.sm\:inline-flex { display: inline-flex; } }
@media (min-width: 1024px) { .ds-icon-button.lg\:hidden { display: none; } }

/* Keep admin tab labels intact while their own strip scrolls on phones. */
.ds-admin-tabs { position: relative; max-width: 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.ds-admin-tabs > :is(a, button) { flex: 0 0 auto; min-width: max-content; white-space: nowrap; overflow-wrap: normal; min-height: 42px; }
.ds-admin-tabs > :is(a, button) > :is(svg, i, span) { flex-shrink: 0; }
.ds-admin-tabs::-webkit-scrollbar { height: 5px; }
.ds-admin-tabs::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.ds-sponsored-section { background: #fffcf4; border: 1px solid #fde6a8; border-radius: 22px; padding: 20px; }
.ds-sponsored-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ds-sponsored-label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: #92400e; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 639px) { .ds-sponsored-section { padding: 14px; } }

/* Checkout feedback keeps a real label present before JavaScript starts. */
.ds-order-submit { position:relative; overflow:hidden; color:#fff; background:#00a88f; }
.ds-order-submit::after { content:""; position:absolute; inset:-50% auto -50% -40%; width:22%; background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent); transform:skewX(-20deg); animation:ds-order-shine 4s ease-in-out infinite; pointer-events:none; }
.ds-order-cart { animation:ds-cart-roll 2.8s ease-in-out infinite; }
.ds-order-submit:disabled { opacity:.75; cursor:wait; }
@keyframes ds-order-shine { 0%,55% {left:-40%} 100% {left:140%} }
@keyframes ds-cart-roll { 0%,70%,100% {transform:translateX(0)} 80% {transform:translateX(4px)} 90% {transform:translateX(-2px)} }
.ds-notifications { position:relative; }
.ds-bell-button { position:relative; }
.ds-notification-count { position:absolute; right:0; top:0; background:#e11d48; color:white; border:2px solid white; min-width:18px; height:18px; border-radius:20px; padding:0 3px; font:700 10px/14px Inter,sans-serif; }
.ds-notification-panel { position:fixed; right:16px; top:80px; width:min(380px,calc(100vw - 32px)); max-height:calc(100dvh - 160px); overflow:auto; z-index:70; background:white; border:1px solid #e2e8f0; border-radius:16px; box-shadow:0 15px 55px #0f172a26; color:#1e293b; text-align:left; }
.ds-notification-panel[hidden], .ds-notification-count[hidden] { display:none; }
.ds-notification-panel-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px; }
.ds-notification-panel-heading button { font-size:11px; font-weight:600; color:#087f70; border:1px solid #99d9cd; border-radius:8px; padding:6px 9px; }
.ds-notification-connection { padding:0 16px 10px; font-size:11px; color:#64748b; }
.ds-notification-items { border-top:1px solid #e2e8f0; }
.ds-notification-item { display:block; width:100%; text-align:left; padding:13px 16px; border-bottom:1px solid #f1f5f9; background:white; }
.ds-notification-item.is-unread { background:#f0fdfa; }
.ds-notification-item strong { display:block; font-size:12px; }
.ds-notification-item span { display:block; color:#64748b; font-size:11px; line-height:1.5; margin-top:4px; }
.ds-notification-empty, .ds-notification-all { padding:16px; display:block; font-size:12px; }
.ds-notification-all { font-weight:700; color:#087f70; }
.ds-bell-ringing .ds-bell-icon { animation:ds-bell-ring .9s ease-in-out 2; transform-origin:50% 10%; }
.ds-live-toast { position:fixed; right:16px; bottom:calc(90px + env(safe-area-inset-bottom)); width:min(360px,calc(100vw - 32px)); z-index:65; background:#0f3440; color:white; border-radius:12px; padding:16px; box-shadow:0 8px 30px #0f172a26; font-size:12px; }
@keyframes ds-bell-ring { 0%,100% {transform:rotate(0)} 20%,60% {transform:rotate(16deg)} 40%,80% {transform:rotate(-16deg)} }
@media(prefers-reduced-motion:reduce) { .ds-order-submit::after,.ds-order-cart,.ds-bell-ringing .ds-bell-icon {animation:none!important} }
