* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    -webkit-appearance: none;
    appearance: none;
}

:root {
    --color-black: #111111;
    --color-charcoal: #1a1a1a;
    --color-white: #fafaf9;
    --color-grey-100: #f4f3f1;
    --color-grey-200: #e6e4e1;
    --color-grey-400: #b5b2ad;
    --color-grey-600: #6f6b65;
    --color-grey-800: #2c2a27;
    --color-accent: #c8963e;
    --color-accent-dark: #a8791f;
    --font-heading: 'Space Grotesk', 'Archivo', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-soft: 0 12px 30px rgba(17, 17, 17, 0.12);
    --shadow-lift: 0 16px 36px rgba(17, 17, 17, 0.22);
}

html, body {
    width: 100%;
    min-height: 100%;
    font-family: var(--font-body);
    background: var(--color-charcoal);
    color: var(--color-black);
}

h1, h2 {
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.hidden { display: none; }

/* ---- PAGES ---- */
.page {
    display: none;
    min-height: 100vh;
    padding: 24px 16px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* the homepage is a normal scrolling document, not a centered single-viewport card */
.page.home-page.active {
    display: block;
    min-height: 0;
    padding: 0;
    position: relative;
}

/* ---- LANGUAGE TOGGLE ---- */
.lang-toggle {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 1000;
    display: flex;
    background: rgba(17, 17, 17, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 3px;
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-soft);
}

.lang-option {
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 10px 14px;
    min-width: 40px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.lang-option.active {
    background: var(--color-accent);
    color: var(--color-black);
}

/* ---- FLOATING BOOKING BUTTON ---- */
.floating-book-btn {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom));
    right: max(24px, env(safe-area-inset-right));
    z-index: 900;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    border: none;
    background: var(--color-black);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-lift);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.floating-book-btn:hover {
    transform: translateY(-3px) scale(1.03);
    background: var(--color-accent);
    color: var(--color-black);
}

/* ---- PHOTO PANELS ---- */
.photo-panel {
    position: relative;
    background-color: var(--color-grey-200);
    background-size: cover;
    background-position: center;
    /* isolates this element's paint from layout changes in siblings
       (e.g. the review carousel resizing when switching between
       differently-sized reviews), so the browser doesn't briefly
       re-render/flash the fallback color when something else on the
       page changes height */
    contain: layout paint;
}

.section-photo-strip {
    height: 180px;
}

/* ---- HERO ---- */
.hero-photo-panel {
    height: 62vh;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo-mark {
    width: 200px;
    max-width: 55%;
    height: auto;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08), var(--shadow-lift);
}

.hero-tagline-panel {
    background: var(--color-white);
    padding: 48px 24px 56px;
    text-align: center;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-black);
    max-width: 480px;
    margin: 0 auto 14px;
}

.hero-address {
    font-size: 0.88rem;
    color: var(--color-grey-600);
}

/* ---- SITE SECTIONS (homepage) ---- */
.site-section {
    background: var(--color-white);
    /* contains child margins (e.g. .review-carousel's negative/bottom
       margins) so they can't collapse through and reveal the near-black
       <body> background behind the section */
    display: flow-root;
}

.site-section--muted {
    background: var(--color-grey-100);
}

.site-section h2,
.hairstyle-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 28px;
    text-align: center;
}

.site-section > h2,
.site-section > .price-list,
.site-section > .location-grid {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.site-section > h2 {
    padding: 48px 20px 0;
}

.site-section > .price-list {
    padding: 28px 20px 56px;
}

.site-section > .location-grid {
    padding: 0 20px 56px;
}

/* ---- PRICE LIST ---- */
.price-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--color-grey-200);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 20px 4px;
    border-bottom: 1px solid var(--color-grey-200);
}

.price-row-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--color-black);
}

.price-row-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-shrink: 0;
    margin-left: 16px;
}

.price-row-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent-dark);
}

.price-row-index {
    font-size: 0.8rem;
    color: var(--color-grey-400);
}

/* ---- AI HAIRSTYLE FINDER (inline section) ---- */
.hairstyle-photo-panel {
    height: 46vh;
    min-height: 280px;
}

