/* ============================================================
   Higanas Boats Booking – Frontend CSS v1.3
   Matches reference design from preview-complete-updated.html
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --hb-primary:  #1e3a5f;
    --hb-ph:       #1e3a5f;
    --hb-green:    #22c55e;
    --hb-green-h:  #16a34a;
    --hb-gray-btn: #4b5563;
    --hb-border:   #e5e7eb;
    --hb-bg:       #f8f9fa;
    --hb-radius:   8px;
    --hb-shadow:   0 2px 8px rgba(0,0,0,.10);
    --hb-font:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Global reset for plugin scope ────────────────────────── */
.higanas-booking-wrap,
.higanas-booking-wrap *,
.hb-modal-inner,
.hb-modal-inner *,
.hb-overlay *,
.hb-lightbox * {
    box-sizing: border-box !important;
    line-height: 1.4 !important;
}
/* Explicitly allow scroll on the scroll container — must not be overridden */
.hb-modal-scroll {
    overflow-y: scroll !important;
    overflow-x: hidden !important;
}

.higanas-booking-wrap {
    font-family: var(--hb-font);
    font-size: 14px;
    color: #1a1a1a;
    max-width: 1320px;
    margin: 0 auto;
}

/* ── Search Section ────────────────────────────────────────── */
.hb-section { margin-bottom: 24px; }

.hb-page-title {
    font-size: 24px !important;
    font-weight: 600 !important;
    font-style: italic !important;
    color: #1a1a1a !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
}

.hb-search-box {
    background: var(--hb-bg);
    border-radius: var(--hb-radius);
    padding: 20px 24px;
}

.hb-date-fields {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: stretch;
}

.hb-date-field { display: flex; }

.hb-date-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    color: #1a1a1a;
    font-family: var(--hb-font);
}
.hb-date-input::placeholder { color: #999; }
.hb-date-input:focus { outline: 2px solid var(--hb-primary); }

.hb-search-btn-wrap { display: flex; }

.hb-search-btn {
    background: var(--hb-primary);
    color: #fff;
    border: none;
    padding: 0 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
    font-family: var(--hb-font);
    transition: background .2s;
}
.hb-search-btn:hover { background: #15294a; }
.hb-search-btn:disabled { opacity: .7; cursor: not-allowed; }

.hb-min-stay {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: #666;
    font-size: 13px;
}
.hb-min-stay-icon {
    width: 17px; height: 17px;
    background: #3b82f6; color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; flex-shrink: 0;
}

/* Flatpickr range highlight */
.flatpickr-day.inRange,
.flatpickr-day.inRange:hover {
    background: #d1d5db !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    color: #1a1a1a !important;
    box-shadow: -5px 0 0 #d1d5db, 5px 0 0 #d1d5db !important;
}
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    border-radius: 50% !important;
    color: #fff !important;
}
.flatpickr-day.today { border-color: #1a1a1a !important; }

/* ── Results Header ────────────────────────────────────────── */
.hb-results-header {
    padding: 8px 0 14px;
    border-bottom: 2px solid var(--hb-border);
    margin-bottom: 20px;
    font-size: 15px;
    color: #555;
}
.hb-results-header strong { color: #1a1a1a; }

.hb-alt-notice {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--hb-radius);
    padding: 12px 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
}
.hb-alt-btn {
    background: #fff;
    border: 2px solid var(--hb-primary);
    color: var(--hb-primary);
    padding: 6px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}
.hb-no-results { color: #555; padding: 20px 0; font-size: 14px; }

/* ── Boat Cards Grid ───────────────────────────────────────── */
.hb-boats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* ── Boat Card ─────────────────────────────────────────────── */
.hb-boat-card {
    background: #fff;
    border-radius: var(--hb-radius);
    overflow: hidden;
    box-shadow: var(--hb-shadow);
    cursor: pointer;
    transition: box-shadow .2s;
}
.hb-boat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.15); }

.hb-card-img-area {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: #e5e7eb;
}
.hb-card-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.hb-boat-card:hover .hb-card-img { transform: scale(1.02); }
.hb-card-noimg {
    height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 14px;
}

.hb-disc-badge {
    position: absolute; top: 12px; right: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: #fff; padding: 6px 14px;
    border-radius: 6px; font-weight: 700; font-size: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    border: 2px solid rgba(255,255,255,.3);
}
.hb-disc-badge::before { content: '🔥'; margin-right: 4px; }

.hb-alt-badge {
    position: absolute; top: 12px; left: 12px;
    background: #7c3aed; color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 999px;
}

.hb-card-prev, .hb-card-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.5); color: #fff; border: none;
    width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; font-size: 20px; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.hb-card-prev:hover, .hb-card-next:hover { background: rgba(0,0,0,.75); }
