/* =========================================
   Gibbonet Studio — Marketplace Styles
   ========================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --success: #22c55e;
    --text: #1e293b;
    --text-muted: #64748b;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
    --transition: all .2s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Sale top banner — full-width bright strip above navbar */
.sale-topbar {
    background: #fbbf24;
    padding: 10px 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    text-align: center;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform .6s cubic-bezier(0.22, 1, 0.36, 1), opacity .5s ease;
}
.sale-topbar.visible {
    transform: translateY(0);
    opacity: 1;
}
.sale-topbar.dismissed {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}
.sale-topbar-text {
    color: #000;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .3px;
}
.sale-topbar-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(0,0,0,.5);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    transition: color .2s;
}
.sale-topbar-close:hover {
    color: #000;
}
/* When banner is visible, push navbar and hero down */
body.sale-banner-visible .navbar {
    top: 38px;
}
/* Push navbar down when sale banner is present — not needed with relative positioning */
.sale-price-wrap .price-original {
    text-decoration: line-through; color: #94a3b8; font-size: 14px; font-weight: 500;
}
.sale-price-wrap .price-sale {
    color: #dc2626; font-weight: 700;
}
.sale-badge {
    display: inline-block; background: #dc2626; color: #fff; font-size: 10px;
    font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 4px;
    vertical-align: middle;
}

html, body {
    background: #1e3a8a;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    color: var(--text);
    line-height: 1.6;
}

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* --- Navbar (hero page — transparent overlay) --- */
.navbar {
    background: transparent;
    border-bottom: none;
    padding: .75rem 0;
    padding-top: calc(.75rem + env(safe-area-inset-top, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

/* --- Customizer top bar (solid, not transparent) --- */
.navbar.customizer-topbar {
    position: sticky;
    top: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    z-index: 1040;
}
.navbar-toggler .bi { color: #fff; }
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary) !important;
    text-decoration: none !important;
}
.brand-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}
.brand-logo-img {
    height: 26px;
    width: auto;
    display: block;
    transition: var(--transition);
    filter: brightness(0) invert(1);
}
.brand-studio {
    font-family: 'Inter', sans-serif;
    font-size: 7px;
    font-weight: 500;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    margin-top: 3px;
    padding-left: 0;
    width: 100%;
    text-align: right;
    transition: var(--transition);
}
.nav-link {
    font-weight: 500;
    font-size: .9rem;
    color: rgba(255,255,255,.85) !important;
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: #fff !important;
}

/* --- Nav Search --- */
.nav-search-wrap {
    position: relative;
}
.nav-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.5);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}
.nav-search-input {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 24px;
    color: #fff;
    font-size: 13px;
    padding: 6px 14px 6px 34px;
    width: 180px;
    transition: all .25s ease;
}
.nav-search-input::placeholder {
    color: rgba(255,255,255,.45);
}
.nav-search-input:focus {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.4);
    box-shadow: 0 0 0 3px rgba(99,102,241,.2);
    outline: none;
    width: 240px;
}
.nav-search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 300px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    z-index: 1050;
    max-height: 360px;
    overflow-y: auto;
    padding: 8px 0;
}
.nav-search-dropdown.open {
    display: block;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    color: #1e293b;
}
.search-result-item:hover {
    background: #f1f5f9;
}
.search-result-thumb {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}
.search-result-info {
    flex: 1;
    min-width: 0;
}
.search-result-name {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-meta {
    font-size: 11px;
    color: #64748b;
}
.search-result-badge {
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 50px;
    font-weight: 600;
    flex-shrink: 0;
}
.search-no-results {
    padding: 20px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.offcanvas-body .nav-search-input {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #1e293b;
    width: 100%;
}
.offcanvas-body .nav-search-input::placeholder {
    color: #94a3b8;
}
.offcanvas-body .nav-search-icon {
    color: #94a3b8;
}
.offcanvas-body .nav-search-input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
    width: 100%;
}
.offcanvas-body .nav-search-dropdown {
    min-width: 100%;
}

/* --- Hero --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(100px + env(safe-area-inset-top, 0px)) 0 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e3a8a 40%, #172554 100%);
    position: relative;
    color: #fff;
    overflow: hidden;
}
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
/* Hero benefits bar — 4 sections, different shades */
.hero-filter-wrap {
    width: 100%;
    margin-top: auto;
    padding: 0;
    position: relative;
}
.hero-filter-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
}
.hero-benefit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 16px;
    color: rgba(255,255,255,.9);
    text-align: left;
    position: relative;
}
/* Darkest on the left, graduating lighter to the right */
.hero-benefit:nth-child(1) { background: rgba(10,18,45,.92); }
.hero-benefit:nth-child(2) { background: rgba(18,32,72,.92); }
.hero-benefit:nth-child(3) { background: rgba(20,42,95,.94); }
.hero-benefit:nth-child(4) { background: rgba(37,72,168,.95); }
.hero-benefit > i {
    font-size: 22px;
    color: #fbbf24;
    flex-shrink: 0;
}
.hero-benefit strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
    color: #fff;
}
.hero-benefit span {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,.6);
    margin-top: 2px;
}

/* Animated country map outlines */
/* Multiplying circles canvas */
#heroCircles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Brand text above heading — grows in sync with map convergence */
.hero-brand-bg {
    margin-bottom: 1rem;
    font-size: clamp(.85rem, 1.8vw, 1.1rem);
    font-weight: 700;
    letter-spacing: .3em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(255,255,255,.85);
    pointer-events: none;
    user-select: none;
    animation: brandGrow 12s ease-in-out infinite;
}
@keyframes brandGrow {
    0%, 15%  { transform: scale(.6); opacity: 0; }
    30%      { transform: scale(.85); opacity: .5; }
    40%, 60% { transform: scale(1); opacity: 1; }
    70%      { transform: scale(.85); opacity: .5; }
    85%, 100%{ transform: scale(.6); opacity: 0; }
}

@media (max-width: 767.98px) {
    .hero-brand-bg { font-size: .65rem; letter-spacing: .15em; margin-bottom: .75rem; }

}

@media (prefers-reduced-motion: reduce) {
    #heroCircles { display: none; }
}
.hero-section::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96,165,250,.3) 0%, transparent 70%);
    pointer-events: none;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0v60M0 30h60' stroke='%23ffffff' stroke-opacity='.06' fill='none'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}
.hero-section h1 {
    font-size: clamp(2.5rem, 5vw + 1rem, 4.2rem);
    letter-spacing: -.03em;
    color: #fff;
    line-height: 1.1;
}
.hero-gradient-text {
    color: #fff;
}

