/* ===== LAYOUT ===== */

.res-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ===== LEFT PHOTO PANEL ===== */

.res-photo {
    position: relative;
    overflow: hidden;
}

.res-photo__bg {
    position: absolute;
    inset: 0;
    background-image: url('../assets/images/home/interior.jpg');
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: transform 8s ease;
}

.res-photo:hover .res-photo__bg {
    transform: scale(1);
}

.res-photo__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.45) 0%,
        rgba(0,0,0,.2) 50%,
        rgba(0,0,0,.65) 100%
    );
}

.res-photo__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
}

.res-logo {
    text-decoration: none;
    color: white;
}

.res-logo .logo-main {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: white;
}

.res-logo .logo-sub {
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,.7);
    margin-top: 2px;
}

.res-photo__tagline {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    color: white;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.res-photo__sub {
    font-family: var(--font-ui);
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    margin-top: 10px;
}

/* ===== RIGHT FORM PANEL ===== */

.res-form-panel {
    background: #faf9f7;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.res-back {
    position: absolute;
    top: 24px;
    right: 32px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid #e2e2e2;
    border-radius: 999px;
    background: #fff;
    font-family: var(--font-ui);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #333;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}
.res-back:hover { background: #1a1a1a; border-color: #1a1a1a; color: #fff; }

.res-form-wrap {
    padding: 72px 64px 72px;
    max-width: 520px;
    width: 100%;
    margin: auto;
}

.res-title {
    font-family: var(--font-display);
    font-size: 46px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.res-subtitle {
    font-family: var(--font-ui);
    font-size: 15px;
    color: #aaa;
    margin-bottom: 40px;
}

/* Section labels */
.res-section-label {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #bbb;
    margin: 28px 0 12px;
}
.res-section-label:first-of-type { margin-top: 0; }

.res-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    color: #ccc;
}

/* Input fields */
.res-field {
    display: flex;
    align-items: center;
    background: white;
    border: 1.5px solid #e8e8e8;
    border-radius: 13px;
    margin-bottom: 10px;
    transition: border-color .2s, box-shadow .2s;
    overflow: hidden;
}

.res-field:focus-within {
    border-color: #d8a43f;
    box-shadow: 0 0 0 4px rgba(216,164,63,.1);
}

.res-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    flex-shrink: 0;
    color: #ccc;
    transition: color .2s;
}
.res-field:focus-within .res-icon { color: #d8a43f; }

.res-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.res-field input,
.res-field select {
    flex: 1;
    padding: 16px 16px 16px 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-ui);
    font-size: 15px;
    color: #1a1a1a;
}
.res-field input::placeholder { color: #ccc; }
/* only the select needs its native chrome stripped */
.res-field select {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.res-field input[type="date"],
.res-field input[type="time"] {
    color-scheme: light;
}

/* Bounded time control: hour : minute dropdowns (09–23 / 00–59), so an exact
   time is one pick away — no per-minute stepping, no infinite scroll. */
.res-field select.res-time-part {
    flex: 0 0 auto;
    padding: 16px 4px;
    text-align: center;
}
.res-time-colon {
    align-self: center;
    color: #1a1a1a;
    font-size: 15px;
    font-family: var(--font-ui);
}

/* Two-column row */
.res-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.res-row .res-field { margin-bottom: 0; }

/* Guests counter */
.res-guests {
    display: flex;
    align-items: center;
    background: white;
    border: 1.5px solid #e8e8e8;
    border-radius: 13px;
    padding: 6px;
    margin-bottom: 10px;
    gap: 0;
}

.res-guests__btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 9px;
    background: #f5f5f5;
    font-size: 22px;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, color .2s;
    line-height: 1;
}
.res-guests__btn:hover { background: #1a1a1a; color: white; }
.res-guests__btn:disabled { opacity: .3; cursor: default; }
.res-guests__btn:disabled:hover { background: #f5f5f5; color: #555; }

.res-guests__display {
    flex: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

#guestsCount, #pdGuestsCount {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Editable guest count — direct numeric entry, spinner hidden (we have +/-) */
.res-guests__input {
    width: 2.4em;
    border: none;
    outline: none;
    background: transparent;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}
.res-guests__input::-webkit-outer-spin-button,
.res-guests__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.res-guests__label {
    font-family: var(--font-ui);
    font-size: 14px;
    color: #aaa;
}

/* Quick-select guest chips */
.res-guests-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}
.res-guests-quick__chip {
    flex: 1 1 auto;
    min-width: 42px;
    padding: 9px 0;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    font-family: var(--font-ui);
    font-size: 15px;
    color: #555;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.res-guests-quick__chip:hover { border-color: #d8a43f; }
.res-guests-quick__chip.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

/* Location picker */
.pickup-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.pickup-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1.5px solid #e8e8e8;
    border-radius: 13px;
    cursor: pointer;
    background: white;
    transition: border-color .2s, background .2s;
    user-select: none;
}

.pickup-option input[type="radio"] { display: none; }

.pickup-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    flex-shrink: 0;
    position: relative;
    transition: border-color .2s;
}
.pickup-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d8a43f;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform .2s;
}

.pickup-info { flex: 1; }
.pickup-name {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}
.pickup-addr {
    font-family: var(--font-ui);
    font-size: 13px;
    color: #aaa;
    margin-top: 2px;
}

.pickup-option:has(input:checked) {
    border-color: #d8a43f;
    background: rgba(216,164,63,.04);
}
.pickup-option:has(input:checked) .pickup-radio {
    border-color: #d8a43f;
}
.pickup-option:has(input:checked) .pickup-radio::after {
    transform: translate(-50%, -50%) scale(1);
}
.pickup-option:has(input:checked) .pickup-name {
    color: #c8941f;
}

/* Comment textarea */
#reservationComment {
    width: 100%;
    padding: 16px 18px;
    border: 1.5px solid #e8e8e8;
    border-radius: 13px;
    background: white;
    font-family: var(--font-ui);
    font-size: 15px;
    color: #1a1a1a;
    resize: none;
    overflow: hidden;
    min-height: 56px;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    margin-bottom: 28px;
}
#reservationComment::placeholder { color: #ccc; }
#reservationComment:focus {
    outline: none;
    border-color: #d8a43f;
    box-shadow: 0 0 0 4px rgba(216,164,63,.1);
}

/* Submit button */
#reserveBtn {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 13px;
    background: #1a1a1a;
    color: white;
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
#reserveBtn:hover {
    background: #d8a43f;
    transform: translateY(-2px);
}

