/* Theme variables: assets/css/themes/{terracotta|mint}.css */

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--color-ivory);
    color: var(--color-cocoa);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-terracotta);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: var(--color-terracotta-hover); }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-cocoa);
    line-height: 1.2;
    letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2.125rem); }

p { color: var(--color-grey-warm); }

/* ─── Layout ─── */

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container.narrow { max-width: 680px; }

/* ─── Site header (public) ─── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 247, 241, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 1140px;
    margin: 0 auto;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-cocoa);
    text-decoration: none;
}

.site-logo:hover { color: var(--color-cocoa); }

.site-logo__mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-rose), var(--color-sand));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1rem;
    box-shadow: var(--shadow-card);
}

.site-logo__text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-nav a:not(.btn) {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-grey-warm);
}

.site-nav a:not(.btn):hover { color: var(--color-cocoa); }

/* ─── Hero ─── */

.hero {
    padding: 4rem 0 5rem;
    background: var(--color-ivory);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero__eyebrow {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-sage);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
}

.hero__eyebrow i { margin-right: 0.4rem; }

.hero__content h1 {
    margin: 0 0 1.25rem;
}

.hero__accent {
    color: var(--color-rose);
    font-style: italic;
}

.hero__subline {
    font-size: 1.125rem;
    max-width: 520px;
    margin: 0 0 2rem;
}

.hero__actions { margin-top: 0; }

.hero__visual { display: flex; justify-content: center; }

.hero__image-frame {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4/5;
    border-radius: var(--radius-image);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: linear-gradient(145deg, var(--color-sand), var(--color-rose) 60%, var(--color-blue-soft));
    padding: 6px;
}

.hero__image-placeholder {
    width: 100%;
    height: 100%;
    border-radius: calc(var(--radius-image) - 6px);
    background: linear-gradient(160deg, var(--color-ivory), var(--color-sand));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--color-terracotta);
    opacity: 0.7;
}

/* ─── Sections ─── */

.section {
    padding: 5rem 0;
}

.section--sand {
    background: var(--color-sand);
}

.section--cta {
    background: linear-gradient(135deg, var(--color-sand) 0%, var(--color-ivory) 100%);
    padding: 4rem 0;
}

.section__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section__header h2 { margin: 0 0 0.75rem; }
.section__header p { margin: 0; font-size: 1.1rem; }

/* ─── Service cards ─── */

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.service-card {
    background: var(--color-white);
    border-radius: var(--radius-card);
    padding: 2.25rem;
    box-shadow: var(--shadow-soft);
    border-top: 4px solid var(--color-sage);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(59, 47, 42, 0.1);
}

.service-card--sage { border-top-color: var(--color-sage); }
.service-card--blue { border-top-color: var(--color-blue-soft); }
.service-card--rose { border-top-color: var(--color-rose); }

.service-card__icon {
    font-size: 28px;
    color: var(--color-terracotta);
    margin-bottom: 1.25rem;
    display: block;
}

.service-card h3 {
    margin: 0 0 0.75rem;
    font-size: 2rem;
}

.service-card p {
    margin: 0;
    font-size: 17px;
    line-height: 1.7;
}

/* ─── Trust ─── */

.trust-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.trust-lead { font-size: 1.1rem; margin-bottom: 1.5rem; }

.trust-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.trust-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    color: var(--color-grey-warm);
}

.trust-list i {
    color: var(--color-sage);
    margin-top: 0.2rem;
    width: 1.25rem;
    text-align: center;
}

.trust-card {
    background: var(--color-white);
    border-radius: var(--radius-card);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.trust-card i {
    font-size: 2rem;
    color: var(--color-rose);
    margin-bottom: 1rem;
}

.trust-card blockquote {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--color-cocoa);
    line-height: 1.5;
}

/* ─── CTA banner ─── */