/* Animated strikethrough — each word crosses out then dissolves out */
.hero-strike {
    position: relative;
    display: inline;
    white-space: nowrap;
    transition: all 1.2s ease;
}
.hero-strike::after {
    content: '';
    position: absolute;
    left: 0; top: 54%;
    width: 0; height: 3px;
    background: linear-gradient(90deg, #fbbf24, #ef4444);
    border-radius: 2px;
    animation: strikeThrough 1s ease-out forwards;
    animation-delay: calc(3s + (var(--d) - 1) * 1.5s);
}
.hero-strike.dissolved {
    opacity: 0;
    transform: scale(0.7);
    filter: blur(6px);
    position: absolute;
    width: 0; height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Ready: grows big on its own line after dissolve */
#heroReady {
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-ready-big {
    display: block !important;
    filter: drop-shadow(0 0 24px rgba(255,255,255,.25));
}
/* After final state: entire heading grows big, dissolved elements hidden */
.hero-heading-final {
    font-size: clamp(3.5rem, 12vw, 6.5rem) !important;
    letter-spacing: -.04em;
    transition: font-size 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-heading-final br { display: none; }
.hero-heading-final .dissolved { display: none; }

/* Confetti celebration */
.confetti-piece {
    position: absolute;
    top: 40%;
    z-index: 5;
    opacity: 1;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(60vh) rotate(720deg) scale(0.3);
        opacity: 0;
    }
}

@keyframes strikeThrough {
    0% { width: 0; }
    100% { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-strike::after { animation: none; width: 100%; }
    .hero-strike.dissolved { transition: none; opacity: 0; }
}
.hero-section .lead {
    font-size: clamp(1.1rem, 1.8vw + 0.4rem, 1.35rem) !important;
    color: rgba(255,255,255,.8) !important;
    line-height: 1.7;
    max-width: 680px;
}
.hero-section .btn-primary {
    background: #fff;
    color: #1e3a8a;
    border: 2px solid #fff;
    font-weight: 700;
}
.hero-section .btn-primary:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.btn-hero-cta {
    background: #fff;
    color: #0f1b2d;
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    padding: .9rem 2.5rem;
    border-radius: 10px;
    letter-spacing: .01em;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    transition: all .25s ease;
}
.btn-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,.2);
    color: #0f1b2d;
    background: #f0f0f0;
}
.btn-hero-cta:active {
    transform: translateY(0);
}

/* Hero scroll-down arrow */
.hero-scroll-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--accent);
    animation: heroArrowBounce 2s cubic-bezier(.4,0,.2,1) infinite;
    transition: color .3s ease, filter .3s ease;
}
.hero-scroll-arrow:hover {
    color: #fbbf24;
    filter: brightness(1.2);
}
@keyframes heroArrowBounce {
    0%, 100% { transform: translateY(0); opacity: .7; }
    50% { transform: translateY(10px); opacity: 1; }
}

/* Hero stats row */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.hero-stat-num {
    font-size: clamp(1.15rem, 1.5vw + 0.4rem, 1.25rem);
    font-weight: 700;
    color: #fff;
}
.hero-stat-label {
    font-size: clamp(0.75rem, 0.8vw + 0.3rem, 0.8rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255,255,255,.7);
}
.hero-stat-sep {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,.25);
}
@media (max-width: 575.98px) {
    .hero-stat-sep { display: none; }
    .hero-stats { gap: 16px; }
}

/* Section eyebrow */
.section-eyebrow {
    display: inline-block;
    font-size: clamp(0.72rem, 0.8vw + 0.2rem, 0.78rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 5px 14px;
    border-radius: 99px;
}

/* Section headings — fluid clamp */
section h2 {
    font-size: clamp(1.65rem, 2.5vw + 0.5rem, 2.25rem);
}
section p.text-muted,
section .lead {
    font-size: clamp(1rem, 1vw + 0.4rem, 1.1rem);
}

/* --- Scroll-reveal animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.reveal {
    opacity: 0;
    transform: translateY(30px);
}
.reveal.visible {
    animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal-left.visible {
    animation: fadeInLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal-right.visible {
    animation: fadeInRight 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal-scale.visible {
    animation: scaleIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.reveal-delay-1 { animation-delay: 0.1s !important; }
.reveal-delay-2 { animation-delay: 0.2s !important; }
.reveal-delay-3 { animation-delay: 0.3s !important; }
.reveal-delay-4 { animation-delay: 0.4s !important; }

/* Staggered card reveal — set by JS */
.tpl-col.reveal.visible {
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Trust badges */
.trust-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    font-size: clamp(0.74rem, 0.7vw + 0.25rem, 0.78rem);
    font-weight: 600;
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 100px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    letter-spacing: 0.01em;
    transition: background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
    cursor: default;
}
.trust-badge:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.trust-badge:hover i {
    opacity: 1;
}
.trust-badge i {
    font-size: 0.9em;
    opacity: .85;
    transition: opacity .25s ease;
}
@media (max-width: 576px) {
    .trust-bar { gap: 0.4rem; }
    .trust-badge { padding: 0.35rem 0.7rem; font-size: 0.74rem; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal.visible,
    .reveal-left.visible, .reveal-right.visible, .reveal-scale.visible {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- Filter Toolbar --- */
.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.filter-toolbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.filter-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    background: var(--bg-alt, #f1f5f9);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    letter-spacing: .2px;
}
.filter-count-num {
    font-weight: 700;
    color: var(--primary);
}
.filter-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}
.filter-pills {
    display: flex;
    gap: 6px;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--bg);
    transition: all .2s ease;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    outline: none;
}
.filter-pill:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 2px 8px rgba(13,110,253,.12);
    transform: translateY(-1px);
}
.filter-pill.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(13,110,253,.25);
}
.filter-pill.active:hover {
    box-shadow: 0 4px 12px rgba(13,110,253,.3);
    transform: translateY(-1px);
}
.filter-pill i { font-size: 12px; }

/* Category pill variant */
.filter-pill-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    white-space: nowrap;
    transition: all .2s ease;
    outline: none;
}
.filter-pill-cat:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(13,110,253,.12);
    transform: translateY(-1px);
}
.filter-pill-cat.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(13,110,253,.25);
}
.filter-divider-v {
    width: 1px;
    height: 20px;
    background: var(--border);
    align-self: center;
    margin: 0 4px;
}
.filter-pill-clear {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 99px;
    transition: var(--transition);
}
.filter-pill-clear:hover {
    color: #ef4444;
}

.filter-sort-label {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
}
.filter-sort-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") no-repeat right 10px center;
    padding: 6px 30px 6px 12px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}