.hb-card-prev { left: 10px; }
.hb-card-next { right: 10px; }

.hb-card-img-count {
    position: absolute; bottom: 10px; right: 12px;
    background: rgba(0,0,0,.65); color: #fff;
    padding: 5px 12px; border-radius: 20px;
    font-size: 13px; font-weight: 600;
}

.hb-card-body { padding: 16px 18px; }

.hb-card-name { font-size: 22px; font-weight: 700; color: #1a1a1a; margin-bottom: 2px !important; }
.hb-card-model { font-size: 14px; color: #666; margin-bottom: 10px !important; }
.hb-card-desc {
    font-size: 13px; color: #1a1a1a;
    margin-bottom: 10px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hb-card-specs {
    display: flex; gap: 14px; flex-wrap: wrap;
    margin-bottom: 10px !important;
    font-size: 13px; color: #333;
}
.hb-spec {
    display: flex; align-items: center; gap: 4px;
}
.hb-ico { display: inline-flex; align-items: center; }
.hb-ico svg { width: 15px; height: 15px; }

.hb-card-dates {
    display: flex; align-items: center; gap: 5px;
    font-size: 13px; color: #555;
    margin-bottom: 12px !important;
}
.hb-card-dates .hb-ico svg { width: 14px; height: 14px; }

.hb-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--hb-border);
    gap: 12px;
}

.hb-card-price-block { line-height: 1.2 !important; }
.hb-card-orig { font-size: 14px; color: #999; text-decoration: line-through; }
.hb-card-price { font-size: 28px; font-weight: 700; color: #1a1a1a; }
.hb-card-nights { font-size: 13px; font-weight: 600; color: #e74c3c; }

.hb-book-btn {
    background: var(--hb-primary);
    color: #fff; border: none;
    padding: 12px 22px;
    font-size: 15px; font-weight: 700;
    border-radius: 6px; cursor: pointer;
    white-space: nowrap;
    font-family: var(--hb-font);
    transition: background .2s;
    flex-shrink: 0;
}
.hb-book-btn:hover { background: #15294a; }

/* ── Modal Overlay ─────────────────────────────────────────── */
.hb-overlay {
    display: none;
    /* Fixed to viewport — works because JS moves this to <body> */
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    background: rgba(0,0,0,.7);
    z-index: 9999999 !important;
    overflow: hidden !important;
}
.hb-overlay[style*="block"],
.hb-overlay[style*="flex"] { display: block !important; }

/* ── Modal container — height/position set by JS after render ── */
.hb-modal {
    position: fixed !important;
    background: #fff;
    border-radius: var(--hb-radius);
    overflow: hidden !important;
    pointer-events: all;
}

.hb-loading {
    padding: 60px;
    text-align: center;
    color: #666;
    font-size: 15px;
}
.hb-spin { font-size: 24px; display: inline-block; animation: hb-spin .7s linear infinite; }
@keyframes hb-spin { to { transform: rotate(360deg); } }

/* ── Modal Inner — height controlled by JS ── */
.hb-modal-inner {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Gallery ── */
.hb-mg-wrap {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
    flex-shrink: 0;
    /* height set by JS */
}
.hb-mg-wrap img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.hb-mg-noimg {
    height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 14px;
}
.hb-mg-prev, .hb-mg-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.2);
    color: #fff; border: none;
    width: 48px; height: 48px; border-radius: 50%;
    font-size: 22px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s; z-index: 5;
}
.hb-mg-prev:hover, .hb-mg-next:hover { background: rgba(255,255,255,.4); }
.hb-mg-prev { left: 14px; }
.hb-mg-next { right: 14px; }
.hb-mg-count {
    position: absolute; bottom: 12px; right: 14px;
    background: rgba(0,0,0,.6); color: #fff;
    padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600;
}
.hb-mg-close {
    position: absolute; top: 12px; right: 12px;
    background: rgba(255,255,255,.2); color: #fff; border: none;
    width: 34px; height: 34px; border-radius: 50%;
    font-size: 20px; cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.hb-mg-close:hover { background: rgba(255,255,255,.4); }

/* Scrollable content area */
.hb-modal-scroll {
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain;
    padding-bottom: 24px;
    /* explicit height set by JS — this is the only reliable way */
}

.hb-modal-boatname {
    font-size: 20px; font-weight: 700;
    padding: 16px 20px 2px;
    color: #1a1a1a;
}
.hb-modal-boatsub {
    font-size: 13px; color: #888;
    padding: 0 20px 14px;
}

/* Section titles */
.hb-sec-title {
    background: var(--hb-bg);
    padding: 10px 20px;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #555;
    border-top: 1px solid var(--hb-border);
    border-bottom: 1px solid var(--hb-border);
}

/* ── Technical Details ─────────────────────────────────────── */
.hb-tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0 12px;
    border-bottom: 1px solid var(--hb-border);
}
.hb-tech-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 8px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}
.hb-tech-cell:nth-last-child(-n+2) { border-bottom: none; }
.hb-tc-lbl { color: #888; flex: 1; }
.hb-tc-val { font-weight: 600; color: #1a1a1a; }
.hb-tech-cell .hb-ico { color: #6b7280; }
.hb-tech-cell .hb-ico svg { width: 15px; height: 15px; }

/* ── Equipment ─────────────────────────────────────────────── */
.hb-equip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--hb-border);
}
.hb-equip-item {
    font-size: 13px; color: #333;
    display: flex; align-items: center; gap: 6px;
}
.hb-equip-item::before { content: ''; }  /* checkmark is in JS */

/* ── Mandatory Extras ──────────────────────────────────────── */
.hb-mand-list {
    padding: 12px 20px;
    border-bottom: 1px solid var(--hb-border);
}
.hb-mand-item {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.hb-mand-item:last-child { margin-bottom: 0; }
.hb-mand-name { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.hb-mand-desc { font-size: 12px; color: #666; margin-top: 2px !important; }
.hb-mand-price { font-size: 15px; font-weight: 700; color: #1a1a1a; white-space: nowrap; }

/* ── Optional Extras ───────────────────────────────────────── */
.hb-opt-list {
    padding: 8px 20px;
    border-bottom: 1px solid var(--hb-border);
}
.hb-opt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 12px;
}
.hb-opt-item:last-child { border-bottom: none; }
.hb-opt-label {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; flex: 1;
}
.hb-opt-label input[type=checkbox] {
    width: 18px; height: 18px; cursor: pointer;
    accent-color: var(--hb-primary); flex-shrink: 0;
    border: 2px solid #d1d5db;
    border-radius: 3px;
}
.hb-opt-name { font-size: 13px; color: #1a1a1a; font-style: italic; }
.hb-opt-name small { color: #888; font-size: 11px; }
.hb-opt-price { font-size: 14px; font-weight: 600; color: #1a1a1a; white-space: nowrap; }

/* ── Security Deposit ──────────────────────────────────────── */
.hb-sec-dep {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 13px;
    color: #1e40af;
    font-style: italic;
    margin: 12px 20px;
}

/* ── Calculation ───────────────────────────────────────────── */
.hb-calc {
    padding: 0 20px 16px;
    background: #f9fafb;
    border-bottom: 1px solid var(--hb-border);
}
.hb-calc-row {
    display: flex; justify-content: space-between;
    padding: 8px 0; font-size: 14px;
    border-bottom: 1px solid var(--hb-border);
    color: #555;
}
.hb-calc-row:last-child { border-bottom: none; }
.hb-calc-row span strong, .hb-calc-row strong { color: #1a1a1a; }
.hb-calc-opt { color: #333; }
.hb-calc-total-row {
    border-top: 2px solid #333 !important;
    padding-top: 10px; margin-top: 4px;
    border-bottom: none !important;
}
.hb-calc-total-row span, .hb-calc-total-row strong { font-size: 16px !important; font-weight: 700; color: #1a1a1a; }

.hb-calc-inbase {
    background: #fef3c7;
    border-radius: 6px;
    padding: 8px 10px;
    margin-top: 10px;
}
.hb-calc-sm {
    display: flex; justify-content: space-between;
    font-size: 13px; color: #92400e;
    padding: 3px 0;
}
.hb-calc-grand-row {
    border-top: 1px solid #d97706;
    padding-top: 5px; margin-top: 4px;
    font-weight: 700;
}

.hb-calc-deposit-row {
    background: #e0f2fe;
    border-radius: 6px;
    padding: 12px 14px;
    margin-top: 12px;
    font-size: 14px;
    color: #0c4a6e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hb-calc-deposit-row strong { font-size: 20px; font-weight: 700; color: #0284c7; }

/* ── Payment Info ──────────────────────────────────────────── */
.hb-pay-info {
    background: #e0f2fe;
    padding: 14px 20px;
    border-bottom: 1px solid var(--hb-border);
}
.hb-pay-title { font-weight: 700; font-size: 14px; color: #0c4a6e; margin-bottom: 6px !important; }
.hb-pay-info p { font-size: 13px; color: #0c4a6e; margin-bottom: 4px !important; }

/* ── User Form ─────────────────────────────────────────────── */
.hb-user-form { padding: 14px 20px; border-bottom: 1px solid var(--hb-border); }

.hb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.hb-form-group { display: flex; flex-direction: column; gap: 4px; }
.hb-form-group label { font-size: 13px; font-weight: 600; color: #333; }
.hb-inp {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    color: #1a1a1a;
    font-family: var(--hb-font);
}
.hb-inp:focus { outline: 2px solid var(--hb-primary); border-color: transparent; }
.hb-inp.hb-err { border-color: #ef4444; }

/* T&C checkbox */
.hb-tc-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 4px;
}
.hb-tc-row input[type=checkbox] {
    margin-top: 2px; width: 16px; height: 16px;
    accent-color: var(--hb-primary); flex-shrink: 0; cursor: pointer;
}
.hb-tc-row label { font-size: 13px; color: #333; cursor: pointer; }
.hb-tc-row a { color: #3b82f6; text-decoration: underline; font-size: inherit; }
.hb-tc-row a strong { font-weight: 700; font-size: inherit; }

/* ── Modal Footer ──────────────────────────────────────────── */
.hb-modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid var(--hb-border);
    background: #fff;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.hb-btn-cancel {
    background: var(--hb-gray-btn);
    color: #fff; border: none;
    padding: 14px; font-size: 16px; font-weight: 600;
    border-radius: 6px; cursor: pointer;
    font-family: var(--hb-font);
    transition: opacity .2s;
}
.hb-btn-cancel:hover { opacity: .85; }

.hb-btn-checkout {
    background: var(--hb-green);
    color: #fff; border: none;
    padding: 14px; font-size: 16px; font-weight: 600;
    border-radius: 6px; cursor: pointer;
    font-family: var(--hb-font);
    transition: background .2s;
}
.hb-btn-checkout:hover { background: var(--hb-green-h); }
.hb-btn-checkout:disabled { opacity: .7; cursor: not-allowed; }
.hb-co-spin { display: inline-block; animation: hb-spin .7s linear infinite; }

/* ── Lightbox ──────────────────────────────────────────────── */
.hb-lightbox {
    display: none;
    position: fixed !important; inset: 0; z-index: 10000000 !important;
    background: rgba(0,0,0,.95);
    align-items: center; justify-content: center;
}
.hb-lightbox[style*="block"] { display: flex !important; }
.hb-lb-bg { position: absolute; inset: 0; cursor: pointer; }
.hb-lb-inner {
    position: relative; z-index: 1;
    max-width: 90vw; max-height: 90vh;
}
.hb-lb-inner img {
    max-width: 90vw; max-height: 80vh;
    object-fit: contain; display: block; border-radius: 4px;
}
.hb-lb-close, .hb-lb-prev, .hb-lb-next {
    position: absolute; background: rgba(255,255,255,.2);
    color: #fff; border: none; border-radius: 50%;
    width: 52px; height: 52px;
    cursor: pointer; font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s; z-index: 2;
    backdrop-filter: blur(8px);
}
.hb-lb-close:hover, .hb-lb-prev:hover, .hb-lb-next:hover { background: rgba(255,255,255,.35); }
.hb-lb-close { top: -60px; right: 0; }
.hb-lb-prev  { left: -70px; top: 50%; transform: translateY(-50%); }
.hb-lb-next  { right: -70px; top: 50%; transform: translateY(-50%); }
.hb-lb-count { position: absolute; bottom: -36px; left: 50%; transform: translateX(-50%); color: #ccc; font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ── Success Modal ─────────────────────────────────────────── */
.hb-success-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 460px; width: 100%;
    padding: 32px 28px;
    text-align: center;
    margin: auto;
}
.hb-succ-icon {
    width: 60px; height: 60px;
    background: var(--hb-green); color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin: 0 auto 14px !important;
}
.hb-success-modal h2 { font-size: 22px; margin-bottom: 14px !important; }
.hb-succ-code { font-size: 30px; font-weight: 700; letter-spacing: 4px; color: var(--hb-primary); margin: 10px 0 16px !important; }
.hb-succ-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--hb-border); font-size: 14px; text-align: left; }
.hb-succ-home {
    display: block; width: 100%;
    background: var(--hb-primary); color: #fff; border: none;
    padding: 13px; font-size: 15px; font-weight: 600;
    border-radius: 6px; cursor: pointer; margin-top: 18px;
    font-family: var(--hb-font);
}

/* ── Toast ─────────────────────────────────────────────────── */
.hb-toast {
    position: fixed; bottom: 24px; right: 24px;
    background: #1a202c; color: #fff;
    padding: 12px 20px; border-radius: 8px;
    font-size: 14px; z-index: 300000;
    max-width: 360px;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    font-family: var(--hb-font);
}
.hb-te { background: #dc2626; }
.hb-ts { background: #16a34a; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 700px) {
    .hb-date-fields { grid-template-columns: 1fr; }
    .hb-boats-grid  { grid-template-columns: 1fr; }
    .hb-tech-grid   { grid-template-columns: 1fr; }
    .hb-equip-grid  { grid-template-columns: 1fr; }
    .hb-form-row    { grid-template-columns: 1fr; }
    .hb-lb-prev { left: 8px; }
    .hb-lb-next { right: 8px; }
    .hb-lb-close { top: -44px; right: 0; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — Full overrides for Divi + WordPress
   ════════════════════════════════════════════════════════════ */

/* ── Small screens (≤ 600px) ─────────────────────────────── */
@media (max-width: 600px) {

    /* Search */
    .hb-search-box { padding: 14px 14px; }
    .hb-date-fields { grid-template-columns: 1fr; gap: 10px; }
    .hb-date-input { font-size: 16px !important; padding: 13px 14px !important; }
    .hb-search-btn { padding: 13px 20px !important; font-size: 16px !important; }

    /* Results header */
    .hb-results-header { font-size: 13px; }

    /* Boat cards — single column */
    .hb-boats-grid { grid-template-columns: 1fr !important; gap: 14px; }
    .hb-card-img-area { height: 220px !important; }
    .hb-card-body { padding: 12px 14px; }
    .hb-card-name { font-size: 18px !important; }
    .hb-card-price { font-size: 22px !important; }
    .hb-card-specs { gap: 10px; }

    /* Modal — full screen on mobile */
    .hb-overlay { overflow: hidden !important; }
    .hb-modal {
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important; /* dynamic viewport height for mobile browsers */
        max-height: none !important;
        border-radius: 0 !important;
        transform: none !important;
    }
    .hb-modal-inner { flex: 1 !important; min-height: 0 !important; overflow: visible !important; height: 100% !important; }

    /* Gallery — fixed height on mobile, shorter than desktop */
    .hb-mg-wrap {
        height: 220px !important;
        max-height: 220px !important;
        min-height: 160px !important;
    }
    .hb-mg-prev, .hb-mg-next { width: 38px !important; height: 38px !important; font-size: 18px !important; }
    .hb-mg-prev { left: 8px !important; }
    .hb-mg-next { right: 8px !important; }
    .hb-mg-close { top: 8px !important; right: 8px !important; }
    .hb-mg-count { font-size: 12px !important; padding: 3px 10px !important; }

    /* Modal scroll — fill remaining height */
    .hb-modal-scroll {
        flex: 1 !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 32px !important; /* extra on mobile so T&C clears footer */
    }

    .hb-modal-boatname { font-size: 17px !important; padding: 12px 14px 2px !important; }
    .hb-modal-boatsub  { padding: 0 14px 10px !important; }
    .hb-sec-title { padding: 9px 14px !important; }

    /* Tech grid — single column on mobile */
    .hb-tech-grid { grid-template-columns: 1fr !important; padding: 0 8px !important; }
    .hb-tech-cell { padding: 8px 6px !important; border-bottom: 1px solid #f3f4f6 !important; }
    .hb-tech-cell:nth-last-child(-n+2) { border-bottom: 1px solid #f3f4f6 !important; }
    .hb-tech-cell:last-child { border-bottom: none !important; }

    /* Extras */
    .hb-mand-list { padding: 10px 14px !important; }
    .hb-mand-item { padding: 9px 12px !important; }
    .hb-mand-name { font-size: 13px !important; }
    .hb-mand-price { font-size: 14px !important; }
    .hb-opt-list { padding: 6px 14px !important; }
    .hb-opt-item { padding: 8px 0 !important; }
    .hb-opt-name { font-size: 12px !important; }

    /* Security deposit */
    .hb-sec-dep { margin: 10px 14px !important; font-size: 12px !important; }

    /* Calculation */
    .hb-calc { padding: 0 14px 14px !important; }
    .hb-calc-row { font-size: 13px !important; }
    .hb-calc-total-row span,
    .hb-calc-total-row strong { font-size: 14px !important; }
    .hb-calc-deposit-row { font-size: 13px !important; padding: 10px 12px !important; }
    .hb-calc-deposit-row strong { font-size: 17px !important; }

    /* Payment info */
    .hb-pay-info { padding: 12px 14px !important; }
    .hb-pay-info p { font-size: 12px !important; }

    /* User form */
    .hb-user-form { padding: 12px 14px !important; }
    .hb-form-row { grid-template-columns: 1fr !important; gap: 10px !important; margin-bottom: 10px !important; }
    .hb-inp { font-size: 16px !important; padding: 11px 12px !important; } /* 16px prevents iOS zoom */
    .hb-form-group label { font-size: 12px !important; }
    .hb-tc-row label { font-size: 12px !important; }

    /* Footer buttons */
    .hb-modal-footer { padding: 12px 14px !important; gap: 10px !important; }
    .hb-btn-cancel, .hb-btn-checkout { padding: 13px !important; font-size: 15px !important; }

    /* Lightbox */
    .hb-lb-prev { left: 6px !important; width: 44px !important; height: 44px !important; }
    .hb-lb-next { right: 6px !important; width: 44px !important; height: 44px !important; }
    .hb-lb-close { top: 10px !important; right: 10px !important; position: fixed !important; }
    .hb-lb-count { bottom: 16px !important; }

    /* Toast */
    .hb-toast { left: 14px !important; right: 14px !important; bottom: 14px !important; max-width: none !important; }

    /* Flatpickr on mobile */
    .flatpickr-calendar { width: 100% !important; max-width: 340px !important; }
}

/* ── Medium screens (601–900px) ──────────────────────────── */
@media (min-width: 601px) and (max-width: 900px) {
    .hb-boats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .hb-modal { max-width: 520px !important; }
    .hb-form-row { grid-template-columns: 1fr 1fr !important; }
}

/* ── Divi theme overrides ─────────────────────────────────── */
/* Prevent Divi from breaking our grid layouts */
.higanas-booking-wrap .et_pb_row,
.higanas-booking-wrap .et_pb_column,
.higanas-booking-wrap .et-pb-icon,
.higanas-booking-wrap .et_pb_text_inner { all: unset !important; }

/* Prevent Divi line-height reset from affecting our compact layout */
.higanas-booking-wrap p,
.higanas-booking-wrap div,
.higanas-booking-wrap span,
.higanas-booking-wrap label {
    line-height: 1.4 !important;
}

/* Ensure inputs aren't styled by theme */
.higanas-booking-wrap input[type="text"],
.higanas-booking-wrap input[type="email"],
.higanas-booking-wrap input[type="tel"],
.higanas-booking-wrap input[type="checkbox"],
.higanas-booking-wrap button,
.hb-modal-inner input[type="text"],
.hb-modal-inner input[type="email"],
.hb-modal-inner input[type="tel"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 4px !important;
}

/* Fix iOS tap highlight */
.hb-book-btn,
.hb-btn-cancel,
.hb-btn-checkout,
.hb-mg-prev,
.hb-mg-next,
.hb-card-prev,
.hb-card-next,
.hb-lb-prev,
.hb-lb-next {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Ensure overlay scrolls on iOS */
.hb-overlay {
    -webkit-overflow-scrolling: touch;
    overflow-y: scroll;
}