.cta-banner {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.cta-banner h2 { margin: 0 0 0.75rem; }
.cta-banner p { margin: 0 0 2rem; font-size: 1.1rem; }

/* ─── Footer ─── */

.site-footer {
    background: var(--color-cocoa);
    color: rgba(255, 255, 255, 0.85);
    margin-top: auto;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding: 3rem 1.5rem;
    max-width: 1140px;
    margin: 0 auto;
}

.site-footer .site-logo__text {
    color: var(--color-white);
    font-size: 1.75rem;
}

.site-footer__claim {
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0 0;
    font-style: italic;
    font-family: var(--font-heading);
    font-size: 1.15rem;
}

.site-footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.site-footer__links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 15px;
}

.site-footer__links a:hover { color: var(--color-white); }
.site-footer__links i { margin-right: 0.5rem; color: var(--color-rose); }

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 0;
}

.site-footer__bottom small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.public-site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.public-site main { flex: 1; }

/* ─── Buttons ─── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 28px;
    border-radius: var(--radius-button);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background: var(--color-terracotta);
    color: var(--color-white);
    border-color: var(--color-terracotta);
    box-shadow: var(--btn-primary-shadow);
}

.btn-primary:hover {
    background: var(--color-terracotta-hover);
    border-color: var(--color-terracotta-hover);
    color: var(--color-white);
}

.btn-secondary {
    background: transparent;
    color: var(--color-cocoa);
    border-color: var(--color-rose);
}

.btn-secondary:hover {
    background: var(--rose-subtle);
    color: var(--color-cocoa);
    border-color: var(--color-rose);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-block { width: 100%; }

.btn-danger {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
}

.actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ─── Cards & forms ─── */

.card {
    background: var(--color-white);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-card);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
}

.brand h1 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--color-cocoa);
}

.tagline {
    color: var(--color-grey-warm);
    margin: 0.25rem 0 2rem;
    font-style: italic;
    font-family: var(--font-heading);
    font-size: 1.15rem;
}

label {
    display: block;
    margin-bottom: 1.1rem;
    color: var(--color-grey-warm);
    font-size: 14px;
    font-weight: 600;
}

label input, label select, label textarea {
    display: block;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.75rem 1rem;
    background: var(--color-ivory);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-input);
    color: var(--color-cocoa);
    font: inherit;
    font-weight: 400;
    transition: border-color 0.2s, box-shadow 0.2s;
}

label input:focus, label select:focus, label textarea:focus {
    outline: none;
    border-color: var(--color-sage);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

label textarea { min-height: 140px; resize: vertical; }

fieldset {
    border: 1px solid var(--border-line);
    border-radius: var(--radius-card);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--color-ivory);
}

legend {
    padding: 0 0.5rem;
    color: var(--color-terracotta);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0 1rem;
}

.checkbox-label {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    color: var(--color-cocoa);
    font-weight: 400;
}

.checkbox-label input {
    width: auto;
    margin-top: 0.3rem;
    accent-color: var(--color-terracotta);
}

/* ─── Alerts ─── */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-input);
    margin-bottom: 1.25rem;
    font-size: 15px;
}

.alert i { margin-top: 0.15rem; }

.alert-error {
    background: rgba(196, 92, 92, 0.1);
    border: 1px solid rgba(196, 92, 92, 0.3);
    color: #9E3B3B;
}

.alert-success {
    background: var(--sage-subtle);
    border: 1px solid var(--sage-muted);
    color: var(--status-success-text);
}

/* ─── Tables ─── */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-input);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-line);
}

th {
    color: var(--color-grey-warm);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--color-ivory);
}

tr:hover td { background: rgba(250, 247, 241, 0.6); }

.table-shootings th,
.table-shootings td {
    white-space: nowrap;
    vertical-align: middle;
}

.table-shootings .col-title {
    white-space: normal;
    min-width: 160px;
    max-width: 280px;
}

.table-shootings .col-status .badge {
    white-space: nowrap;
    display: inline-block;
}