.filter-sort-select:hover,
.filter-sort-select:focus {
    border-color: var(--primary);
}
@media (max-width: 575.98px) {
    .filter-toolbar { gap: 10px; }
    .filter-divider { display: none; }
    .filter-toolbar-left { width: 100%; }
    .filter-toolbar-right { width: 100%; }
    .filter-pills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .filter-pills::-webkit-scrollbar { display: none; }
}

/* Stronger card shadow on mobile for clear card separation */
@media (max-width: 767.98px) {
    .template-card {
        box-shadow: 0 4px 16px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.06);
        border-color: rgba(0,0,0,.06);
    }
}

/* --- Template Cards --- */
.template-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
}
.template-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary);
}
.template-card.exclusive {
    background: #f8fdf9;
    border-color: #d4edd8;
}
.template-card.exclusive:hover {
    border-color: #86efac;
    box-shadow: 0 8px 24px rgba(34,197,94,.08);
}
.template-card.exclusive .template-card-actions {
    background: #f5fbf6;
}
/* Status overrides exclusive styling */
.template-card.sold.exclusive,
.template-card.sold {
    border-color: #fca5a5;
    background: #fef8f8;
}
.template-card.sold.exclusive:hover,
.template-card.sold:hover {
    border-color: #f87171;
    box-shadow: 0 8px 24px rgba(239,68,68,.1);
}
.template-card.sold.exclusive .template-card-actions,
.template-card.sold .template-card-actions {
    background: #fef5f5;
}
.template-card.under-offer.exclusive,
.template-card.under-offer {
    border-color: #fcd34d;
    background: #fffdf5;
}
.template-card.under-offer.exclusive:hover,
.template-card.under-offer:hover {
    border-color: #fbbf24;
    box-shadow: 0 8px 24px rgba(245,158,11,.1);
}
.template-card.under-offer.exclusive .template-card-actions,
.template-card.under-offer .template-card-actions {
    background: #fffbeb;
}

.template-preview {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-light);
}
.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    transition: transform .3s ease;
}
.template-card:hover .template-preview img {
    transform: scale(1.03);
}

.template-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
}

/* Iframe-based live preview (used in admin capture & detail pages) */
.template-iframe-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #fff;
}
.template-iframe-wrap iframe {
    width: 1440px;
    height: 900px;
    border: none;
    transform-origin: top left;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(calc(1 / (1440 / 380)));
}
@media (max-width: 991px) {
    .template-iframe-wrap iframe {
        transform: scale(calc(1 / (1440 / 340)));
    }
}
@media (max-width: 767px) {
    .template-iframe-wrap iframe {
        transform: scale(calc(1 / (1440 / 500)));
    }
}

/* Type badge (inline in meta row) */
.type-badge {
    display: inline-flex;
    align-items: center;
    font-size: .55rem;
    font-weight: 500;
    padding: .25em .6em;
    border-radius: 50px;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: default;
    white-space: nowrap;
    line-height: 1.4;
}
.template-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.type-badge--multi {
    background: transparent;
    color: #0369a1;
    border: 1.5px solid #7dd3fc;
}
/* Small ? indicator on badge */
.badge-q {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px; height: 12px;
    margin-left: 3px;
    font-size: .45rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 50%;
    background: rgba(100,116,139,.15);
    color: #94a3b8;
    position: relative;
    top: -5px;
}
.type-badge--exclusive {
    background: transparent;
    color: #15803d;
    border: 1.5px solid #86efac;
}

/* Popover styling (dark) */
.popover {
    --bs-popover-bg: #1e293b !important;
    --bs-popover-body-color: #e2e8f0 !important;
    --bs-popover-border-color: #334155 !important;
    background-color: #1e293b !important;
    border-color: #334155 !important;
    font-size: .8rem;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.popover .popover-body {
    color: #e2e8f0 !important;
    padding: .5rem .75rem;
}
.popover .popover-arrow::after {
    border-top-color: #1e293b !important;
}
.popover .popover-arrow::before {
    border-top-color: #334155 !important;
}
.bs-popover-bottom .popover-arrow::after {
    border-bottom-color: #1e293b !important;
}
.bs-popover-bottom .popover-arrow::before {
    border-bottom-color: #334155 !important;
}

/* Card footer action buttons (always visible) */
.template-card-actions {
    display: flex;
    gap: 6px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
    margin-top: auto;
    border-radius: 0 0 var(--radius) var(--radius);
    flex-wrap: wrap;
}
.template-action-btn {
    flex: 1;
    font-size: .85rem;
    font-weight: 600;
    padding: .55rem .75rem;
    white-space: nowrap;
    border-radius: 6px !important;
}
.template-action-btn.btn-primary {
    font-size: .9rem;
    padding: .6rem .85rem;
    letter-spacing: .02em;
}

/* Share icon buttons (inline — official brand icons) */
.share-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}
.share-icon {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all .2s ease;
    border: none;
}
.share-icon svg {
    width: 18px; height: 18px;
}
.share-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
    opacity: .85;
}
.share-icon-copy { background: #64748b; color: #fff; cursor: pointer; padding: 0; }
.share-icon-fb { background: #1877f2; color: #fff; }
.share-icon-wa { background: #25D366; color: #fff; }

/* Copy link toast */
.copy-link-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: #198754; color: #fff; font-size: .85rem; font-weight: 600;
    padding: 10px 20px; border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 9999; animation: copyToastIn .3s ease;
}
@keyframes copyToastIn { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Free Lifetime Hosting ribbon */
.hosting-ribbon {
    position: absolute;
    top: 12px;
    left: 0;
    z-index: 3;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    padding: 5px 14px 5px 10px;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 3px 12px rgba(5,150,105,.35), 0 1px 3px rgba(0,0,0,.1);
    animation: hostingPulse 3s ease-in-out infinite;
    white-space: nowrap;
}
@keyframes hostingPulse {
    0%, 100% { box-shadow: 0 3px 12px rgba(5,150,105,.35); }
    50% { box-shadow: 0 3px 18px rgba(5,150,105,.55), 0 0 20px rgba(16,185,129,.2); }
}

.template-info {
    padding: 16px;
    flex: 1;
}
.template-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
}
.template-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    white-space: nowrap;
}
.template-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.template-desc {
    line-height: 1.4;
}

/* Tech stack icons */
.template-stack {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.stack-img {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    opacity: .7;
    transition: opacity .2s, transform .15s;
    cursor: default;
}
.stack-img:hover {
    opacity: 1;
    transform: scale(1.15);
}
.stack-ps {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--primary);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1;
    flex-shrink: 0;
    cursor: default;
    transition: background .2s, transform .15s;
}
.stack-ps:hover {
    background: var(--primary-dark);
    transform: scale(1.15);
}

/* Sold overlay */
.sold-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    z-index: 3;
}
.sold-stamp {
    font-size: 1.6rem;
    font-weight: 900;
    color: #ef4444;
    letter-spacing: .1em;
    transform: rotate(-8deg);
    border: 3px solid #ef4444;
    padding: .15em .5em;
    border-radius: 8px;
    background: rgba(0,0,0,.35);
    text-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* Under offer overlay */
.offer-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    z-index: 3;
}
.offer-stamp {
    font-size: 1.6rem;
    font-weight: 900;
    color: #f59e0b;
    letter-spacing: .1em;
    transform: rotate(-8deg);
    border: 3px solid #f59e0b;
    padding: .15em .5em;
    border-radius: 8px;
    background: rgba(0,0,0,.35);
    text-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* --- Steps Row (v2) --- */
.steps-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}
.step-card-v2 {
    flex: 1;
    max-width: 260px;
    text-align: center;
    padding: 0 20px;
}
.step-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.step-connector {
    display: flex;
    align-items: center;
    padding-top: 18px;
    color: var(--border);
    font-size: 1rem;
    flex-shrink: 0;
}
@media (max-width: 767.98px) {
    .steps-row { flex-direction: column; align-items: center; gap: 24px; }
    .step-connector { transform: rotate(90deg); padding-top: 0; }
}