.hairstyle-card {
    max-width: 480px;
    margin: -64px auto 0;
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
    padding: 32px 24px 40px;
}

.hairstyle-card h2 { margin-bottom: 12px; }

.try-again-link {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--color-grey-600);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    padding: 14px 0 0;
    cursor: pointer;
}

.try-again-link:hover { color: var(--color-accent-dark); }

/* ---- REVIEWS ---- */
.review-carousel {
    max-width: 480px;
    /* equal, non-overlapping space above and below the card, between
       the photo strip above and the next section's photo below */
    margin: 48px auto;
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 32px 24px 24px;
}

.client-review-card { display: none; }
.client-review-card.active { display: block; }

.client-review-card .stars {
    color: var(--color-accent);
    font-size: 1.2rem;
    margin-bottom: 14px;
}

.review-text {
    font-size: 0.95rem;
    color: var(--color-grey-800);
    line-height: 1.6;
    margin-bottom: 16px;
}

.review-author {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-black);
}

.review-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-grey-200);
}

.review-nav-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--color-accent-dark);
    cursor: pointer;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.review-nav-btn:hover { background: var(--color-grey-100); }

/* ---- CONTACT ---- */
.location-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 720px) {
    .location-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.contact-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-grey-200);
}

.contact-label {
    font-size: 0.72rem;
    color: var(--color-grey-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.contact-value {
    font-size: 1.05rem;
    color: var(--color-black);
}

.contact-value--link {
    text-decoration: none;
    font-weight: 600;
}

.contact-value--link:hover { color: var(--color-accent-dark); }

.location-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.location-links a {
    color: var(--color-accent-dark);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.location-links a:hover { text-decoration: underline; }

.location-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.location-map iframe {
    width: 100%;
    height: 280px;
    border: 0;
    display: block;
}

/* ---- FOOTER ---- */
.site-footer {
    background: var(--color-black);
    color: var(--color-white);
    padding: 48px 20px;
    text-align: center;
}

.footer-logo-mark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 18px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 18px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-white);
    opacity: 0.8;
    text-decoration: none;
    font-size: 0.88rem;
}

.footer-links a:hover { opacity: 1; }

.footer-copy {
    font-size: 0.78rem;
    color: var(--color-grey-400);
}

/* ---- CARD PAGES (booking wizard) ---- */
.page-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 26px 22px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lift);
}

.page-card.centered { text-align: center; }

.back-btn {
    background: none;
    border: none;
    color: var(--color-accent-dark);
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-bottom: 14px;
}

.back-btn:hover { opacity: 0.75; }

.progress {
    font-size: 0.74rem;
    color: var(--color-grey-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 500;
}

h2 {
    color: var(--color-black);
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.step-hint {
    font-size: 0.85rem;
    color: var(--color-grey-600);
    margin-bottom: 14px;
}

/* ---- SERVICE (wizard step) ---- */
.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 22px 14px;
    background: var(--color-grey-100);
    border: 2px solid var(--color-grey-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.service-card:hover {
    border-color: var(--color-accent);
    background: #fbf3e4;
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.service-icon { font-size: 2rem; }

.service-card strong {
    font-size: 0.88rem;
    color: var(--color-black);
    font-weight: 600;
    text-align: center;
}

.price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-accent-dark);
}

/* ---- DATE ---- */
.date-picker-wrapper { margin: 4px 0 18px; }

.date-input {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    -webkit-appearance: none;
    appearance: none;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: var(--font-body);
    border: 2px solid var(--color-grey-200);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--color-black);
    transition: border-color 0.2s;
}

.date-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(200, 150, 62, 0.18);
}

/* ---- TIME SLOTS ---- */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 8px;
    max-height: 340px;
    overflow-y: auto;
}

.slot-btn {
    padding: 12px 8px;
    background: var(--color-grey-100);
    border: 2px solid var(--color-grey-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-black);
    transition: all 0.2s;
}

.slot-btn:hover {
    border-color: var(--color-accent);
    background: #fbf3e4;
}

