/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    line-height: 1.5;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* === APP CONTAINER === */
#app {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.btn-primary {
    background: #1a1a1a;
    color: #fff;
}
.btn-primary:hover { background: #333; }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.btn-outline {
    background: transparent;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
}
.btn-outline:hover { background: #1a1a1a; color: #fff; }
.btn-full { width: 100%; }

/* === LANDING PAGE === */
.landing-page {
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}
.landing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 0;
}
.landing-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}
.landing-card {
    text-align: center;
    color: #fff;
    padding: 40px 24px;
}
.salon-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}
.salon-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.salon-tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 32px;
    line-height: 1.6;
}
.lang-switch-front { text-align: center; margin-bottom: 20px; display: flex; justify-content: center; gap: 4px; }
.lang-btn-front { display: inline-block; padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.1); transition: 0.15s; }
.lang-btn-front.active { background: rgba(255,255,255,0.25); color: #fff; }
.lang-btn-front:hover { color: #fff; }
.btn-booking {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    background: #fff;
    color: #1a1a1a;
    font-size: 1rem;
    padding: 16px;
}
.btn-booking:hover { background: #eee; }
.landing-contacts {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}
.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: 0.2s;
}
.contact-icon:hover { background: rgba(255,255,255,0.15); }
.landing-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.landing-links .btn-outline {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
    width: 100%;
}
.landing-links .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

/* === STEP HEADERS === */
.step { padding-bottom: 100px; }
.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}
.back-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.2s;
    flex-shrink: 0;
}
.back-btn:hover { background: #f0f0f0; }
.header-salon-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}
.header-salon-info strong { font-size: 0.95rem; display: block; }
.header-salon-info small { color: #e67e22; font-size: 0.8rem; }
.step-title {
    font-size: 1.4rem;
    font-weight: 700;
    padding: 24px 20px 16px;
}

/* === LOCATION STEP === */
#step-location {
    padding-bottom: 20px;
}
#step-location .step-header {
    border: none;
    padding: 24px 20px 8px;
}
#step-location h2 { font-size: 1.3rem; }
.location-city {
    padding: 0 20px 16px;
    font-size: 0.95rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}