/* --- Step Cards (legacy) --- */
.step-card {
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}
.step-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}
.step-card:hover .step-icon-bg {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1) rotate(6deg);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}
.step-card:hover .step-number {
    color: var(--primary);
    opacity: 0.18;
}
.step-card:hover h5 {
    color: var(--primary);
}
.step-number {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--primary-light);
    line-height: 1;
    transition: var(--transition);
}
.step-icon-wrap {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}
.step-icon-bg {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    transition: all .35s cubic-bezier(.4, 0, .2, 1);
}

/* --- Pricing Cards --- */
.pricing-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.pricing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.pricing-card.featured {
    background: #f0fdf4;
    border-color: #86efac;
    box-shadow: 0 8px 32px rgba(34,197,94,.1);
}
.pricing-card.featured:hover {
    border-color: #22c55e;
    box-shadow: 0 12px 40px rgba(34,197,94,.15);
}
.pricing-ribbon {
    position: absolute;
    top: 22px;
    right: -32px;
    background: #22c55e;
    color: white;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 5px 40px;
    transform: rotate(45deg);
}
.pricing-badge {
    display: inline-flex;
    align-items: center;
    font-size: .75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.pricing-badge--multi {
    background: transparent;
    color: #0369a1;
    border: 1.5px solid #7dd3fc;
}
.pricing-badge--exclusive {
    background: transparent;
    color: #15803d;
    border: 1.5px solid #86efac;
}
.pricing-header {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.pricing-card.featured .pricing-header {
    border-bottom-color: #bbf7d0;
}
.pricing-amount {
    font-weight: 800;
    font-size: 2.25rem;
    color: var(--text);
}
.pricing-features li {
    padding: 10px 0;
    font-size: .9rem;
    color: var(--text);
}
.pricing-features li i {
    color: #22c55e;
    font-size: 1rem;
}
.pricing-features li.text-muted i {
    color: #cbd5e1;
}

/* --- Buttons --- */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* --- Template Section BG --- */
.templates-section {
    background:
        radial-gradient(ellipse 50% 80% at 80% 50%, rgba(37,99,235,.04) 0%, transparent 70%),
        linear-gradient(180deg, #fff 0%, var(--bg-light) 100%);
}

/* White bg for sections after hero (body is blue for Safari toolbar) */
#how-it-works { background-color: var(--bg-light); }
#pricing { background-color: #fff; }

/* --- Customizer Page --- */
.customizer-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    height: calc(100vh - 56px);
    overflow: hidden;
    transition: grid-template-columns .3s ease;
}
.customizer-layout.panel-collapsed {
    grid-template-columns: 52px 1fr;
}
.customizer-panel {
    background: var(--bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    transition: width .3s ease, padding .3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.customizer-panel::-webkit-scrollbar { width: 5px; }
.customizer-panel::-webkit-scrollbar-track { background: transparent; }
.customizer-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.customizer-panel.collapsed {
    width: 52px !important;
    min-width: 52px !important;
    padding: 12px 6px;
    overflow: hidden;
}
.customizer-panel.collapsed .panel-header span,
.customizer-panel.collapsed .mt-3 { display: none; }
.customizer-panel.collapsed .panel-header {
    justify-content: center !important;
    margin-bottom: 8px !important;
}
/* In collapsed mode, show only icons as a vertical icon bar */
.customizer-panel.collapsed .customizer-accordion .accordion-item {
    border: none;
    border-radius: 8px !important;
    margin-bottom: 4px;
    background: transparent;
}
.customizer-panel.collapsed .customizer-accordion .accordion-collapse {
    display: none !important;
}
.customizer-panel.collapsed .customizer-accordion .accordion-button {
    padding: 8px 0;
    justify-content: center;
    border-radius: 8px !important;
    font-size: 0; /* hide text */
    gap: 0;
    min-height: 36px;
}
.customizer-panel.collapsed .customizer-accordion .accordion-button i {
    font-size: 1.1rem;
    margin: 0 !important;
    opacity: .6;
}
.customizer-panel.collapsed .customizer-accordion .accordion-button:hover i {
    opacity: 1;
}
.customizer-panel.collapsed .customizer-accordion .accordion-button::after {
    display: none;
}
.customizer-preview {
    background: var(--bg-light);
    position: relative;
}
.customizer-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Panel header */
.panel-header { padding: 0 4px 0 4px; }
.panel-header .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    transition: background .15s;
}
.panel-header .btn-icon:hover {
    background: var(--bg-light);
    color: var(--text);
}
.ls-1 { letter-spacing: .05em; }

/* Customizer Accordion */
.customizer-accordion .accordion-item {
    border: 1px solid var(--border);
    border-radius: 10px !important;
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--bg);
}
.customizer-accordion .accordion-button {
    font-size: .82rem;
    font-weight: 600;
    padding: 13px 16px;
    background: var(--bg);
    color: var(--text);
    box-shadow: none !important;
    border-radius: 10px !important;
    gap: 0;
}
/* When expanded, only round top corners */
.customizer-accordion .accordion-button:not(.collapsed) {
    border-radius: 10px 10px 0 0 !important;
    background: var(--primary-light, #f0f7ff);
    color: var(--primary, #2563eb);
}
/* Replace chevron with + / − icon */
.customizer-accordion .accordion-button::after {
    content: '+';
    background-image: none !important;
    width: auto;
    height: auto;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1;
    opacity: .45;
    transition: transform .2s ease, opacity .2s ease;
    transform: none !important;
}
.customizer-accordion .accordion-button:not(.collapsed)::after {
    content: '\2212';
    opacity: .7;
    transform: none !important;
}
.customizer-accordion .accordion-button:hover {
    background: var(--bg-light);
}
.customizer-accordion .accordion-button:not(.collapsed):hover {
    background: var(--primary-light, #f0f7ff);
}
.customizer-accordion .accordion-button i {
    font-size: .95rem;
    opacity: .7;
}
.customizer-accordion .accordion-button:not(.collapsed) i {
    opacity: 1;
}
.customizer-accordion .accordion-body {
    padding: 14px 16px 18px;
    border-top: 1px solid var(--border);
}
.customizer-accordion .accordion-collapse {
    transition: height .25s ease;
}

/* Delete button for editable elements */
.cust-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    color: #ef4444;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
    transition: background .15s, transform .15s;
}
.cust-delete-btn:hover {
    background: #fef2f2;
    transform: scale(1.15);
}
.cust-delete-wrap {
    position: relative;
}
.cust-delete-wrap:hover .cust-delete-btn {
    display: flex;
}

/* Logo Upload */
.logo-upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-upload-area:hover {
    border-color: var(--primary, #2563eb);
    background: var(--primary-light, #f0f7ff);
}
.logo-preview {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-preview img {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
}
.logo-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    border: 1px solid var(--border);
    background: var(--bg);
}
.logo-placeholder {
    text-align: center;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Favicon Upload */
.favicon-upload-area {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s;
    overflow: hidden;
}
.favicon-upload-area:hover {
    border-color: var(--primary, #2563eb);
    background: var(--primary-light, #f0f7ff);
}
.favicon-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.favicon-preview img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}
.favicon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-picker-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.color-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.color-picker-item input[type="color"] {
    width: 34px;
    height: 34px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    transition: border-color .15s;
}
.color-picker-item input[type="color"]:hover {
    border-color: var(--primary, #2563eb);
}
.color-picker-item label {
    font-size: .78rem;
    color: var(--text-muted);
}

.font-select {
    width: 100%;
    margin-bottom: 8px;
}

/* --- Template Detail Page --- */
.template-detail-hero {
    background: var(--bg-light);
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}
.template-detail-preview {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.template-detail-preview img {
    width: 100%;
    display: block;
}

.template-sidebar {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: sticky;
    top: 80px;
}

.template-feature-list li {
    padding: 6px 0;
    font-size: .9rem;
}

/* --- Download Page --- */
.download-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}
.download-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.download-icon i {
    font-size: 2rem;
    color: var(--primary);
}

/* --- Checkout --- */
.checkout-topbar {
    position: sticky;
    top: 0;
    background: #1e3a8a;
    border-bottom: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    z-index: 1040;
}
.checkout-topbar .btn-outline-secondary {
    color: #fff;
    border-color: rgba(255,255,255,.3);
}
.checkout-topbar .btn-outline-secondary:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.5);
    color: #fff;
}
.checkout-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 500px;
}
.order-summary {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
}

/* Addon cards */
.addon-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.addon-card:hover {
    border-color: #198754;
    background: rgba(25, 135, 84, 0.06);
}
.addon-card:has(.addon-check:checked) {
    border-color: #198754;
    background: rgba(25, 135, 84, 0.06);
    box-shadow: 0 0 0 1px #198754;
}
.addon-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.addon-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.addon-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(25, 135, 84, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #198754;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.addon-card:has(.addon-check:checked) .addon-icon {
    background: #198754;
    color: #fff;
}
.addon-info {
    flex: 1;
    min-width: 0;
}
.addon-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}
.addon-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.addon-price {
    font-weight: 700;
    font-size: 0.9rem;
    color: #198754;
    white-space: nowrap;
}
.addon-price small {
    font-weight: 500;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Payment method cards (blue instead of green) */
.payment-method-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.payment-method-card:has(.addon-check:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 1px var(--primary);
}
.payment-method-card:has(.addon-check:checked) .addon-icon {
    background: var(--primary) !important;
    color: #fff !important;
}

/* --- Accordion --- */
.accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius) !important;
    margin-bottom: 8px;
    overflow: hidden;
}
.accordion-button:not(.collapsed) {
    background: var(--primary-light);
    color: var(--primary);
}

/* --- FAQ Section --- */
.faq-section {
    padding: 80px 0;
    background: #fff;
}
.faq-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    background: #eef2ff;
    padding: 6px 14px;
    border-radius: 20px;
}
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-item {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.faq-item:hover {
    border-color: #c7d2fe;
}
.faq-item.open {
    border-color: #a5b4fc;
    box-shadow: 0 2px 12px rgba(99,102,241,.08);
}
.faq-trigger {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--primary);
    font-size: 16px;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}
.faq-item.open .faq-icon {
    background: var(--primary);
    color: #fff;
}
.faq-q {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}
.faq-toggle {
    font-size: 18px;
    color: #94a3b8;
    transition: transform .25s ease;
    flex-shrink: 0;
}
.faq-item.open .faq-toggle {
    transform: rotate(45deg);
    color: var(--primary);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
    padding: 0 20px 0 72px;
}
.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 20px 20px 72px;
}
.faq-answer p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 8px;
}
.faq-answer p:last-child {
    margin-bottom: 0;
}

/* --- CTA Section --- */
.cta-section {
    padding: clamp(40px, 6vw, 80px) 0;
    background: #fff;
}
.cta-card {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e3a8a 40%, #172554 100%);
    border-radius: 24px;
    padding: clamp(48px, 6vw, 80px) clamp(24px, 5vw, 72px);
    text-align: center;
    color: #fff;
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(37, 99, 235, .1),
        0 20px 50px rgba(37, 99, 235, .25),
        0 0 0 1px rgba(255,255,255,.08) inset;
}
.cta-card-glow {
    position: absolute;
    top: -40%;
    right: -20%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96,165,250,.35) 0%, transparent 70%);
    pointer-events: none;
}
.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0v60M0 30h60' stroke='%23ffffff' stroke-opacity='.06' fill='none'/%3E%3C/svg%3E");
    pointer-events: none;
}
.cta-card-content {
    position: relative;
    z-index: 2;
}
.cta-eyebrow {
    display: inline-block;
    font-size: clamp(0.78rem, 0.8vw + 0.2rem, 0.85rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255,255,255,.15);
    padding: 0.35rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}