.badge-status--geplant { background: rgba(122, 111, 104, 0.12); color: var(--color-grey-warm); }
.badge-status--aktiv_anmeldung_offen { background: var(--sage-muted); color: var(--status-success-text); }
.badge-status--aktiv_anmeldung_beendet { background: rgba(175, 199, 199, 0.35); color: var(--status-info-text); }
.badge-status--abgeschlossen { background: var(--accent-subtle); color: var(--color-terracotta); }
.badge-status--archiviert { background: rgba(59, 47, 42, 0.08); color: var(--color-cocoa); }

.registration-closed {
    max-width: 560px;
    margin: 2rem auto;
    text-align: center;
}

.registration-closed__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--rose-muted);
    color: var(--color-terracotta);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.25rem;
}

.registration-closed__message {
    font-size: 1.1rem;
    color: var(--color-cocoa);
    margin: 0 0 1rem;
}

.registration-choose__lead {
    font-size: 1.05rem;
    color: var(--color-cocoa);
    margin: 0 0 1.5rem;
}

.registration-choose__options {
    display: grid;
    gap: 1rem;
}

.registration-choose__option {
    display: block;
    padding: 1.25rem 1.5rem;
    background: var(--color-ivory);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-card);
    color: var(--color-cocoa);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.registration-choose__option:hover {
    border-color: var(--color-sage);
    box-shadow: var(--shadow-card);
    color: var(--color-cocoa);
}

.registration-choose__option strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.registration-choose__option span:last-child {
    font-size: 0.95rem;
    color: var(--color-grey-warm);
}

.registration-choose__icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--sage-subtle);
    color: var(--color-sage);
    margin-bottom: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-button);
    font-size: 12px;
    font-weight: 700;
    background: var(--accent-subtle);
    color: var(--color-terracotta);
}

/* ─── Stats (admin dashboard) ─── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--color-white);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.stat-card .number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-terracotta);
    line-height: 1;
}

.stat-card .label {
    color: var(--color-grey-warm);
    font-size: 13px;
    font-weight: 600;
    margin-top: 0.35rem;
}

/* ─── Admin layout ─── */

.app-body, .customer-body {
    background: var(--color-ivory);
}

.app-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--color-white);
    border-right: 1px solid var(--border-line);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-line);
    margin-bottom: 1rem;
}

.sidebar__brand h1 {
    font-size: 1.35rem;
    margin: 0;
    line-height: 1.2;
}

.sidebar__label {
    font-size: 12px;
    color: var(--color-grey-warm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sidebar__nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--color-grey-warm);
    font-size: 15px;
    font-weight: 600;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar__nav a i {
    width: 1.1rem;
    text-align: center;
    color: var(--color-sage);
}

.sidebar__nav a:hover,
.sidebar__nav a.active {
    color: var(--color-cocoa);
    background: var(--sage-hover-bg);
    border-left-color: var(--color-sage);
}

.sidebar__nav a.active i { color: var(--color-terracotta); }

.sidebar__logout {
    margin-top: auto;
    border-top: 1px solid var(--border-line);
    padding-top: 0.5rem !important;
}

.main-content {
    padding: 2rem 2.5rem;
    max-width: 1200px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.topbar h2 {
    margin: 0;
    font-size: 2rem;
}

/* ─── Customer area ─── */

.customer-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--border-line);
    box-shadow: var(--shadow-card);
}

.customer-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.customer-header__label {
    display: block;
    font-size: 12px;
    color: var(--color-sage);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.customer-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.customer-nav a:not(.btn) {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-grey-warm);
}

.customer-nav a:not(.btn).is-active {
    color: var(--color-terracotta);
}

.customer-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.card-header-row h3 { margin: 0; }

.form-hint-full {
    grid-column: 1 / -1;
    margin-top: -0.25rem;
}

.payment-info-card {
    border-left: 4px solid var(--color-sage);
}

.badge-invoice--versendet,
.badge-invoice--ueberfaellig {
    background: rgba(196, 120, 74, 0.15);
    color: var(--color-terracotta);
}