.city-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1a1a1a;
}
.tab-bar {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    padding: 0 20px;
}
.tab {
    padding: 12px 0;
    margin-right: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #999;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: 0.2s;
}
.tab.active { color: #1a1a1a; border-bottom-color: #e67e22; }
.location-list {
    padding: 8px 0;
    overflow: hidden;
}
.location-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: 0.15s;
    border-bottom: 1px solid #f0f0f0;
}
.location-entry:hover { background: #fafafa; }
.location-entry .arrow { color: #ccc; flex-shrink: 0; }
.location-card-map {
    width: calc(100% - 40px);
    height: 120px;
    margin: 8px 20px 0;
    background: #e8e8e8;
    overflow: hidden;
    border-radius: 12px;
}
.location-card-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
    display: block;
}
/* Location photo */
.location-photo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}
.location-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.location-card-info { flex: 1; min-width: 0; }
.location-card-info h3 { font-size: 0.95rem; font-weight: 600; }
.location-card-info p { font-size: 0.8rem; color: #888; margin-top: 2px; }
.location-card .arrow { color: #ccc; flex-shrink: 0; }

/* === FULL MAP VIEW === */
.location-map {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
}
.location-map-frame {
    flex: 1;
    min-height: 0;
}
.location-map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.location-map-footer {
    padding: 12px 0;
    text-align: center;
    font-size: 0.75rem;
    color: #aaa;
    flex-shrink: 0;
}

/* === MENU OPTIONS === */
.menu-options { padding: 20px; }
.menu-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
    transition: 0.15s;
}
.menu-option:hover { opacity: 0.7; }
.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    flex-shrink: 0;
}
.menu-option span { flex: 1; text-align: left; font-size: 0.95rem; }
.menu-option .arrow { color: #ccc; flex-shrink: 0; }
.powered-by {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #ccc;
}

/* === SPECIALISTS === */
.specialists-list { padding: 0 20px; }
.specialist-card {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}
.specialist-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.specialist-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.specialist-info { flex: 1; min-width: 0; }
.specialist-info h3 { font-size: 1rem; font-weight: 600; }
.specialist-info .title { font-size: 0.8rem; color: #888; margin-top: 2px; }
.specialist-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 0.8rem;
}
.stars { color: #f5a623; }
.review-count { color: #999; }
.specialist-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.info-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #999;
}
.select-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.select-toggle.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
}
.select-toggle.active::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}
.specialist-slots {
    margin-top: 12px;
    padding-left: 62px;
}
.specialist-slots .slot-date {
    font-size: 0.8rem;
    color: #e67e22;
    margin-bottom: 8px;
}
.specialist-slots .slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.slot-chip {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.15s;
}
.slot-chip:hover { border-color: #999; }
.slot-chip.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* === SERVICES === */
.category-tabs {
    display: flex;
    gap: 8px;
    padding: 0 20px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    white-space: nowrap;
    border: 1px solid #e0e0e0;
    transition: 0.15s;
}
.cat-tab.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 20px 16px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
}
.search-box input {
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
}
.services-list { padding: 0 20px; }
.service-category-name {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 16px 0 12px;
    border-top: 1px solid #f0f0f0;
}
.service-category-name:first-child { border-top: none; }
.service-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}
.service-item:hover { opacity: 0.7; }
.service-item-info { flex: 1; min-width: 0; }
.service-item-info h4 { font-size: 0.9rem; font-weight: 400; }
.service-item-info .duration { font-size: 0.8rem; color: #e67e22; margin-top: 4px; }
.service-item-info .price { font-size: 0.95rem; font-weight: 600; margin-top: 6px; }
.service-check {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
    transition: 0.15s;
}
.service-check.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
}
.service-check.active::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

