/* Weedeliver brand layer (additive).
   Brand Lead, 2026-11-09. Ras approved going live the same day.
   Loaded after wd-doordash.css and wd-floating-cart.css.
   Keeps existing elements; unifies tokens and sharpens type,
   hero, browse, menus, deals, and blog on top of the current UI. */

/* ----- Token unification -----
   front_header.php locks primary #047857, accent #F97316, nav #C2410C.
   The homepage <style> :root had been overriding those with #10b981 / #0ea5e9. */
html {
    --brand-primary: #047857;
    --brand-primary-dark: #065F46;
    --brand-logo: #009830;
    --brand-forest: #004018;
    --brand-accent: #F97316;
    --brand-accent-hover: #EA580C;
    --brand-accent-light: rgba(249, 115, 22, 0.12);
    --nav-bg: #C2410C;
    --bg-canvas: #F4F7F5;
    --brand-primary-soft: #ECFDF5;
}

[data-theme="dark"] {
    --bg-canvas: #0F172A;
    --brand-primary-soft: rgba(4, 120, 87, 0.22);
}

body {
    background-color: var(--bg-canvas, #F4F7F5);
    color: var(--text-main, #0F172A);
    font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ----- Type hierarchy (system fonts only, no webfont) ----- */
h1, h2, .section-title, .premium-hero h1, .page-title,
.modern-menu-category .category-name, .category-name {
    font-family: var(--font-display, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
    letter-spacing: -0.025em;
    color: var(--text-main, #0F172A);
}

.section-title,
.browse-title,
.blog-page-title,
.page-title {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-header {
    margin-bottom: 1.25rem;
}

.section-subtitle,
.dispensary-meta,
.menu-item-desc,
.blog-card-excerpt,
.deal-meta {
    color: var(--text-muted, #64748B);
    line-height: 1.5;
}

/* Prices: steady and easy to scan */
.food-price, .menu-item-price, .price, .deal-price,
.cart-total, .wd-fc-total, .sub-total, .grand_total {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ----- Header logo ----- */
.logo,
.top-menu-wrapper img.logo {
    image-rendering: auto;
    object-fit: contain;
}

/* ----- Hero: keep b6.jpg fallback; light type on the dark overlay ----- */
.modern-hero h1,
.modern-hero .hero-title,
.modern-hero .search-wraps h1,
.premium-hero h1,
.banner-section h1 {
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.modern-hero h1,
.modern-hero .hero-title,
.modern-hero p,
.modern-hero .hero-sub,
.modern-hero .section-subtitle,
.modern-hero .search-wraps h1,
.modern-hero .search-wraps p {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

/* Title and subtitle live inside the white search card, not on the photo.
   The rules above (and front_header's .premium-hero .hero-title) forced
   white type and made the homepage heading unreadable. */
.premium-hero .search-wraps .hero-title,
.premium-hero .search-wraps h1,
.modern-hero .search-wraps .hero-title,
.modern-hero .search-wraps h1,
.search-wraps.single-search .hero-title,
.search-wraps.single-search h1 {
    color: var(--text-main, #0F172A) !important;
    text-shadow: none !important;
    -webkit-text-fill-color: var(--text-main, #0F172A) !important;
}
.premium-hero .search-wraps .hero-subtitle,
.premium-hero .search-wraps p.hero-subtitle,
.modern-hero .search-wraps .hero-subtitle,
.modern-hero .search-wraps p,
.search-wraps.single-search .hero-subtitle,
.search-wraps.single-search p.hero-subtitle {
    color: var(--text-muted, #64748B) !important;
    text-shadow: none !important;
}

.modern-hero p,
.modern-hero .hero-sub,
.modern-hero .search-wraps p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
}

.premium-hero p,
.banner-section p,
.search-wraps p {
    color: var(--text-muted, #64748B);
}

.search-container,
.search-wraps .search-container {
    background: #fff !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18) !important;
}

.search-btn,
.search-wraps .search-btn,
.orange-button.search-btn {
    background: var(--brand-primary, #047857) !important;
    border-color: var(--brand-primary, #047857) !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.search-btn:hover,
.search-wraps .search-btn:hover {
    background: var(--brand-primary-dark, #065F46) !important;
    border-color: var(--brand-primary-dark, #065F46) !important;
}

/* Delivery / Pickup toggle: active = primary green, not leftover mint/blue */
.search-type-toggle .type-btn.active,
.filter-btn.active,
.blog-filter-chip.active,
.category-pill.active,
.trending-btn.active,
.browse-tabs-pill li.active a,
.browse-tabs-pill li a.active {
    background: var(--brand-primary, #047857) !important;
    border-color: var(--brand-primary, #047857) !important;
    color: #fff !important;
}

/* ----- Primary / accent buttons ----- */
.green-button,
a.green-button,
button.green-button,
.btn-primary {
    background: var(--brand-primary, #047857) !important;
    border-color: var(--brand-primary, #047857) !important;
    color: #fff !important;
}

.green-button:hover,
a.green-button:hover,
button.green-button:hover,
.btn-primary:hover {
    background: var(--brand-primary-dark, #065F46) !important;
    border-color: var(--brand-primary-dark, #065F46) !important;
}

/* Orange stays for deals and attention, not the main checkout path */
.deal-badge,
.deals-slide-badge,
.has-save-icon.deal-badge {
    background: var(--brand-accent, #F97316) !important;
    color: #fff !important;
    font-weight: 800;
    letter-spacing: 0.01em;
}

/* ----- Browse / dispensary cards ----- */
.dispensary-card,
.category-slide-card {
    border-radius: 16px;
}

.dispensary-name {
    color: var(--text-main, #0F172A);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dispensary-card .open-badge,
.dispensary-badge.open,
.tag-open {
    background: var(--brand-primary-soft, #ECFDF5);
    color: var(--brand-primary, #047857);
    font-weight: 700;
}

.section-header a,
.section-title + a,
a.view-all {
    color: var(--brand-primary, #047857) !important;
    font-weight: 600;
    text-decoration: none;
}

.section-header a:hover,
a.view-all:hover {
    color: var(--brand-primary-dark, #065F46) !important;
    text-decoration: underline;
}

/* Trust / why-us icons */
.trust-card .category-icon,
.steps-grid .category-icon {
    background: var(--brand-primary-soft, #ECFDF5) !important;
    color: var(--brand-primary, #047857) !important;
}

/* ----- Menu rows ----- */
.premium-product-card .menu-item-name,
.premium-product-card .food-name {
    color: var(--text-main, #0F172A);
}

.premium-product-card .btn-add-cart {
    color: var(--brand-primary, #047857) !important;
    border-color: var(--brand-primary, #047857) !important;
}

.premium-product-card .btn-add-cart:hover {
    background: var(--brand-primary, #047857) !important;
    color: #fff !important;
}

/* ----- Deals ----- */
.deals-slide-card .deals-slide-name,
.deal-card-title {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ----- Blog ----- */
.blog-card-title,
.blog-detail h1,
.blog-post-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.blog-card-excerpt,
.blog-detail .excerpt,
.blog-detail p {
    line-height: 1.55;
}

/* ----- Footer ----- */
.footer, .footer-section, .bottom-footer {
    color: var(--text-muted, #64748B);
}

.footer a, .bottom-footer a {
    text-decoration: none;
}

.footer a:hover, .bottom-footer a:hover {
    color: var(--brand-primary, #047857);
}

/* ----- Links and focus ----- */
a:focus-visible,
button:focus-visible,
.green-button:focus-visible,
.search-btn:focus-visible,
.filter-btn:focus-visible,
.premium-product-card .btn-add-cart:focus-visible,
#wd-floating-cart-btn:focus-visible {
    outline: 3px solid var(--brand-accent, #F97316);
    outline-offset: 2px;
}

::selection {
    background: var(--brand-primary-soft, #ECFDF5);
    color: var(--brand-forest, #004018);
}

/* ----- Dark mode ----- */
[data-theme="dark"] body {
    background-color: var(--bg-canvas, #0F172A);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] .section-title,
[data-theme="dark"] .dispensary-name,
[data-theme="dark"] .premium-product-card .menu-item-name {
    color: var(--text-main, #F1F5F9);
}

[data-theme="dark"] .premium-product-card .btn-add-cart {
    color: #6EE7B7 !important;
    border-color: #047857 !important;
}

[data-theme="dark"] ::selection {
    background: rgba(4, 120, 87, 0.4);
    color: #ECFDF5;
}

/* Menu price line: keep "From 1/8 Oz $12.50" on one line instead of
   wrapping as "Fro m..." in the narrow card column. */
.premium-product-card .premium-price,
.premium-product-card .premium-price p,
.premium-product-card .menu-item-price {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.premium-product-card .menu-card-action {
    min-width: 0;
    width: 100%;
}

/* Lift the floating cart above the cookie bar while it is on screen. */
body.wd-cookie-open #wd-floating-cart-btn {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
body.wd-cookie-open:has(#budtender-launcher) #wd-floating-cart-btn {
    bottom: calc(164px + env(safe-area-inset-bottom, 0px));
}

/* Minimum-order reminder on payment is informational, not an error. */
.wd-min-order-note {
    color: var(--text-muted, #64748B);
    font-size: 0.85rem;
    margin: 0.5rem 0 0;
}