.cta-heading {
    font-size: clamp(1.85rem, 3.5vw + 0.5rem, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}
.cta-subtext {
    font-size: clamp(1.05rem, 1.2vw + 0.3rem, 1.2rem);
    color: rgba(255,255,255,.8);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}
.cta-btn {
    background: #fff;
    color: #1e3a8a;
    border: 2px solid #fff;
    font-weight: 700;
    font-size: clamp(0.95rem, 1vw + 0.3rem, 1.1rem);
    padding: 0.85rem 2.5rem;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.cta-btn:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.cta-btn:focus {
    box-shadow: 0 0 0 4px rgba(255,255,255,.3);
}
.cta-btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.5);
    font-weight: 600;
    font-size: clamp(0.95rem, 1vw + 0.3rem, 1.1rem);
    padding: 0.85rem 2.5rem;
    margin-left: 0.75rem;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.cta-btn-outline:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
.cta-btn-outline:focus {
    box-shadow: 0 0 0 4px rgba(255,255,255,.3);
}
@media (max-width: 576px) {
    .cta-card {
        border-radius: 16px;
    }
    .cta-heading br { display: none; }
    .cta-btn,
    .cta-btn-outline {
        display: block;
        width: 100%;
        text-align: center;
    }
    .cta-btn-outline {
        margin-left: 0;
        margin-top: 0.75rem;
    }
}

/* --- Quote Modal --- */
.quote-modal-dialog {
    max-width: 620px;
    margin: 1rem auto;
}
.quote-modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,.35);
    background: #fff;
}
.quote-modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e3a8a 40%, #172554 100%);
    color: #fff;
    padding: 1.5rem 1.75rem 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}