.badge-invoice--bezahlt {
    background: rgba(122, 143, 110, 0.2);
    color: var(--color-sage-dark, #5a6b52);
}

.badge-invoice--storniert {
    background: rgba(120, 120, 120, 0.15);
    color: var(--color-grey-warm);
}

.customer-main {
    padding: 2.5rem 0 4rem;
    min-height: calc(100vh - 180px);
}

.customer-footer {
    background: var(--color-sand);
    padding: 1.5rem 0;
    text-align: center;
}

.customer-footer p {
    margin: 0;
    font-size: 14px;
    color: var(--color-grey-warm);
}

.customer-footer i { color: var(--color-sage); margin-right: 0.4rem; }

/* ─── Auth pages ─── */

.auth-body {
    background: linear-gradient(160deg, var(--color-ivory) 0%, var(--color-sand) 100%);
    min-height: 100vh;
}

.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--color-white);
    border-radius: var(--radius-card);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.auth-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--sage-subtle);
    color: var(--color-sage);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin: 0 auto 1.25rem;
}

.auth-card h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
}

.auth-card__sub {
    font-size: 15px;
    margin: 0 0 1.5rem;
}

.auth-form { text-align: left; }

.auth-form__hint {
    margin: -0.25rem 0 1rem;
    font-size: 14px;
    text-align: right;
}

.auth-form__hint a { font-weight: 600; }

.auth-card__footer {
    margin: 1.5rem 0 0;
    font-size: 14px;
}

.auth-card__footer a { font-weight: 600; }

/* ─── Legal & meta ─── */

.legal-box {
    background: var(--color-ivory);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-input);
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    margin: 0.5rem 0 1rem;
    font-size: 15px;
}

.legal-document-body {
    background: var(--color-ivory);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-input);
    padding: 1.75rem;
    line-height: 1.75;
}

.legal-document-body h2,
.legal-document-body h3 { margin-top: 0; }

.meta-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
}

.meta-list dt {
    color: var(--color-grey-warm);
    font-size: 14px;
    font-weight: 600;
}

.meta-list dd { margin: 0; color: var(--color-cocoa); }

/* ─── Gallery ─── */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.gallery-item {
    aspect-ratio: 3/4;
    background: var(--color-sand);
    border-radius: var(--radius-image);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-grey-warm);
    font-size: 14px;
}

.gallery-item img,
.gallery-item__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-item--interactive {
    position: relative;
    padding: 0;
    border: none;
    cursor: zoom-in;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    width: 100%;
    height: 100%;
}

.gallery-item--selectable {
    position: relative;
    aspect-ratio: 1;
    background: var(--color-sand);
    border-radius: var(--radius-image);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.gallery-grid--interactive .gallery-item--selectable {
    align-self: stretch;
}

.gallery-grid--interactive .gallery-item--interactive {
    width: 100%;
    height: 100%;
}

.gallery-grid--interactive .gallery-item__preview {
    position: relative;
    width: 100%;
    height: 100%;
    line-height: 0;
    overflow: hidden;
}

.gallery-grid--interactive .gallery-thumb__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) brightness(0.92) saturate(1.1);
    transform: scale(1.12);
    pointer-events: none;
}

.gallery-grid--interactive .gallery-thumb__fg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gallery-item--selectable.gallery-item--ordered {
    opacity: 0.85;
}

.gallery-item__preview {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
}

.gallery-item__badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    background: var(--color-sage);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.gallery-select {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 3;
    cursor: pointer;
}

.gallery-select__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gallery-select__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid var(--accent-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.gallery-select__input:checked + .gallery-select__mark {
    background: var(--color-terracotta);
    border-color: var(--color-terracotta);
    transform: scale(1.05);
}

.gallery-select__input:checked + .gallery-select__mark::after {
    content: '';
    width: 0.45rem;
    height: 0.75rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.gallery-item--selectable:has(.gallery-select__input:checked) {
    box-shadow: 0 0 0 3px var(--color-terracotta), var(--shadow-card);
}

.gallery-order-hint {
    margin-bottom: 1rem;
}

.gallery-order-bar {
    position: sticky;
    bottom: 1rem;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--color-white);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-input);
    box-shadow: 0 8px 32px rgba(74, 58, 48, 0.12);
}