/* === CALENDAR === */
.dt-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    padding: 0 20px;
}
.dt-tabs .tab { flex: 1; text-align: center; }
.calendar-wrapper { padding: 16px 20px; }
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.month-selector {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.cal-nav { display: flex; gap: 4px; }
.cal-nav button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}
.cal-nav button:hover { background: #f0f0f0; }
.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
    margin-bottom: 8px;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.15s;
}
.cal-day:hover:not(.disabled):not(.empty) { background: #f0f0f0; }
.cal-day.today { font-weight: 700; }
.cal-day.active { background: #1a1a1a; color: #fff; }
.cal-day.disabled { color: #ddd; cursor: default; }
.cal-day.empty { cursor: default; }

/* === TIME SLOTS === */
.timeslots-container { padding: 0 20px 20px; }
.timeslot-group { margin-bottom: 16px; }
.timeslot-group h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.timeslot-group h4::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f0f0f0;
}
.timeslot-group .slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* === SUMMARY === */
.summary-card {
    margin: 0 20px;
    padding: 16px;
    background: #fafafa;
    border-radius: 12px;
}
.summary-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}
.summary-row + .summary-row { border-top: 1px solid #eee; }
.summary-icon { color: #888; flex-shrink: 0; }
.summary-info { min-width: 0; }
.summary-info strong { font-size: 0.95rem; display: block; }
.summary-info small { color: #888; font-size: 0.8rem; }
.summary-services { padding: 20px; }
.summary-services h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.summary-services h3 span { font-weight: 400; color: #888; font-size: 0.85rem; }
.sum-service-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}
.sum-service-row .name { font-size: 0.9rem; }
.sum-service-row .dur { font-size: 0.8rem; color: #888; }
.sum-service-row .price { font-size: 0.9rem; font-weight: 500; color: #e67e22; white-space: nowrap; margin-left: 12px; }
.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0 0;
    font-size: 1rem;
}

/* === FORM === */
.booking-form { padding: 0 20px 20px; }
.booking-form h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: 0.15s;
    background: #fafafa;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: #1a1a1a;
    background: #fff;
}
.reminder-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 0.85rem;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 0;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    line-height: 1.4;
}
.checkbox-label input { margin-top: 2px; flex-shrink: 0; }

/* === BOTTOM BUTTON === */
.bottom-btn-wrap {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    z-index: 20;
}

/* === SUCCESS === */
.success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding: 40px 20px;
}
.success-icon { margin-bottom: 24px; }
.success-container h2 { font-size: 1.5rem; margin-bottom: 8px; }
.success-container p { color: #666; }

/* === VALIDATION WARNING === */
.validation-warn {
    background: #fff3cd;
    color: #856404;
    padding: 12px 20px;
    font-size: 0.85rem;
    text-align: center;
    animation: fadeIn 0.2s ease;
}

/* === ANIMATIONS === */
.step { animation: fadeIn 0.2s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* === LOADING === */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #999;
}
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #eee;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === RESPONSIVE: 768px — Tablet landscape, app wider === */
@media (min-width: 769px) {
    #app { max-width: 540px; }
    .bottom-btn-wrap { max-width: 540px; }
    .landing-container { max-width: 480px; }
}

/* === RESPONSIVE: 376px–480px — Normal phones, base styles work fine === */
/* No overrides needed: #app max-width 480px fits naturally */

/* === RESPONSIVE: <=375px — Small phones (iPhone SE, Galaxy S8 etc.) === */
@media (max-width: 375px) {
    /* Container fills screen, no wasted space */
    #app { max-width: 100vw; }
    .bottom-btn-wrap { max-width: 100vw; }

    /* Landing page: tighter */
    .landing-container { padding: 16px; }
    .landing-card { padding: 32px 16px; }
    .salon-logo { width: 64px; height: 64px; font-size: 1.5rem; }
    .salon-name { font-size: 1.5rem; }
    .salon-tagline { font-size: 0.85rem; margin-bottom: 24px; }
    .btn-booking { padding: 14px; font-size: 0.9rem; }
    .contact-icon { width: 44px; height: 44px; }

    /* Step headers: less padding */
    .step-header { padding: 12px 14px; gap: 8px; }
    .header-logo { width: 32px; height: 32px; font-size: 0.8rem; }
    .step-title { font-size: 1.2rem; padding: 18px 14px 12px; }

    /* Location */
    .location-city { padding: 0 14px 12px; }
    .location-card { padding: 10px 14px 14px; }
    .location-card-map { width: calc(100% - 28px); margin: 6px 14px 0; height: 100px; }
    .location-entry { padding: 12px 14px; gap: 10px; }
    .location-photo { width: 64px; height: 64px; border-radius: 10px; }

    /* Menu */
    .menu-options { padding: 14px; }
    .menu-option { padding: 16px 0; gap: 10px; }
    .menu-icon { width: 36px; height: 36px; }

    /* Specialists */
    .specialists-list { padding: 0 14px; }
    .specialist-photo { width: 42px; height: 42px; }
    .specialist-slots { padding-left: 56px; }
    .specialist-slots .slots { gap: 6px; }
    .slot-chip { padding: 7px 12px; font-size: 0.8rem; }

    /* Services */
    .category-tabs { padding: 0 14px 12px; gap: 6px; }
    .cat-tab { padding: 7px 12px; font-size: 0.78rem; }
    .search-box { margin: 0 14px 12px; padding: 10px 12px; }
    .services-list { padding: 0 14px; }

    /* Calendar */
    .calendar-wrapper { padding: 12px 14px; }

    /* Time slots */
    .timeslots-container { padding: 0 14px 16px; }
    .timeslot-group .slots { gap: 6px; }

    /* Summary */
    .summary-card { margin: 0 14px; }
    .summary-services { padding: 16px 14px; }

    /* Form */
    .booking-form { padding: 0 14px 16px; }
    .bottom-btn-wrap { padding: 14px; }
}