.quote-modal-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0v60M0 30h60' stroke='%23ffffff' stroke-opacity='.06' fill='none'/%3E%3C/svg%3E");
    pointer-events: none;
}
.quote-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    position: relative;
    z-index: 1;
}
.quote-modal-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,.75);
    margin: 0.3rem 0 0;
    position: relative;
    z-index: 1;
}
.quote-modal-header .btn-close-white {
    position: relative;
    z-index: 1;
    margin-top: 0.15rem;
}
.quote-modal-body {
    padding: 0;
    background: #f8fafc;
}
.quote-modal-body iframe {
    width: 100%;
    height: 720px;
    border: none;
    display: block;
}
@media (max-width: 576px) {
    .quote-modal-dialog {
        max-width: 100%;
        margin: 0.5rem;
    }
    .quote-modal-content {
        border-radius: 14px;
    }
    .quote-modal-body iframe {
        height: 600px;
    }
}

/* --- Footer --- */
.site-footer {
    padding: 20px 0;
    border-top: 1px solid var(--border);
    background: #fff;
}
.site-footer a {
    text-decoration: none;
}
.site-footer a:hover {
    color: var(--primary) !important;
}
footer a {
    text-decoration: none;
}
footer a:hover {
    color: var(--primary) !important;
}

/* --- Responsive --- */

/* ── Tablet (≤ 991px) ── */
@media (max-width: 991.98px) {
    /* Navbar: fixed with blue background on mobile */
    .navbar {
        position: fixed;
        background: #1e3a8a;
        border-bottom: 1px solid rgba(255,255,255,.1);
        box-shadow: 0 1px 8px rgba(0,0,0,.2);
    }
    body.sale-banner-visible .navbar {
        top: 38px;
    }
    /* Hero padding must account for fixed navbar */
    .hero-section {
        min-height: 100vh;
        padding-top: calc(120px + env(safe-area-inset-top, 0px));
    }
    /* Hero blob doesn't overflow on tablets */
    .hero-section::after {
        width: 350px;
        height: 350px;
        right: -15%;
        top: -30%;
    }

}

