/* ============================================================
   Castle Template Preview — Ultra-Professional Designs
   ============================================================ */

/* --- Google Fonts (loaded inline in render) --- */
.tpl-preview-body {
    margin: 0;
    font-family: 'Poppins', 'Nunito', system-ui, -apple-system, Segoe UI, sans-serif;
    background: var(--tpl-bg, #f8fafc);
    color: var(--tpl-text, #1e293b);
    -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }

/* --- CSS Variables per theme --- */
.theme-bouncy_castle_classic {
    --tpl-primary: #1d4ed8;
    --tpl-primary-dark: #1e3a8a;
    --tpl-primary-light: #dbeafe;
    --tpl-accent: #f59e0b;
    --tpl-accent-light: #fef3c7;
    --tpl-hero-from: #1e3a8a;
    --tpl-hero-to: #2563eb;
    --tpl-hero-text: #fff;
    --tpl-card-top: #1d4ed8;
    --tpl-badge-bg: #dbeafe;
    --tpl-badge-text: #1e3a8a;
    --tpl-nav-bg: #1e3a8a;
    --tpl-footer-bg: #0f172a;
    --tpl-bg: #f8fafc;
    --tpl-trust-bg: #f0f7ff;
    --tpl-section-alt: #eff6ff;
}
.theme-soft_play_bright {
    --tpl-primary: #db2777;
    --tpl-primary-dark: #9d174d;
    --tpl-primary-light: #fce7f3;
    --tpl-accent: #7c3aed;
    --tpl-accent-light: #ede9fe;
    --tpl-hero-from: #be185d;
    --tpl-hero-to: #7c3aed;
    --tpl-hero-text: #fff;
    --tpl-card-top: #db2777;
    --tpl-badge-bg: #fce7f3;
    --tpl-badge-text: #9d174d;
    --tpl-nav-bg: #9d174d;
    --tpl-footer-bg: #1e1b4b;
    --tpl-bg: #fff7fb;
    --tpl-trust-bg: #fdf4ff;
    --tpl-section-alt: #fce7f3;
}
.theme-party_hire_pro {
    --tpl-primary: #7c3aed;
    --tpl-primary-dark: #4c1d95;
    --tpl-primary-light: #ede9fe;
    --tpl-accent: #f97316;
    --tpl-accent-light: #ffedd5;
    --tpl-hero-from: #312e81;
    --tpl-hero-to: #7c3aed;
    --tpl-hero-text: #fff;
    --tpl-card-top: #7c3aed;
    --tpl-badge-bg: #ede9fe;
    --tpl-badge-text: #4c1d95;
    --tpl-nav-bg: #312e81;
    --tpl-footer-bg: #1e1b4b;
    --tpl-bg: #fafafe;
    --tpl-trust-bg: #f5f3ff;
    --tpl-section-alt: #ede9fe;
}
.theme-inflatable_fun {
    --tpl-primary: #ea580c;
    --tpl-primary-dark: #c2410c;
    --tpl-primary-light: #ffedd5;
    --tpl-accent: #facc15;
    --tpl-accent-light: #fefce8;
    --tpl-hero-from: #c2410c;
    --tpl-hero-to: #f97316;
    --tpl-hero-text: #fff;
    --tpl-card-top: #ea580c;
    --tpl-badge-bg: #ffedd5;
    --tpl-badge-text: #9a3412;
    --tpl-nav-bg: #7c2d12;
    --tpl-footer-bg: #1c1917;
    --tpl-bg: #fffbf5;
    --tpl-trust-bg: #fff7ed;
    --tpl-section-alt: #ffedd5;
}
.theme-premium_castle_hire {
    --tpl-primary: #0f766e;
    --tpl-primary-dark: #134e4a;
    --tpl-primary-light: #ccfbf1;
    --tpl-accent: #d97706;
    --tpl-accent-light: #fef3c7;
    --tpl-hero-from: #042f2e;
    --tpl-hero-to: #0f766e;
    --tpl-hero-text: #fff;
    --tpl-card-top: #0f766e;
    --tpl-badge-bg: #ccfbf1;
    --tpl-badge-text: #134e4a;
    --tpl-nav-bg: #042f2e;
    --tpl-footer-bg: #042f2e;
    --tpl-bg: #f0fdfa;
    --tpl-trust-bg: #f0fdf9;
    --tpl-section-alt: #ccfbf1;
}
.theme-kids_party_website {
    --tpl-primary: #d97706;
    --tpl-primary-dark: #92400e;
    --tpl-primary-light: #fef3c7;
    --tpl-accent: #10b981;
    --tpl-accent-light: #d1fae5;
    --tpl-hero-from: #dc2626;
    --tpl-hero-to: #f59e0b;
    --tpl-hero-text: #fff;
    --tpl-card-top: #d97706;
    --tpl-badge-bg: #fef3c7;
    --tpl-badge-text: #92400e;
    --tpl-nav-bg: #92400e;
    --tpl-footer-bg: #1c1917;
    --tpl-bg: #fffbeb;
    --tpl-trust-bg: #fffde7;
    --tpl-section-alt: #fef3c7;
}

/* --- Demo banner --- */
.tpl-demo-banner {
    background: var(--tpl-accent, #f59e0b);
    color: #000;
    text-align: center;
    padding: .45rem 1rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
    position: sticky;
    top: 0;
    z-index: 100;
}
.tpl-demo-banner.customer-mode {
    background: #4f46e5;
    color: #fff;
}

/* --- Navigation --- */
.tpl-header {
    background: var(--tpl-nav-bg, #1e3a8a);
    position: sticky;
    top: 2.25rem;
    z-index: 90;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.tpl-wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.tpl-header .tpl-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: .75rem;
    padding-bottom: .75rem;
    flex-wrap: wrap;
}
.tpl-brand {
    display: flex;
    gap: .6rem;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.tpl-logo {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.tpl-brand-text strong {
    display: block;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.01em;
    white-space: nowrap;
}
.tpl-brand-text span {
    display: block;
    color: rgba(255,255,255,.65);
    font-size: .72rem;
    white-space: nowrap;
}
.tpl-nav {
    display: flex;
    gap: .15rem;
    flex-wrap: wrap;
    margin-left: auto;
}
.tpl-nav a, .tpl-nav span {
    color: rgba(255,255,255,.8);
    font-size: .82rem;
    font-weight: 500;
    padding: .4rem .7rem;
    border-radius: 5px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
    cursor: default;
}
.tpl-nav span.active,
.tpl-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.15);
    font-weight: 700;
}
.tpl-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    letter-spacing: .01em;
    white-space: nowrap;
    transition: transform .1s, box-shadow .1s, opacity .15s;
}
.tpl-btn:hover { transform: translateY(-1px); opacity: .92; }
.tpl-btn-primary {
    background: var(--tpl-accent, #f59e0b);
    color: #000;
    box-shadow: 0 3px 10px rgba(0,0,0,.25);
}
.tpl-btn-secondary {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,.45);
}
.tpl-btn-outline {
    background: transparent;
    color: var(--tpl-primary, #1d4ed8);
    border: 2px solid var(--tpl-primary, #1d4ed8);
}
.tpl-btn-ghost {
    background: var(--tpl-primary-light, #dbeafe);
    color: var(--tpl-primary-dark, #1e3a8a);
}
.tpl-btn-lg { padding: .85rem 2rem; font-size: 1rem; }

/* --- Hero --- */
.tpl-hero {
    background: linear-gradient(135deg, var(--tpl-hero-from, #1e3a8a), var(--tpl-hero-to, #2563eb));
    color: var(--tpl-hero-text, #fff);
    padding: 5rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.tpl-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}
.tpl-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    padding: .3rem .9rem;
    border-radius: 50px;
    margin-bottom: 1.25rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,.3);
}
.tpl-hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 900;
    margin: 0 0 .75rem;
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.tpl-hero-sub {
    font-size: 1.1rem;
    opacity: .9;
    max-width: 580px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}
.tpl-hero-area {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    opacity: .8;
    background: rgba(0,0,0,.15);
    border-radius: 50px;
    padding: .3rem .85rem;
    margin-bottom: 1.75rem;
}
.tpl-hero-actions {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}
.tpl-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    line-height: 0;
}

/* --- Stats bar --- */
.tpl-stats {
    background: var(--tpl-primary-dark, #1e3a8a);
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}
.tpl-stat {
    padding: 1rem 2rem;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,.12);
    flex: 1;
    min-width: 120px;
}
.tpl-stat:last-child { border-right: none; }
.tpl-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--tpl-accent, #f59e0b);
}
.tpl-stat span { font-size: .75rem; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }

/* --- Section headings --- */
.tpl-section { padding: 4rem 1.5rem; }
.tpl-section-alt { background: var(--tpl-section-alt, #eff6ff); }
.tpl-section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}
.tpl-section-title h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--tpl-primary-dark, #1e3a8a);
    margin: 0 0 .5rem;
}
.tpl-section-title p {
    color: #64748b;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}
.tpl-section-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .72rem;
    font-weight: 700;
    color: var(--tpl-primary, #1d4ed8);
    margin-bottom: .35rem;
}

/* --- Product cards --- */
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.tpl-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.tpl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.12);
}
.tpl-card-img {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--tpl-primary-light, #dbeafe), var(--tpl-accent-light, #fef3c7));
    font-size: 3.5rem;
    line-height: 1;
}
.tpl-card-img.cat-bouncy { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.tpl-card-img.cat-soft   { background: linear-gradient(135deg, #fce7f3, #f9a8d4); }
.tpl-card-img.cat-slide  { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.tpl-card-img.cat-party  { background: linear-gradient(135deg, #ede9fe, #c4b5fd); }
.tpl-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.tpl-card-body h3 {
    margin: 0 0 .35rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--tpl-primary-dark, #1e3a8a);
}
.tpl-card-body p { color: #64748b; font-size: .88rem; line-height: 1.5; margin: 0 0 .75rem; flex: 1; }
.tpl-card-price {
    display: flex;
    align-items: baseline;
    gap: .25rem;
    margin-bottom: .75rem;
}
.tpl-card-price strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--tpl-primary, #1d4ed8);
}
.tpl-card-price span { font-size: .8rem; color: #94a3b8; }
.tpl-card-tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .75rem; }
.tpl-tag {
    font-size: .7rem;
    font-weight: 600;
    background: var(--tpl-badge-bg, #dbeafe);
    color: var(--tpl-badge-text, #1e3a8a);
    padding: .15rem .5rem;
    border-radius: 50px;
}
.tpl-card a, .tpl-card button {
    display: inline-block;
    background: var(--tpl-primary, #1d4ed8);
    color: #fff;
    padding: .55rem 1rem;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    text-align: center;
}
.tpl-card a:hover { opacity: .9; }

/* --- Category blocks (home) --- */
.tpl-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}
.tpl-cat-card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,.07);
    text-align: center;
    padding: 2rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
    border-top: 4px solid var(--tpl-card-top, #1d4ed8);
    transition: transform .2s, box-shadow .2s;
}
.tpl-cat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.1); }
.tpl-cat-icon { font-size: 2.75rem; line-height: 1; }
.tpl-cat-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--tpl-primary-dark, #1e3a8a);
}
.tpl-cat-card p { font-size: .82rem; color: #64748b; margin: 0; line-height: 1.5; }
.tpl-cat-card a {
    margin-top: auto;
    font-size: .8rem;
    font-weight: 700;
    color: var(--tpl-primary, #1d4ed8);
    text-decoration: none;
}

/* --- Trust / badges --- */
.tpl-trust { background: var(--tpl-trust-bg, #f0f7ff); padding: 2.5rem 1.5rem; }
.tpl-trust .tpl-wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; align-items: center; }
.tpl-trust-badge {
    display: flex;
    align-items: center;
    gap: .55rem;
    background: #fff;
    border-radius: 50px;
    padding: .6rem 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    font-size: .82rem;
    font-weight: 700;
    color: var(--tpl-primary-dark, #1e3a8a);
    white-space: nowrap;
}
.tpl-trust-badge span:first-child { font-size: 1.1rem; }

/* --- Why us section --- */
.tpl-why { max-width: 1200px; margin: 0 auto; }
.tpl-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 0;
}
.tpl-why-item { text-align: center; padding: 1.5rem 1rem; }
.tpl-why-icon {
    width: 64px;
    height: 64px;
    background: var(--tpl-badge-bg, #dbeafe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .85rem;
    font-size: 1.75rem;
}
.tpl-why-item h4 { margin: 0 0 .35rem; font-size: .95rem; font-weight: 700; color: var(--tpl-primary-dark, #1e3a8a); }
.tpl-why-item p { font-size: .82rem; color: #64748b; margin: 0; line-height: 1.5; }

/* --- Testimonials --- */
.tpl-reviews { background: var(--tpl-primary-dark, #1e3a8a); color: #fff; padding: 3.5rem 1.5rem; }
.tpl-reviews .tpl-section-title h2 { color: #fff; }
.tpl-reviews .tpl-section-title p { color: rgba(255,255,255,.7); }
.tpl-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}
.tpl-review {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 16px;
    padding: 1.5rem;
}
.tpl-review-stars { color: var(--tpl-accent, #f59e0b); font-size: 1rem; margin-bottom: .65rem; }
.tpl-review p { font-size: .9rem; line-height: 1.6; margin: 0 0 .85rem; opacity: .9; }
.tpl-review-author { font-size: .78rem; font-weight: 700; opacity: .7; }

/* --- Booking form --- */
.tpl-booking-section { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.tpl-booking-intro h2 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 800;
    color: var(--tpl-primary-dark, #1e3a8a);
    margin: 0 0 .75rem;
}
.tpl-booking-intro p { color: #475569; line-height: 1.65; margin: 0 0 1.25rem; }
.tpl-booking-checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: .45rem; }
.tpl-booking-checklist li {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .88rem;
    color: #475569;
}
.tpl-booking-checklist li::before {
    content: '✓';
    width: 20px;
    height: 20px;
    background: var(--tpl-accent-light, #fef3c7);
    color: var(--tpl-primary, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 900;
    flex-shrink: 0;
}
.tpl-booking-form {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
    display: grid;
    gap: 1rem;
    border-top: 5px solid var(--tpl-primary, #1d4ed8);
}
.tpl-booking-form h3 {
    margin: 0 0 .25rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--tpl-primary-dark, #1e3a8a);
}
.tpl-booking-form .tpl-form-sub { font-size: .8rem; color: #94a3b8; margin: 0 0 .25rem; }
.tpl-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.tpl-form-group { display: grid; gap: .35rem; }
.tpl-form-group label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--tpl-primary-dark, #1e3a8a);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.tpl-form-group input,
.tpl-form-group select,
.tpl-form-group textarea {
    padding: .65rem .9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: .88rem;
    color: #1e293b;
    width: 100%;
    background: #f8fafc;
    outline: none;
}
.tpl-form-group input:focus,
.tpl-form-group select:focus { border-color: var(--tpl-primary, #1d4ed8); background: #fff; box-shadow: 0 0 0 3px var(--tpl-primary-light, #dbeafe); }
.tpl-form-submit {
    background: var(--tpl-primary, #1d4ed8);
    color: #fff;
    border: none;
    padding: .9rem;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    letter-spacing: .02em;
}
.tpl-form-note { font-size: .72rem; color: #94a3b8; text-align: center; margin: -.25rem 0 0; }

/* --- Contact --- */
.tpl-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}
.tpl-contact-detail { display: flex; align-items: center; gap: .85rem; padding: 1.25rem; background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.06); margin-bottom: 1rem; }
.tpl-contact-icon { font-size: 1.5rem; width: 48px; height: 48px; background: var(--tpl-badge-bg, #dbeafe); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tpl-contact-label { font-size: .72rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; display: block; }
.tpl-contact-value { font-size: .95rem; font-weight: 700; color: var(--tpl-primary-dark, #1e3a8a); }
.tpl-map-placeholder { border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, var(--tpl-primary-light, #dbeafe), var(--tpl-accent-light, #fef3c7)); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; font-size: 3rem; flex-direction: column; gap: .5rem; }
.tpl-map-placeholder span { font-size: .85rem; color: #64748b; }

/* --- Packages page --- */
.tpl-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.tpl-pkg-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    position: relative;
}
.tpl-pkg-card.featured { border: 2px solid var(--tpl-primary, #1d4ed8); }
.tpl-pkg-header {
    padding: 1.75rem 1.5rem 1.25rem;
    background: linear-gradient(135deg, var(--tpl-hero-from, #1e3a8a), var(--tpl-hero-to, #2563eb));
    color: #fff;
    text-align: center;
}
.tpl-pkg-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--tpl-accent, #f59e0b);
    color: #000;
    font-size: .65rem;
    font-weight: 800;
    padding: .2rem .6rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.tpl-pkg-header h3 { margin: 0 0 .25rem; font-size: 1.15rem; font-weight: 800; }
.tpl-pkg-price { font-size: 2rem; font-weight: 900; color: var(--tpl-accent, #f59e0b); }
.tpl-pkg-price span { font-size: .8rem; opacity: .7; }
.tpl-pkg-body { padding: 1.25rem 1.5rem; flex: 1; }
.tpl-pkg-includes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.tpl-pkg-includes li { display: flex; align-items: flex-start; gap: .5rem; font-size: .85rem; color: #475569; }
.tpl-pkg-includes li::before { content: '✓'; color: var(--tpl-primary, #1d4ed8); font-weight: 900; flex-shrink: 0; margin-top: .05em; }
.tpl-pkg-footer { padding: 1rem 1.5rem 1.5rem; }
.tpl-pkg-footer a, .tpl-pkg-footer button {
    display: block;
    text-align: center;
    background: var(--tpl-primary, #1d4ed8);
    color: #fff;
    padding: .8rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    width: 100%;
}

/* --- CTA Banner --- */
.tpl-cta-banner {
    background: linear-gradient(135deg, var(--tpl-hero-from, #1e3a8a), var(--tpl-hero-to, #2563eb));
    color: #fff;
    text-align: center;
    padding: 4rem 1.5rem;
}
.tpl-cta-banner h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 900; margin: 0 0 .75rem; }
.tpl-cta-banner p { opacity: .85; max-width: 560px; margin: 0 auto 1.75rem; line-height: 1.6; }

/* --- Footer --- */
.tpl-footer {
    background: var(--tpl-footer-bg, #0f172a);
    color: rgba(255,255,255,.6);
    padding: 2.5rem 1.5rem 1.5rem;
}
.tpl-footer .tpl-wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.tpl-footer-brand strong { display: block; color: #fff; font-size: 1rem; font-weight: 800; margin-bottom: .35rem; }
.tpl-footer-brand p { font-size: .8rem; line-height: 1.6; max-width: 280px; }
.tpl-footer-col h4 { color: #fff; font-size: .85rem; font-weight: 700; margin: 0 0 .65rem; text-transform: uppercase; letter-spacing: .06em; }
.tpl-footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.tpl-footer-col ul li a, .tpl-footer-col ul li span { font-size: .8rem; color: rgba(255,255,255,.55); text-decoration: none; }
.tpl-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 2rem; padding-top: 1rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .75rem; }

/* --- Page layout container --- */
.tpl-main { min-height: 60vh; }

/* --- Responsive --- */
@media (max-width: 720px) {
    .tpl-header .tpl-wrap { gap: .75rem; }
    .tpl-nav { display: none; }
    .tpl-hero { padding: 3rem 1.25rem 2.5rem; }
    .tpl-booking-section { grid-template-columns: 1fr; gap: 2rem; }
    .tpl-contact-grid { grid-template-columns: 1fr; }
    .tpl-footer .tpl-wrap { grid-template-columns: 1fr; gap: 1.5rem; }
    .tpl-form-row { grid-template-columns: 1fr; }
    .tpl-stats { flex-direction: column; }
}
@media (max-width: 480px) {
    .tpl-hero h1 { font-size: 1.75rem; }
    .tpl-hero-actions { flex-direction: column; }
    .tpl-hero-actions .tpl-btn { text-align: center; justify-content: center; }
}

/* ============================================================
   Template gallery + preview shell (used in signup/dashboard)
   ============================================================ */
.template-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}
.template-card {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    transition: box-shadow .2s, border-color .2s, transform .15s;
}
.template-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    transform: translateY(-2px);
}
.template-card.selected {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.2);
}
.template-card-thumb {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #e0e7ff, #fce7f3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.template-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpl-thumb-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    z-index: 1;
    /* hidden when img loads successfully */
}
.template-card-thumb img[style*="display:none"] ~ .tpl-thumb-fallback,
.template-card-thumb img:not([src]) ~ .tpl-thumb-fallback { display: flex; }
.template-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.template-card-body h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.template-best-for { font-size: .8rem; color: #64748b; }
.template-features { font-size: .78rem; color: #475569; }
.template-card-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: .75rem;
}
.preview-shell {
    display: grid;
    grid-template-rows: auto auto 1fr;
    min-height: 70vh;
}
.preview-shell--dashboard {
    min-height: calc(100vh - 4.5rem);
    margin: -1.5rem -1.75rem -1.5rem;
    background: #0f172a;
    grid-template-rows: auto 1fr;
}
.dashboard-content:has(.preview-shell--dashboard) {
    padding: 0;
    max-width: none;
}
.preview-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1rem 1.5rem;
    padding: .95rem 1.35rem;
    background: #0f172a;
    color: #fff;
    border-bottom: 1px solid rgba(148, 163, 184, .12);
}
.preview-toolbar-start {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .85rem 1.25rem;
    min-width: 0;
}
.preview-toolbar-title {
    margin: 0;
    font-size: .95rem;
    color: #e2e8f0;
    line-height: 1.4;
}
.preview-toolbar-title strong {
    color: #fff;
    font-weight: 700;
}
.preview-toolbar-title span {
    color: #cbd5e1;
    font-weight: 400;
}
.preview-back-link {
    color: #93c5fd;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
}
.preview-back-link:hover {
    color: #bfdbfe;
    text-decoration: underline;
}
.preview-toolbar-center {
    display: flex;
    justify-content: center;
}
.preview-toolbar-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
}
.preview-device-btns {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    padding: .2rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .65);
    border: 1px solid rgba(148, 163, 184, .18);
}
.preview-device-btns button {
    background: transparent;
    color: #94a3b8;
    border: 0;
    padding: .48rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background .15s ease, color .15s ease;
}
.preview-device-btns button:hover:not(.active) {
    color: #e2e8f0;
    background: rgba(148, 163, 184, .12);
}
.preview-device-btns button.active {
    background: #6366f1;
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .35);
}
.preview-stage-btn,
.preview-apply-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: .62rem 1.15rem;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.preview-stage-btn {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .25);
}
.preview-stage-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .28);
}
.preview-apply-btn {
    background: #6366f1;
    color: #fff;
}
.preview-apply-btn:hover {
    background: #4f46e5;
}
.preview-page-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: .35rem;
    overflow-x: auto;
    padding: .55rem 1.35rem;
    background: #111827;
    border-bottom: 1px solid rgba(148, 163, 184, .1);
    scrollbar-width: thin;
}
.preview-page-tabs a {
    color: #94a3b8;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    padding: .38rem .72rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.preview-page-tabs a:hover {
    color: #e2e8f0;
    background: rgba(148, 163, 184, .12);
}
.preview-page-tabs a.active {
    background: #4338ca;
    color: #fff;
}
.preview-frame-wrap {
    background: #0f172a;
    padding: 1.1rem 1.35rem 1.35rem;
    display: flex;
    justify-content: center;
    align-items: stretch;
    overflow: auto;
    flex: 1;
    min-height: 0;
}
.preview-frame-shell {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100%;
}
.preview-frame {
    background: #fff;
    border: none;
    border-radius: 14px;
    box-shadow: 0 18px 70px rgba(0, 0, 0, .45);
    transition: max-width .25s ease, width .25s ease, height .25s ease;
    width: 100%;
    max-width: 100%;
    height: calc(100vh - 10.5rem);
    min-height: 520px;
    display: block;
}
.preview-frame.device-desktop {
    max-width: 100%;
    width: 100%;
}
.preview-frame.device-tablet {
    max-width: 768px;
    width: 768px;
}
.preview-frame.device-mobile {
    max-width: 390px;
    width: 390px;
}
@media (max-width: 1100px) {
    .preview-toolbar {
        grid-template-columns: 1fr;
        gap: .85rem;
    }
    .preview-toolbar-center,
    .preview-toolbar-end {
        justify-content: flex-start;
    }
}
@media (max-width: 768px) {
    .preview-shell--dashboard {
        margin: -1rem -1rem -1rem;
        min-height: calc(100vh - 4rem);
    }
    .preview-frame {
        height: calc(100vh - 15rem);
        min-height: 420px;
    }
}
.selected-template-summary {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}

/* --- Mobile preview navigation --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.tpl-nav-toggle,
.bcc-nav-toggle, .spb-nav-toggle, .php-nav-toggle, .if-nav-toggle, .pch-nav-toggle, .kpw-nav-toggle {
    display: none;
    margin-left: auto;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    border-radius: 8px;
    padding: .45rem .65rem;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
.tpl-mobile-menu,
.bcc-mobile-menu, .spb-mobile-menu, .php-mobile-menu, .if-mobile-menu, .pch-mobile-menu, .kpw-mobile-menu {
    display: none;
    flex-direction: column;
    gap: .25rem;
    width: 100%;
    padding: .5rem 0 0;
}
.tpl-mobile-menu:not([hidden]),
.bcc-mobile-menu:not([hidden]), .spb-mobile-menu:not([hidden]), .php-mobile-menu:not([hidden]),
.if-mobile-menu:not([hidden]), .pch-mobile-menu:not([hidden]), .kpw-mobile-menu:not([hidden]) {
    display: flex;
}
.tpl-mobile-menu a,
.tpl-mobile-menu span,
.bcc-mobile-menu a, .bcc-mobile-menu span,
.spb-mobile-menu a, .spb-mobile-menu span,
.php-mobile-menu a, .php-mobile-menu span,
.if-mobile-menu a, .if-mobile-menu span,
.pch-mobile-menu a, .pch-mobile-menu span,
.kpw-mobile-menu a, .kpw-mobile-menu span {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    padding: .55rem .75rem;
    border-radius: 6px;
    font-size: .88rem;
}
.tpl-mobile-menu a.active,
.tpl-mobile-menu span.active,
.bcc-mobile-menu a.active, .bcc-mobile-menu span.active,
.spb-mobile-menu a.active, .spb-mobile-menu span.active,
.php-mobile-menu a.active, .php-mobile-menu span.active,
.if-mobile-menu a.active, .if-mobile-menu span.active,
.pch-mobile-menu a.active, .pch-mobile-menu span.active,
.kpw-mobile-menu a.active, .kpw-mobile-menu span.active {
    background: rgba(255,255,255,.15);
    font-weight: 700;
}
.tpl-footer-bottom a,
.bcc-footer-bar a, .spb-footer-bar a, .php-footer-bar a,
.if-footer-bar a, .pch-footer-bar a, .kpw-footer-bar a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    margin-left: .75rem;
}
@media (max-width: 768px) {
    .tpl-nav,
    .bcc-nav, .spb-nav, .php-nav, .if-nav, .pch-nav, .kpw-nav {
        display: none !important;
    }
    .tpl-nav-toggle,
    .bcc-nav-toggle, .spb-nav-toggle, .php-nav-toggle, .if-nav-toggle, .pch-nav-toggle, .kpw-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .tpl-header .tpl-wrap,
    .bcc-header-inner, .spb-header-inner, .php-header-inner,
    .if-header-inner, .pch-header-inner, .kpw-header-inner {
        flex-wrap: wrap;
    }
}