.gallery-order-bar__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.gallery-order-bar__price {
    font-size: 1.1rem;
    color: var(--color-cocoa);
}

.gallery-order-bar__price strong {
    color: var(--color-terracotta);
    font-size: 1.25rem;
}

body:has(.gallery-order-bar:not([hidden])) .customer-main {
    padding-bottom: 6rem;
}

@media (min-width: 769px) {
    body:has(.gallery-order-bar:not([hidden])) .customer-main {
        padding-bottom: 6rem;
    }
}

.gallery-item--interactive:hover,
.gallery-item--interactive:focus-visible {
    box-shadow: 0 12px 32px rgba(74, 58, 48, 0.18);
    transform: translateY(-3px);
    outline: none;
}

.gallery-item--interactive:hover .gallery-thumb__fg,
.gallery-item--interactive:focus-visible .gallery-thumb__fg {
    transform: scale(1.03);
    filter: brightness(1.03);
}

.gallery-item__overlay {
    z-index: 2;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(42, 34, 28, 0);
    color: #fff;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.35s ease, background 0.35s ease;
    pointer-events: none;
}

.gallery-item--interactive:hover .gallery-item__overlay,
.gallery-item--interactive:focus-visible .gallery-item__overlay {
    opacity: 1;
    background: rgba(42, 34, 28, 0.22);
}

.gallery-grid--interactive .gallery-thumb__fg {
    transition: transform 0.35s ease, filter 0.35s ease;
}

.lightbox__select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.65rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lightbox__select:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.02);
}

.lightbox__select.is-selected {
    background: var(--color-terracotta);
    border-color: var(--color-terracotta);
}

.lightbox__select-icon {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

.lightbox__select[hidden] {
    display: none;
}

/* ─── Lightbox ─── */

body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 22, 18, 0.88);
    backdrop-filter: blur(4px);
}

.lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 1100px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 3.5rem 2rem;
}

.lightbox__figure {
    margin: 0;
    max-height: calc(92vh - 5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.lightbox__image {
    max-width: 100%;
    max-height: calc(92vh - 7rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-image);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    user-select: none;
}

.lightbox__caption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox__counter {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox__close svg,
.lightbox__nav svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    flex-shrink: 0;
}

.lightbox__close:hover,
.lightbox__nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}

.lightbox__nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
}

.lightbox__prev {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__prev:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.05);
}

.lightbox__next {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__next:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.05);
}

@media (max-width: 600px) {
    .lightbox__dialog {
        padding: 2.5rem 2.75rem 1.5rem;
        width: 100vw;
    }

    .lightbox__prev { left: 0.25rem; }
    .lightbox__next { right: 0.25rem; }
}

/* ─── Theme manager (admin) ─── */

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.theme-card {
    background: var(--color-white);
    border: 2px solid var(--border-line);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.theme-card--active {
    border-color: var(--color-sage);
    box-shadow: 0 0 0 1px var(--color-sage), var(--shadow-card);
}

.theme-card__swatches {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.theme-card__swatch {
    flex: 1;
    height: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-line);
}

.theme-card h3 {
    margin: 0;
    font-size: 1.5rem;
}

.theme-card p {
    margin: 0;
    flex: 1;
    font-size: 15px;
}

.theme-card__badge {
    align-self: flex-start;
    background: var(--sage-muted);
    color: var(--status-success-text);
}

/* ─── Misc ─── */

.hint {
    color: var(--color-grey-warm);
    font-size: 14px;
    margin-top: 0.75rem;
}

code {
    background: var(--color-sand);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--color-cocoa);
}