/* ── Offcanvas side menu overrides ── */
.offcanvas.offcanvas-end {
    width: min(320px, 85vw);
    background: linear-gradient(180deg, #1e3a8a 0%, #172554 100%);
    border-left: 1px solid rgba(255,255,255,.1);
    color: #fff;
}
.offcanvas-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.offcanvas-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: .7;
}
.offcanvas-header .btn-close:hover {
    opacity: 1;
}
.offcanvas-header .brand-logo-img {
    filter: brightness(0) invert(1) !important;
}
.offcanvas-header .brand-studio {
    color: rgba(255,255,255,.6);
}
.offcanvas-body {
    padding: 24px;
}
.offcanvas-body .navbar-nav {
    flex-direction: column;
}
.offcanvas-body .nav-link {
    padding: 14px 0 !important;
    font-size: 1.05rem !important;
    font-weight: 500;
    color: rgba(255,255,255,.75) !important;
    border-bottom: 1px solid rgba(255,255,255,.1);
    transition: var(--transition);
}
.offcanvas-body .nav-link:hover,
.offcanvas-body .nav-link.active {
    color: #fff !important;
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
    /* Increase card grid gaps on mobile */
    .row.g-4 {
        --bs-gutter-y: 2rem;
        --bs-gutter-x: 1.5rem;
    }

    .hero-section {
        min-height: 100vh;
        padding: 130px 16px 0;
    }
    /* Hero text: tighter, full width */
    .hero-section h1 { font-size: clamp(1.75rem, 7vw, 2.4rem); }
    .hero-section .lead { max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
    .hero-section .btn-lg {
        font-size: 1rem;
        padding: .85rem 2rem;
        width: auto;
    }
    .hero-stats {
        gap: 12px;
    }
    .hero-stat-sep { display: none; }
    .hero-stats .hero-stat {
        flex: 0 0 auto;
    }

    /* Customizer responsive */
    .customizer-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .customizer-layout.panel-collapsed {
        grid-template-columns: 1fr;
        grid-template-rows: 48px 1fr;
    }
    .customizer-panel {
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .customizer-panel.collapsed {
        max-height: 48px;
        min-height: 48px;
    }

    /* Hero benefits bar on mobile */
    .hero-filter-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-benefit {
        padding: 14px 12px;
        gap: 10px;
    }
    .hero-benefit > i {
        font-size: 18px;
    }
    .hero-benefit strong {
        font-size: 13px;
    }
    .hero-benefit span {
        font-size: 11px;
    }

    /* Filter toolbar */
    .filter-toolbar { gap: 10px; }
    .filter-divider { display: none; }
    .filter-toolbar-left { width: 100%; }
    .filter-toolbar-right { width: 100%; justify-content: space-between; }
    .filter-pills {
        flex-wrap: nowrap; gap: 6px;
        overflow-x: auto; -webkit-overflow-scrolling: touch;
        scrollbar-width: none; padding-bottom: 4px;
    }
    .filter-pills::-webkit-scrollbar { display: none; }
    .filter-sort-select { flex: 1; }

    /* Template cards */
    .template-info {
        padding: 14px;
    }
    .template-info > .d-flex:first-child {
        flex-direction: column;
        gap: 4px;
    }
    .template-info .d-flex.flex-wrap {
        flex-direction: row;
    }
    .template-price {
        font-size: 1rem;
    }
    .template-name {
        font-size: .95rem;
    }
    .template-desc {
        font-size: .8rem;
    }
    .template-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .template-meta .d-flex {
        flex-wrap: wrap;
    }
    .template-info .badge.rounded-pill {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }
    .template-card-actions {
        flex-wrap: wrap;
        padding: 10px 12px 14px;
        gap: 6px;
    }
    .template-action-btn {
        font-size: .78rem;
        padding: .45rem .5rem;
        flex: 1 1 auto;
        min-width: 0;
    }
    /* Make "Details" take full row on tiny screens, Preview+Customise+Share share row */
    .template-card-actions .template-action-btn:first-child {
        flex: 0 0 100%;
    }
    .share-icon { width: 26px; height: 26px; }
    .share-icon svg { width: 14px; height: 14px; }

    /* Steps */
    .steps-row { flex-direction: column; align-items: center; gap: 24px; }
    .step-connector { transform: rotate(90deg); padding-top: 0; }
    .step-card { padding: 20px 16px; }

    /* Pricing */
    .pricing-card {
        padding: 24px 20px;
    }
    .pricing-amount {
        font-size: 1.75rem;
    }
    .pricing-ribbon {
        font-size: .55rem;
        padding: 4px 36px;
        top: 18px;
        right: -36px;
    }

    /* FAQ */
    .faq-section {
        padding: 50px 0;
    }
    .faq-trigger {
        padding: 14px 16px;
        gap: 10px;
    }
    .faq-icon {
        width: 32px; height: 32px;
        border-radius: 8px;
        font-size: 14px;
    }
    .faq-q {
        font-size: 14px;
    }
    .faq-answer {
        padding: 0 16px 0 58px;
    }
    .faq-item.open .faq-answer {
        padding: 0 16px 16px 58px;
    }

    /* CTA strip uses clamp padding — no override needed */

    /* Section headings use clamp — no overrides needed */

    /* Modal detail — fullscreen on mobile */
    .modal-dialog {
        margin: 10px;
    }
    .modal-dialog.modal-lg {
        margin: 0;
        max-width: 100%;
        min-height: 100%;
    }
    .modal-dialog.modal-lg .modal-content {
        border-radius: 0 !important;
        min-height: 100vh;
    }
    /* Modal price + heading responsive */
    .modal-dialog.modal-lg .fw-800 { font-size: 20px !important; }
    .modal-dialog.modal-lg .d-flex.align-items-baseline span[style*='font-size: 36px'] {
        font-size: 28px !important;
    }
    .modal-dialog.modal-lg .d-flex.align-items-baseline span[style*='font-size: 20px'] {
        font-size: 16px !important;
    }
}

/* ── Small phone (≤ 480px) ── */
@media (max-width: 480px) {
    .hero-section {
        padding: 105px 14px 32px;
    }
    .hero-section h1 { font-size: clamp(1.55rem, 6.5vw, 2rem); }
    /* h1, .lead, stat-num, stat-label all use clamp — no overrides needed */
    .hero-stats {
        gap: 8px;
        justify-content: center;
    }

    /* Tighter container side padding */
    .container-fluid.px-4 { padding-left: 12px !important; padding-right: 12px !important; }

    /* Template cards — single column tweaks */
    .template-card-actions {
        padding: 8px 10px 12px;
    }
    .template-action-btn {
        font-size: .75rem;
        padding: .4rem .4rem;
    }
    .template-card-actions .template-action-btn:first-child {
        flex: 1 1 auto;
    }
    .share-icon { width: 24px; height: 24px; }
    .share-icon svg { width: 13px; height: 13px; }

    /* Filter pills tighter */
    .filter-pill {
        font-size: 12px;
        padding: 5px 10px;
    }
    .filter-count {
        font-size: 12px;
    }

    /* FAQ tighter on small screens */
    .faq-answer {
        padding: 0 14px 0 14px;
    }
    .faq-item.open .faq-answer {
        padding: 0 14px 14px 14px;
    }
    .faq-q {
        font-size: 13px;
    }
    .faq-answer p {
        font-size: 13px;
    }

    /* Pricing */
    .pricing-amount {
        font-size: 1.5rem;
    }
    .pricing-features li {
        font-size: .85rem;
        padding: 8px 0;
    }

    /* Footer */
    .site-footer .container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    /* Trust badges wrap better */
    .trust-bar {
        gap: 6px;
    }
    .trust-badge {
        font-size: 11px;
        padding: 5px 8px;
    }

    /* Sale banner tighter */
    .sale-banner { padding: 12px 14px; margin-top: -16px; border-radius: 12px; max-width: 95%; }
    .sale-megaphone { font-size: 22px; }
    .sale-text { font-size: 12px; }
    .sale-percent-badge { font-size: 11px; padding: 4px 8px; }
    .sale-shop-btn { font-size: 11px; padding: 5px 12px; }
}

/* ── Prevent horizontal overflow ── */
html { overflow-x: hidden; }
@media (max-width: 768px) {
    body { overflow-x: hidden; }
    img, video, iframe, svg { max-width: 100%; }
    * { overflow-wrap: break-word; word-wrap: break-word; }
}

/* ── Touch device: disable hover transforms to prevent sticky hovers ── */
@media (hover: none) {
    .template-card:hover { transform: none; box-shadow: 0 2px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06); }
    .template-action-btn:hover { transform: none; }
    .filter-pill:hover { color: var(--text-muted); border-color: var(--border); background: var(--bg); }
    .filter-pill.active:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
}

/* ── Sale price responsive on cards ── */
@media (max-width: 768px) {
    .sale-price-wrap { flex-wrap: wrap; gap: 4px; }
    .sale-price-wrap .price-original { font-size: 12px; }
    .sale-price-wrap .price-sale { font-size: 15px; }
    .sale-badge { font-size: 9px; padding: 2px 5px; }
}

/* ── Enquiry modal fullscreen on small screens ── */
@media (max-width: 575.98px) {
    #enquiryModal .modal-dialog {
        margin: 0; max-width: 100%; min-height: 100%;
    }
    #enquiryModal .modal-content {
        border-radius: 0 !important; min-height: 100vh;
    }
}