.slot-btn.selected {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-black);
}

/* ---- REVIEW ---- */
.review-card {
    background: var(--color-grey-100);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 18px;
}

.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--color-grey-200);
}

.review-row:last-child { border-bottom: none; }

.review-label {
    color: var(--color-grey-600);
    font-size: 0.85rem;
}

.review-value {
    font-weight: 600;
    color: var(--color-black);
    font-size: 0.92rem;
}

.name-field { margin-bottom: 18px; }

.name-field label {
    display: block;
    font-size: 0.83rem;
    color: var(--color-grey-600);
    margin-bottom: 8px;
    font-weight: 500;
}

.optional {
    color: var(--color-grey-400);
    font-weight: 400;
}

.name-input {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 2px solid var(--color-grey-200);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--color-black);
    transition: border-color 0.2s;
}

.name-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(200, 150, 62, 0.18);
}

.review-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

/* ---- BUTTONS ---- */
.next-btn, .confirm-btn {
    padding: 14px;
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-black);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-shadow: 0 4px 14px rgba(200, 150, 62, 0.35);
}

.next-btn:hover, .confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(200, 150, 62, 0.5);
}

.next-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.change-btn {
    padding: 14px;
    background: var(--color-white);
    border: 2px solid var(--color-black);
    border-radius: var(--radius-sm);
    color: var(--color-black);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.change-btn:hover { background: var(--color-grey-100); }

/* ---- CONFIRMATION ---- */
.success-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.confirm-text {
    color: var(--color-grey-600);
    margin-bottom: 18px;
    font-size: 0.92rem;
}

/* ---- UPLOAD ---- */
.upload-subtitle {
    color: var(--color-grey-600);
    font-size: 0.88rem;
    margin-bottom: 18px;
    line-height: 1.55;
}

.upload-zone {
    display: block;
    border: 2px dashed var(--color-grey-400);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 16px;
    background: var(--color-grey-100);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--color-accent);
    background: #fbf3e4;
}

.upload-zone input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.upload-placeholder p {
    color: var(--color-grey-800);
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.upload-placeholder small {
    color: var(--color-grey-400);
    font-size: 0.8rem;
}

.photo-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* ---- RESULTS ---- */
.results-content { margin-bottom: 18px; }

.analysis-heading {
    color: var(--color-accent-dark);
    font-size: 1rem;
    font-weight: 600;
    margin: 16px 0 8px;
}

.analysis-text {
    color: var(--color-grey-800);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.style-item {
    background: var(--color-grey-100);
    border-left: 3px solid var(--color-accent);
    padding: 10px 14px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: var(--color-grey-800);
    line-height: 1.55;
}

/* ---- COLLAPSIBLE ANALYSIS TOGGLES ("Why" + per-style explanations) ---- */
.analysis-toggle {
    background: var(--color-grey-100);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}

.analysis-toggle.style-item {
    padding: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.analysis-toggle summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-black);
}

.analysis-toggle summary::-webkit-details-marker {
    display: none;
}

.analysis-toggle .toggle-arrow {
    color: var(--color-accent-dark);
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.analysis-toggle[open] .toggle-arrow {
    transform: rotate(90deg);
}

.analysis-toggle-content {
    padding: 0 14px 12px;
    font-size: 0.88rem;
    color: var(--color-grey-800);
    line-height: 1.55;
}

/* ---- SHARED ---- */
.loading {
    color: var(--color-grey-400);
    text-align: center;
    padding: 24px;
    font-size: 0.88rem;
    grid-column: 1 / -1;
}

.no-slots, .error {
    color: #b3372c;
    text-align: center;
    padding: 16px;
    font-size: 0.88rem;
    grid-column: 1 / -1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .page { padding: 16px 12px; }
    .page-card { padding: 20px 16px; }
    h2 { font-size: 1.3rem; }
    .slots-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-tagline { font-size: 1.5rem; }
    .floating-book-btn { width: 88px; height: 88px; font-size: 0.72rem; }
    .hairstyle-card { margin-top: -48px; padding: 24px 18px 32px; }
}