.copy-box {
    background: var(--color-ivory);
    padding: 1rem;
    border-radius: var(--radius-input);
    border: 1px solid var(--border-line);
    word-break: break-all;
    font-size: 14px;
}

.checklist { list-style: none; padding: 0; }
.checklist li { padding: 0.5rem 0; font-weight: 600; }
.checklist li.ok::before { content: "✓ "; color: var(--color-sage); }
.checklist li.fail::before { content: "✗ "; color: var(--danger); }

.install-page {
    background: linear-gradient(160deg, var(--color-ivory), var(--color-sand));
    padding: 3rem 0;
    min-height: 100vh;
}

.install-page .brand { text-align: center; margin-bottom: 2rem; }

/* ─── Mobile navigation ─── */

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-cocoa);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle--light .nav-toggle__bar {
    background: var(--color-white);
}

.customer-bottom-nav {
    display: none;
}

.customer-header__logout {
    flex-shrink: 0;
}

.admin-mobile-header {
    display: none;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 250;
    background: rgba(28, 22, 18, 0.45);
    backdrop-filter: blur(2px);
}

body.sidebar-open .sidebar-backdrop {
    display: block;
}

/* ─── Responsive ─── */

@media (max-width: 900px) {
    .hero__grid,
    .trust-grid {
        grid-template-columns: 1fr;
    }

    .hero__visual { order: -1; }
    .hero__image-frame { max-width: 300px; margin: 0 auto; }

    .site-footer__inner {
        flex-direction: column;
        text-align: center;
    }

    .app-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .admin-mobile-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        position: sticky;
        top: 0;
        z-index: 200;
        padding: 0.65rem 1rem;
        background: var(--admin-header-bg);
        color: var(--color-white);
        grid-column: 1;
    }

    .admin-mobile-header__title {
        font-family: var(--font-heading);
        font-size: 1.15rem;
        font-weight: 600;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(288px, 88vw);
        z-index: 300;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
        overflow-y: auto;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar__nav {
        flex-direction: column;
        flex-wrap: nowrap;
        padding: 0;
    }

    .sidebar__nav a {
        border-left: 3px solid transparent;
        border-radius: 0;
        padding: 0.85rem 1.25rem;
        font-size: 15px;
    }

    .sidebar__logout {
        margin-top: auto;
        border-top: 1px solid var(--border-line);
    }

    .main-content {
        padding: 1rem;
        max-width: none;
    }
}