/* --- Admin Panel Styles --- */
.admin-sidebar {
    width: 250px;
    min-height: 100vh;
    background: var(--text);
    color: white;
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: width .5s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,.7) !important;
    padding: 10px 24px;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    transition: padding .5s cubic-bezier(.4,0,.2,1), font-size .5s cubic-bezier(.4,0,.2,1);
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white !important;
    background: rgba(255,255,255,.1);
}
.admin-sidebar .sidebar-brand { white-space: nowrap; overflow: hidden; transition: opacity .4s cubic-bezier(.4,0,.2,1); }
.admin-sidebar .sidebar-user { white-space: nowrap; overflow: hidden; transition: opacity .4s cubic-bezier(.4,0,.2,1); }
.sidebar-toggle {
    position: absolute; top: 12px; right: 10px; background: none; border: none;
    color: rgba(255,255,255,.5); font-size: 18px; cursor: pointer; padding: 4px 6px;
    border-radius: 6px; transition: all .2s ease; z-index: 10;
}
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,.1); }

/* Sidebar bottom area */
.sidebar-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-bottom-link { transition: padding .5s cubic-bezier(.4,0,.2,1), font-size .5s cubic-bezier(.4,0,.2,1); }
.sidebar-bottom-user { transition: padding .5s cubic-bezier(.4,0,.2,1); }
.sidebar-label { transition: opacity .4s cubic-bezier(.4,0,.2,1), font-size .4s cubic-bezier(.4,0,.2,1), width .4s cubic-bezier(.4,0,.2,1); white-space: nowrap; }

/* Collapsed state — desktop */
.admin-sidebar.collapsed { width: 60px; }
.admin-sidebar.collapsed .sidebar-brand,
.admin-sidebar.collapsed hr { opacity: 0; pointer-events: none; }
.admin-sidebar.collapsed .nav-link { padding: 10px 0; text-align: center; font-size: 0; }
.admin-sidebar.collapsed .nav-link i { font-size: 18px; margin: 0 !important; display: block; }
.admin-sidebar.collapsed .sidebar-toggle { right: 50%; transform: translateX(50%); }
.admin-sidebar.collapsed .sidebar-label { opacity: 0; font-size: 0; width: 0; overflow: hidden; }
.admin-sidebar.collapsed .sidebar-bottom-link { padding: 10px 0; text-align: center; font-size: 0; }
.admin-sidebar.collapsed .sidebar-bottom-link i { font-size: 18px; margin: 0 !important; display: block; }
.admin-sidebar.collapsed .sidebar-bottom-user { padding: 8px 0; text-align: center; justify-content: center; }
.admin-sidebar.collapsed .sidebar-bottom-user .d-flex { justify-content: center; }
.admin-sidebar.collapsed .sidebar-bottom-user i { margin: 0 !important; }
.admin-content {
    margin-left: 250px;
    padding: 24px;
    min-height: 100vh;
    background: var(--bg-light);
    transition: margin-left .5s cubic-bezier(.4,0,.2,1);
}
body.sidebar-collapsed .admin-content { margin-left: 60px; }

/* Sidebar backdrop — mobile overlay */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 999;
    opacity: 0;
    transition: opacity .3s ease;
}
.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* ── Mobile / Tablet sidebar (≤991px) ── */
@media (max-width: 991.98px) {
    .admin-sidebar {
        width: 270px;
        transform: translateX(-100%);
        transition: transform .3s cubic-bezier(.4,0,.2,1);
        z-index: 1001;
    }
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    .admin-sidebar.collapsed {
        width: 270px;
        transform: translateX(-100%);
    }
    .admin-sidebar.collapsed.mobile-open {
        transform: translateX(0);
    }
    .admin-sidebar.collapsed .sidebar-brand,
    .admin-sidebar.collapsed .sidebar-bottom,
    .admin-sidebar.collapsed .sidebar-label,
    .admin-sidebar.collapsed hr { opacity: 1; pointer-events: auto; }
    .admin-sidebar.collapsed .nav-link { padding: 10px 24px; text-align: left; font-size: .9rem; }
    .admin-sidebar.collapsed .nav-link i { font-size: inherit; margin-right: .5rem !important; display: inline; }
    .admin-sidebar.collapsed .sidebar-label { font-size: inherit; width: auto; overflow: visible; }
    .admin-sidebar.collapsed .sidebar-bottom-link { padding: 10px 24px; text-align: left; font-size: .9rem; }
    .admin-sidebar.collapsed .sidebar-bottom-link i { font-size: inherit; margin-right: .5rem !important; display: inline; }
    .admin-sidebar.collapsed .sidebar-bottom-user { padding: 8px 24px; text-align: left; }
    .admin-sidebar.collapsed .sidebar-bottom-user .d-flex { justify-content: flex-start; }
    .admin-sidebar.collapsed .sidebar-bottom-user i { margin-right: .5rem !important; }
    .admin-sidebar.collapsed .sidebar-toggle { right: 10px; transform: none; }
    .admin-content {
        margin-left: 0 !important;
        padding: 16px;
    }
    .admin-header {
        margin: -16px -16px 16px;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .sidebar-toggle-mobile {
        background: none;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 6px 10px;
        font-size: 20px;
        cursor: pointer;
        color: var(--text);
        flex-shrink: 0;
        line-height: 1;
    }
    .sidebar-toggle-mobile:hover {
        background: var(--bg-light);
    }
}
@media (min-width: 992px) {
    .sidebar-toggle-mobile { display: none !important; }
}
.admin-header {
    padding: 16px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    margin: -24px -24px 24px;
}
.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.stat-card h3 {
    font-weight: 700;
    font-size: 2rem;
    margin: 0;
}
.stat-card p {
    color: var(--text-muted);
    font-size: .85rem;
    margin: 4px 0 0;
}

/* ── Enquiry modal ── */
.enquire-btn {
    border-color: #22c55e !important;
    color: #22c55e !important;
    transition: all .2s ease;
}
.enquire-btn:hover {
    background: #22c55e !important;
    color: #fff !important;
    border-color: #22c55e !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34,197,94,.25);
}
#enquiryModal .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
#enquiryModal .form-label {
    color: #475569;
}
@media (max-width: 575.98px) {
    .enquire-btn .bi { margin-right: 0 !important; }
    .enquire-btn { font-size: 12px; padding: 3px 8px; }
}