/* Error state */
.res-field.field-error {
    border-color: #e05252;
    box-shadow: 0 0 0 4px rgba(224,82,82,.08);
}
.res-field.field-error .res-icon { color: #e05252; }
.res-field.field-error input::placeholder { color: #e05252; }

/* ===== RESPONSIVE ===== */

/* Desktop fluid: at narrower windows, collapse to 1 col */
@media (max-width: 900px) {
    .device-desktop .res-page           { grid-template-columns: 1fr; }
    .device-desktop .res-photo          { height: 280px; }
    .device-desktop .res-photo__tagline { font-size: 30px; }
    .device-desktop .res-form-wrap      { padding: 48px 28px; }
    .device-desktop .res-title          { font-size: 34px; }
    .device-desktop .res-back           { top: 20px; right: 20px; }
}

/* Mobile + Tablet: always single column */
.device-mobile .res-page,
.device-tablet .res-page           { grid-template-columns: 1fr; }

.device-mobile .res-photo,
.device-tablet .res-photo          { height: 220px; }

.device-mobile .res-photo__tagline,
.device-tablet .res-photo__tagline { font-size: 28px; }

.device-mobile .res-form-wrap,
.device-tablet .res-form-wrap      { padding: 36px 20px; }

.device-mobile .res-title,
.device-tablet .res-title          { font-size: 30px; }

.device-mobile .res-back,
.device-tablet .res-back           { top: 16px; right: 16px; }
