/**
 * Site color themes — switch via html[data-site-theme]
 * Loaded last so surface overrides win over page inline styles.
 */

:root,
html[data-site-theme="charcoal"] {
    --theme-accent: #c9a227;
    --theme-accent-light: #e8c547;
    --theme-chrome-border: rgba(201, 162, 39, 0.16);
    --theme-hero-gradient: linear-gradient(165deg, #0f0e0c 0%, #1a1814 48%, #222018 100%);
    --theme-panel-dark: linear-gradient(165deg, #0f0e0c 0%, #1c1912 50%, #252018 100%);
    --theme-card-dark: linear-gradient(145deg, #1a1814 0%, #2d2818 60%, #3d3520 100%);
    --theme-band-accent: linear-gradient(165deg, #121110 0%, #1a1814 55%, #1f1d18 100%);
    --theme-glow: rgba(201, 162, 39, 0.14);
    --theme-iz-gold: #d7b549;
}

html[data-site-theme="brown"] {
    --primary: #72693a;
    --secondary: #9a8515;
    --hover: #e5ae49;
    --bg: #746c4433;
    --site-chrome-bg: linear-gradient(180deg, #4a4528 0%, #72693a 100%);
    --site-chrome-solid: #4a4528;
    --theme-accent: #e5ae49;
    --theme-accent-light: #f0c96a;
    --theme-chrome-border: rgba(229, 174, 73, 0.28);
    --theme-hero-gradient: linear-gradient(165deg, #3d3424 0%, #5c5530 45%, #72693a 100%);
    --theme-panel-dark: linear-gradient(165deg, #3d3424 0%, #5c5530 50%, #8a7d45 100%);
    --theme-card-dark: linear-gradient(145deg, #5c5530 0%, #72693a 60%, #9a8515 100%);
    --theme-band-accent: linear-gradient(165deg, #4a4528 0%, #5c5530 55%, #72693a 100%);
    --theme-glow: rgba(229, 174, 73, 0.18);
    --theme-iz-gold: #e5ae49;
}

html[data-site-theme="green"] {
    --primary: #1b5e3a;
    --secondary: #009146;
    --hover: #3dd68c;
    --bg: rgba(0, 145, 70, 0.15);
    --site-chrome-bg: linear-gradient(180deg, #071a10 0%, #1b442f 100%);
    --site-chrome-solid: #071a10;
    --theme-accent: #009146;
    --theme-accent-light: #3dd68c;
    --theme-chrome-border: rgba(61, 214, 140, 0.22);
    --theme-hero-gradient: linear-gradient(165deg, #070707 0%, #1b442f 50%, #256b47 100%);
    --theme-panel-dark: linear-gradient(165deg, #071a10 0%, #1b442f 50%, #2d7a52 100%);
    --theme-card-dark: linear-gradient(145deg, #0a2818 0%, #1b442f 60%, #009146 100%);
    --theme-band-accent: linear-gradient(165deg, #0a2818 0%, #1b442f 55%, #256b47 100%);
    --theme-glow: rgba(61, 214, 140, 0.12);
    --theme-iz-gold: #3dd68c;
}

html[data-site-theme="gold"] {
    --primary: #6b6234;
    --secondary: #c9a227;
    --hover: #f0d060;
    --bg: rgba(201, 162, 39, 0.12);
    --site-chrome-bg: linear-gradient(180deg, #1a1608 0%, #2d2810 100%);
    --site-chrome-solid: #1a1608;
    --theme-accent: #e8c547;
    --theme-accent-light: #f5dfa0;
    --theme-chrome-border: rgba(232, 197, 71, 0.28);
    --theme-hero-gradient: linear-gradient(165deg, #141108 0%, #2a2410 48%, #3d3520 100%);
    --theme-panel-dark: linear-gradient(165deg, #141108 0%, #2a2410 50%, #4a4020 100%);
    --theme-card-dark: linear-gradient(145deg, #2a2410 0%, #4a4020 60%, #c9a227 100%);
    --theme-band-accent: linear-gradient(165deg, #1a1608 0%, #2d2810 55%, #4a4020 100%);
    --theme-glow: rgba(232, 197, 71, 0.16);
    --theme-iz-gold: #e8c547;
}

/* Sapphire — deep navy with soft cyan (not flat blue) */
html[data-site-theme="sapphire"] {
    --primary: #2a4a6e;
    --secondary: #3d6a8c;
    --hover: #7ec8e8;
    --bg: rgba(62, 120, 160, 0.12);
    --site-chrome-bg: linear-gradient(180deg, #0a1219 0%, #152535 55%, #1e3348 100%);
    --site-chrome-solid: #0a1219;
    --theme-accent: #4a8fb8;
    --theme-accent-light: #8ecae6;
    --theme-chrome-border: rgba(126, 200, 232, 0.22);
    --theme-hero-gradient: linear-gradient(165deg, #080f18 0%, #152535 45%, #1a3a52 100%);
    --theme-panel-dark: linear-gradient(165deg, #0c1520 0%, #1a3045 50%, #234a62 100%);
    --theme-card-dark: linear-gradient(145deg, #152535 0%, #234a62 55%, #3d6a8c 100%);
    --theme-band-accent: linear-gradient(165deg, #0a1219 0%, #1a3045 55%, #2a5070 100%);
    --theme-glow: rgba(126, 200, 232, 0.14);
    --theme-iz-gold: #7ec8e8;
}

/* Amber — warm honey on dark espresso (not flat yellow) */
html[data-site-theme="amber"] {
    --primary: #8a6520;
    --secondary: #b8860b;
    --hover: #f4c86a;
    --bg: rgba(244, 200, 106, 0.12);
    --site-chrome-bg: linear-gradient(180deg, #1a1408 0%, #2d2210 55%, #3d3018 100%);
    --site-chrome-solid: #1a1408;
    --theme-accent: #d4a017;
    --theme-accent-light: #f4d47a;
    --theme-chrome-border: rgba(244, 200, 106, 0.26);
    --theme-hero-gradient: linear-gradient(165deg, #141008 0%, #2a2010 48%, #4a3818 100%);
    --theme-panel-dark: linear-gradient(165deg, #1a1408 0%, #3d3018 50%, #5c4820 100%);
    --theme-card-dark: linear-gradient(145deg, #2d2210 0%, #5c4820 55%, #b8860b 100%);
    --theme-band-accent: linear-gradient(165deg, #1a1408 0%, #3d3018 55%, #6a5428 100%);
    --theme-glow: rgba(244, 200, 106, 0.15);
    --theme-iz-gold: #f4c86a;
}

/* Plum — aubergine with soft rose accent */
html[data-site-theme="plum"] {
    --primary: #5c3a5e;
    --secondary: #7a4d7c;
    --hover: #d4a0c8;
    --bg: rgba(180, 120, 170, 0.12);
    --site-chrome-bg: linear-gradient(180deg, #120a14 0%, #241828 55%, #322038 100%);
    --site-chrome-solid: #120a14;
    --theme-accent: #9a6a92;
    --theme-accent-light: #d4a0c8;
    --theme-chrome-border: rgba(212, 160, 200, 0.22);
    --theme-hero-gradient: linear-gradient(165deg, #100810 0%, #241828 48%, #3a2848 100%);
    --theme-panel-dark: linear-gradient(165deg, #120a14 0%, #322038 50%, #4a3058 100%);
    --theme-card-dark: linear-gradient(145deg, #241828 0%, #4a3058 55%, #7a4d7c 100%);
    --theme-band-accent: linear-gradient(165deg, #120a14 0%, #2a2035 55%, #403050 100%);
    --theme-glow: rgba(212, 160, 200, 0.13);
    --theme-iz-gold: #d4a0c8;
}

/* Teal — petrol to seafoam (blue-green blend) */
html[data-site-theme="teal"] {
    --primary: #1a5c58;
    --secondary: #2a7870;
    --hover: #6ecfc4;
    --bg: rgba(110, 207, 196, 0.12);
    --site-chrome-bg: linear-gradient(180deg, #081412 0%, #0f2825 55%, #163835 100%);
    --site-chrome-solid: #081412;
    --theme-accent: #3a9890;
    --theme-accent-light: #7eddd4;
    --theme-chrome-border: rgba(110, 207, 196, 0.22);
    --theme-hero-gradient: linear-gradient(165deg, #061010 0%, #0f2825 45%, #1a4540 100%);
    --theme-panel-dark: linear-gradient(165deg, #081412 0%, #163835 50%, #205850 100%);
    --theme-card-dark: linear-gradient(145deg, #0f2825 0%, #205850 55%, #2a7870 100%);
    --theme-band-accent: linear-gradient(165deg, #081412 0%, #163835 55%, #1e5048 100%);
    --theme-glow: rgba(110, 207, 196, 0.13);
    --theme-iz-gold: #6ecfc4;
}

/* Sunset — wine, coral & peach warmth */
html[data-site-theme="sunset"] {
    --primary: #7a3a38;
    --secondary: #a04a42;
    --hover: #f0a888;
    --bg: rgba(240, 168, 136, 0.12);
    --site-chrome-bg: linear-gradient(180deg, #140a0a 0%, #2a1518 55%, #3a2025 100%);
    --site-chrome-solid: #140a0a;
    --theme-accent: #c46858;
    --theme-accent-light: #f0b098;
    --theme-chrome-border: rgba(240, 168, 136, 0.24);
    --theme-hero-gradient: linear-gradient(165deg, #120808 0%, #2a1518 48%, #4a2828 100%);
    --theme-panel-dark: linear-gradient(165deg, #140a0a 0%, #3a2025 50%, #5a3030 100%);
    --theme-card-dark: linear-gradient(145deg, #2a1518 0%, #5a3030 55%, #a04a42 100%);
    --theme-band-accent: linear-gradient(165deg, #140a0a 0%, #321820 55%, #4a2830 100%);
    --theme-glow: rgba(240, 168, 136, 0.14);
    --theme-iz-gold: #f0a888;
}

/* Indigo — deep violet-blue with soft periwinkle */
html[data-site-theme="indigo"] {
    --primary: #3a3a72;
    --secondary: #4a4a8a;
    --hover: #a8a8e8;
    --bg: rgba(140, 140, 220, 0.12);
    --site-chrome-bg: linear-gradient(180deg, #0c0a18 0%, #181528 55%, #222038 100%);
    --site-chrome-solid: #0c0a18;
    --theme-accent: #6868b0;
    --theme-accent-light: #b0b0e8;
    --theme-chrome-border: rgba(168, 168, 232, 0.22);
    --theme-hero-gradient: linear-gradient(165deg, #0a0814 0%, #181528 48%, #282045 100%);
    --theme-panel-dark: linear-gradient(165deg, #0c0a18 0%, #222038 50%, #323058 100%);
    --theme-card-dark: linear-gradient(145deg, #181528 0%, #323058 55%, #4a4a8a 100%);
    --theme-band-accent: linear-gradient(165deg, #0c0a18 0%, #201830 55%, #302848 100%);
    --theme-glow: rgba(168, 168, 232, 0.13);
    --theme-iz-gold: #a8a8e8;
}

/* Forest — deep moss with sage highlight */
html[data-site-theme="forest"] {
    --primary: #3d5235;
    --secondary: #5a7048;
    --hover: #a8c898;
    --bg: rgba(140, 180, 120, 0.12);
    --site-chrome-bg: linear-gradient(180deg, #0a1008 0%, #152010 55%, #1e2a18 100%);
    --site-chrome-solid: #0a1008;
    --theme-accent: #6a8858;
    --theme-accent-light: #b8d8a8;
    --theme-chrome-border: rgba(168, 200, 152, 0.22);
    --theme-hero-gradient: linear-gradient(165deg, #080c08 0%, #152010 48%, #243820 100%);
    --theme-panel-dark: linear-gradient(165deg, #0a1008 0%, #1e2a18 50%, #2a4028 100%);
    --theme-card-dark: linear-gradient(145deg, #152010 0%, #2a4028 55%, #5a7048 100%);
    --theme-band-accent: linear-gradient(165deg, #0a1008 0%, #1a2818 55%, #283820 100%);
    --theme-glow: rgba(168, 200, 152, 0.13);
    --theme-iz-gold: #a8c898;
}

/* ── Dark surfaces (heroes, panels) ── */
.page-hero-iz,
.contact-hero,
.about-band--hero,
.detail-hero,
.detail-hero--icon,
.detail-media__bar,
.detail-btn--liked,
.detail-next-card__icon,
.lp-section--dark-mesh,
.lp-cta-aurora,
.listing-card__visual {
    background: var(--theme-hero-gradient) !important;
}

.about-band--accent {
    background: var(--theme-band-accent) !important;
}

.lp-spotlight-main,
.lp-dual-card--derived,
.lp-alpha-cell:hover,
.lp-pipeline__node--hero,
.lp-panel-gradient,
.lp-timeline__dot {
    background: var(--theme-card-dark) !important;
}

/* Page-local tokens follow active theme */
html[data-site-theme] .detail-page,
html[data-site-theme] .about-page,
html[data-site-theme] .contact-page {
    --dv-brown: var(--primary);
    --dv-gold: var(--theme-accent);
    --about-brown: var(--primary);
    --about-gold: var(--theme-accent);
    --about-gold-light: var(--theme-accent-light);
    --ct-brown: var(--primary);
    --ct-gold: var(--theme-accent);
}

html[data-site-theme] .a2l-home {
    --lp-accent: var(--theme-accent);
    --lp-accent-2: var(--theme-accent-light);
    --lp-brown: var(--primary);
}

.islamic-zakhrafah {
    --iz-gold: var(--theme-iz-gold);
}

.page-hero-iz__badge,
.page-hero-iz__ornament-line i,
.listing-card__visual .listing-card__icon,
.listing-card__icon-header .listing-card__icon {
    color: var(--theme-accent-light) !important;
}

/* ── Theme switcher UI ── */
.theme-switcher {
    position: fixed;
    inset-inline-start: 1.25rem;
    bottom: 5.5rem;
    z-index: 9999;
    font-family: "Cera Pro Light", "Segoe UI", sans-serif;
}

.theme-switcher__toggle {
    width: 52px;
    height: 52px;
    border: 1px solid var(--theme-chrome-border, rgba(201, 162, 39, 0.25));
    border-radius: 50%;
    background: var(--site-chrome-bg, linear-gradient(180deg, #0f0e0c, #1c1912));
    background-color: var(--site-chrome-solid, #0f0e0c);
    color: var(--theme-accent-light, #e8c547);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-switcher__toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

.theme-switcher__panel {
    position: absolute;
    inset-inline-start: 0;
    bottom: calc(100% + 12px);
    width: min(320px, calc(100vw - 2.5rem));
    padding: 1.15rem;
    border-radius: 16px;
    border: 1px solid var(--theme-chrome-border, rgba(201, 162, 39, 0.2));
    background: var(--site-chrome-bg, linear-gradient(180deg, #0f0e0c, #1c1912));
    background-color: var(--site-chrome-solid, #0f0e0c);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.theme-switcher.is-open .theme-switcher__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-switcher__title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.theme-switcher__hint {
    margin: 0 0 1rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.55);
}

.theme-switcher__grid-wrap {
    max-height: min(52vh, 320px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-inline-end: 0.25rem;
    margin-inline-end: -0.15rem;
}

.theme-switcher__grid-wrap::-webkit-scrollbar {
    width: 5px;
}

.theme-switcher__grid-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.theme-switcher__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.theme-switcher__option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-align: start;
    transition: border-color 0.15s, background 0.15s;
}

.theme-switcher__option:hover {
    border-color: var(--theme-accent-light, #e8c547);
    background: rgba(255, 255, 255, 0.08);
}

.theme-switcher__option.is-active {
    border-color: var(--theme-accent-light, #e8c547);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px var(--theme-accent-light, #e8c547);
}

.theme-switcher__swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.theme-switcher__swatch--charcoal {
    background: linear-gradient(135deg, #0f0e0c, #1c1912);
}

.theme-switcher__swatch--brown {
    background: linear-gradient(135deg, #4a4528, #72693a);
}

.theme-switcher__swatch--green {
    background: linear-gradient(135deg, #071a10, #1b442f);
}

.theme-switcher__swatch--gold {
    background: linear-gradient(135deg, #1a1608, #c9a227);
}

.theme-switcher__swatch--sapphire {
    background: linear-gradient(135deg, #0a1219, #3d6a8c, #7ec8e8);
}

.theme-switcher__swatch--amber {
    background: linear-gradient(135deg, #1a1408, #b8860b, #f4d47a);
}

.theme-switcher__swatch--plum {
    background: linear-gradient(135deg, #120a14, #7a4d7c, #d4a0c8);
}

.theme-switcher__swatch--teal {
    background: linear-gradient(135deg, #081412, #2a7870, #7eddd4);
}

.theme-switcher__swatch--sunset {
    background: linear-gradient(135deg, #140a0a, #a04a42, #f0b098);
}

.theme-switcher__swatch--indigo {
    background: linear-gradient(135deg, #0c0a18, #4a4a8a, #b0b0e8);
}

.theme-switcher__swatch--forest {
    background: linear-gradient(135deg, #0a1008, #5a7048, #b8d8a8);
}

@media (max-width: 575px) {
    .theme-switcher {
        inset-inline-start: 0.75rem;
        bottom: 4.75rem;
    }

    .theme-switcher__toggle {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .theme-switcher__panel {
        width: min(300px, calc(100vw - 1.5rem));
    }

    .theme-switcher__grid-wrap {
        max-height: min(45vh, 280px);
    }
}

/* Navbar flush to top — no gap above header; inner padding lives in custom-style.css */
html,
body {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.main-header-wrapper1,
.main-header-wrapper1 .sb-main-header1,
.main-header-wrapper1 .sb-main-header1 .menu-items-wrapper,
.main-header-wrapper1 .sb-main-header1 .menu-item-wrapper3 {
    margin-top: 0 !important;
}