@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    body {
        overflow-x: hidden;
        font-size: 16px;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
        padding: 1.15rem;
        border-radius: 18px;
        margin-bottom: 1rem;
    }

    fieldset {
        padding: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        margin-bottom: 1.25rem;
    }

    .topbar h2 {
        font-size: 1.45rem;
    }

    .customer-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .card-header-row .btn {
        width: 100%;
    }

    .meta-list {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .meta-list dt {
        margin-top: 0.5rem;
    }

    .meta-list dt:first-child {
        margin-top: 0;
    }

    /* Public header */
    .site-header__inner {
        position: relative;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .site-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        order: 3;
        gap: 0.5rem;
        padding: 0.75rem 0 0.25rem;
        border-top: 1px solid var(--border-line);
    }

    body.site-nav-open .site-nav {
        display: flex;
    }

    .site-nav a:not(.btn) {
        display: block;
        padding: 0.65rem 0;
    }

    .site-nav .btn {
        width: 100%;
    }

    /* Customer area */
    .customer-header__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        text-align: left;
        padding: 0.75rem 0;
    }

    .customer-header__label {
        display: none;
    }

    .customer-nav--desktop {
        display: none;
    }

    .customer-header__logout-text {
        display: none;
    }

    .customer-header__logout {
        padding: 0.55rem 0.75rem;
        min-width: 44px;
        min-height: 44px;
    }

    .customer-main {
        padding: 1.25rem 0 calc(5.5rem + env(safe-area-inset-bottom, 0px));
        min-height: calc(100vh - 120px);
    }

    .customer-footer {
        padding: 1rem 0 calc(4.75rem + env(safe-area-inset-bottom, 0px));
    }

    .customer-footer p {
        font-size: 13px;
    }

    .customer-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--border-line);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 -6px 24px rgba(59, 47, 42, 0.08);
    }

    .customer-bottom-nav__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
        min-height: 56px;
        padding: 0.4rem 0.25rem;
        font-size: 11px;
        font-weight: 700;
        color: var(--color-grey-warm);
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .customer-bottom-nav__item i {
        font-size: 1.2rem;
    }

    .customer-bottom-nav__item.is-active {
        color: var(--color-terracotta);
    }

    /* Stacked tables */
    .table-wrap--stack {
        overflow-x: visible;
    }

    .table-wrap--stack table thead {
        display: none;
    }

    .table-wrap--stack tbody tr {
        display: block;
        margin-bottom: 0.85rem;
        padding: 0.85rem 1rem;
        background: var(--color-ivory);
        border: 1px solid rgba(232, 216, 200, 0.85);
        border-radius: var(--radius-input);
    }

    .table-wrap--stack tbody tr:hover td {
        background: transparent;
    }

    .table-wrap--stack td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        padding: 0.45rem 0;
        border-bottom: none;
        text-align: right;
    }

    .table-wrap--stack td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--color-grey-warm);
        text-align: left;
        flex-shrink: 0;
        max-width: 45%;
    }

    .table-wrap--stack td[data-label=""]::before {
        display: none;
    }

    .table-wrap--stack td[colspan] {
        display: block;
        text-align: center;
    }

    .table-wrap--stack td[colspan]::before {
        display: none;
    }

    /* Gallery */
    .gallery-grid,
    .gallery-grid--interactive {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .gallery-order-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        z-index: 95;
        flex-direction: column;
        align-items: stretch;
        padding: 0.85rem 1rem;
    }

    .gallery-order-bar .btn {
        width: 100%;
    }

    body:has(.gallery-order-bar:not([hidden])) .customer-main {
        padding-bottom: calc(10rem + env(safe-area-inset-bottom, 0px));
    }

    .gallery-select__mark {
        width: 2rem;
        height: 2rem;
    }

    /* Lightbox mobile */
    .lightbox__dialog {
        padding: 2.75rem 1rem 1.25rem;
        width: 100%;
        max-height: 100vh;
    }

    .lightbox__close {
        top: 0.35rem;
        right: 0.35rem;
    }

    .lightbox__prev {
        left: 0.15rem;
    }

    .lightbox__next {
        right: 0.15rem;
    }

    .lightbox__select {
        width: 100%;
        max-width: 320px;
    }

    .lightbox__caption {
        white-space: normal;
        font-size: 13px;
    }

    /* Auth */
    .auth-page {
        min-height: auto;
        padding: 1.25rem 0.75rem 2rem;
        align-items: flex-start;
    }

    .auth-card {
        padding: 1.5rem 1.25rem;
        max-width: none;
    }

    .auth-card h1 {
        font-size: 1.65rem;
    }

    /* Admin tables scroll */
    .table-wrap:not(.table-wrap--stack) {
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.25rem;
    }

    .table-wrap:not(.table-wrap--stack) table {
        min-width: 520px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .number {
        font-size: 1.85rem;
    }

    .copy-box {
        font-size: 13px;
    }

    .legal-box {
        max-height: 160px;
        font-size: 14px;
    }

    .btn {
        min-height: 44px;
    }

    .actions {
        flex-direction: column;
    }

    .actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0 2.5rem;
    }

    .section {
        padding: 2.5rem 0;
    }

    .gallery-grid,
    .gallery-grid--interactive {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .service-grid {
        gap: 1rem;
    }
}

@media (min-width: 769px) {
    .customer-bottom-nav {
        display: none !important;
    }

    .customer-nav--desktop {
        display: flex;
    }
}
