/* เช่ารถ 35LINE MAN CAVE — ใช้สี/ตัวอักษรเดียวกับ site.css
   class ของการ์ดรถ ป๊อปอัป และปฏิทิน มาจาก /js/35Linemancave.js เดิม (ห้ามเปลี่ยนชื่อ) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reveal { opacity: 1; }
.hidden { display: none !important; }

/* หัวหน้า */
.rent-hero { padding-bottom: clamp(40px, 6vw, 80px); }
.rent-hero__in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px clamp(24px, 4vw, 64px); align-items: center; }
.rent-hero__img { margin: 0; position: relative; }
.rent-hero__img::before { content: ""; position: absolute; inset: 12% 0 6% 8%; background: var(--soft); border-radius: 50% 50% 6px 6px; z-index: -1; }
.rent-hero__img img { width: 100%; filter: drop-shadow(0 30px 30px rgba(0, 0, 0, .18)); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
.stat-card { padding: 18px 28px 0 0; margin-right: 28px; }
.stat-card + .stat-card { padding-left: 28px; border-left: 1px solid var(--line); }
.stat-card strong { display: block; font: 400 clamp(28px, 2.6vw, 40px)/1.1 var(--display); }
.stat-card span { font-size: 14px; color: var(--muted); }

/* หมวดรถ */
.rent-cats { padding-top: clamp(48px, 6vw, 90px); }
.rent-cats__list { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.rent-cats__list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line); height: 100%; transition: color .3s; }
.rent-cats__list b { font-size: 19px; }
.rent-cats__list span { grid-column: 1; color: var(--muted); font-size: 15px; }
.rent-cats__list .ic { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--red); }
.rent-cats__list a:hover { color: var(--red); }
.rent-cats__list a:hover .ic { transform: translateX(4px); }

.rent-feat, .rent-price, .rent-svc, .rent-trips { padding-top: clamp(80px, 10vw, 140px); }
.rent-hint { color: var(--muted); margin: -12px 0 28px; }

/* การ์ดรถ (สร้างโดยสคริปต์เดิม) */
.fleet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.6vw, 24px); }
.bike-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; transition: border-color .3s, transform .5s var(--ease), box-shadow .5s var(--ease); }
.bike-card:hover { border-color: var(--ink); transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .08); }
.bike-media { position: relative; aspect-ratio: 4 / 3; background: var(--soft); display: grid; place-items: center; overflow: hidden; }
.bike-media > img { width: 86%; height: 86%; object-fit: contain; transition: transform .6s var(--ease); }
.bike-card:hover .bike-media > img { transform: scale(1.04); }
.bike-badge { position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.bike-badge--unavailable { left: auto; right: 12px; background: var(--ink); color: #fff; border-color: var(--ink); }
.bike-card--unavailable .bike-media > img { opacity: .45; }
.bike-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.bike-brand { font-size: 13px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.bike-body h3 { font-size: 20px; line-height: 1.3; margin-top: 2px; }
.bike-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bike-specs li { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--soft); }
.bike-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 16px; }
.bike-price-stack strong { display: block; font-size: 19px; }
.bike-price-stack small { font-size: 13px; color: var(--muted); }
.card-link { font-size: 14px; font-weight: 600; color: var(--red); border-bottom: 1.5px solid currentColor; padding-bottom: 2px; white-space: nowrap; }

/* รถที่ยังไม่มีรูป: การ์ดสเปกสีดำ */
.bike-poster { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; background: var(--ink); color: #fff; text-align: left; }
.bike-poster__top { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.bike-poster__stripe { width: 28px; height: 2px; background: var(--red); }
.bike-poster__cat { font-size: 11px; letter-spacing: .14em; color: rgba(255, 255, 255, .6); }
.bike-poster__body { display: flex; flex-direction: column; }
.bike-poster__brand { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.bike-poster__model { font: 400 clamp(30px, 3vw, 44px)/1 var(--display); text-transform: uppercase; margin: 4px 0 8px; }
.bike-poster__cc { font-size: 13px; color: var(--red); font-weight: 600; }
.bike-modal-media-frame .bike-poster { border-radius: 6px; }

.fleet-state { grid-column: 1 / -1; text-align: center; padding: 56px 20px; background: var(--soft); border-radius: 6px; }
.fleet-state__icon { font-size: 36px; }
.fleet-state h3 { margin: 8px 0; font-size: 22px; }
.fleet-state p { color: var(--muted); margin-bottom: 20px; }
.fleet-empty { margin-top: 24px; color: var(--muted); }

/* ปุ่มแบบเดิมที่สคริปต์/ป๊อปอัปใช้ */
.btn-primary, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1.5px solid transparent; transition: background .3s, color .3s, border-color .3s; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--ink); }
.btn-ghost { border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ราคา */
.rent-price__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.6vw, 24px); }
.rent-price__card { display: flex; flex-direction: column; padding: clamp(24px, 2.4vw, 36px); border: 1px solid var(--line); border-radius: 6px; }
.rent-price__card.is-hot { background: var(--ink); color: #fff; border-color: var(--ink); }
.rent-price__tier { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.is-hot .rent-price__tier { color: var(--red); }
.rent-price__card h3 { font-size: 24px; margin-top: 6px; }
.rent-price__from { margin-top: 18px; }
.rent-price__from b { font: 400 clamp(40px, 4vw, 58px)/1 var(--display); }
.rent-price__from small, .rent-price__week small { color: var(--muted); font-size: 14px; }
.is-hot small { color: rgba(255, 255, 255, .6); }
.rent-price__week { font-weight: 600; margin-top: 4px; }
.rent-price__card ul { margin: 22px 0 28px; border-top: 1px solid var(--line); }
.is-hot ul { border-color: rgba(255, 255, 255, .2); }
.rent-price__card li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.is-hot li { border-color: rgba(255, 255, 255, .2); }
.rent-price__card .btn { margin-top: auto; align-self: flex-start; }
.is-hot .btn--red:hover { background: #fff; color: var(--ink); }

/* ขั้นตอน 4 ข้อ */
.rent-steps .proc__list { grid-template-columns: repeat(4, 1fr); }

/* รับ-ส่งรถ + ทริป */
.rent-svc__list, .rent-trips__list { display: grid; gap: clamp(14px, 1.6vw, 24px); }
.rent-svc__list { grid-template-columns: repeat(4, 1fr); }
.rent-trips__list { grid-template-columns: repeat(3, 1fr); }
.rent-svc__list li, .rent-trips__list li { padding: 24px; background: var(--soft); border-radius: 6px; }
.rent-svc__list small, .rent-trips__list small { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.rent-svc__list h3, .rent-trips__list h3 { font-size: 20px; line-height: 1.35; margin: 8px 0 6px; }
.rent-svc__list p, .rent-trips__list p { color: var(--muted); font-size: 15px; }
.rent-trips + .cta, .rent-fleet + .cta { margin-top: clamp(80px, 10vw, 140px); }

/* หน้ารถทั้งหมด: ตัวกรอง */
.rent-hero--sub { padding-bottom: clamp(32px, 4vw, 56px); }
.rent-tools { padding: 14px 0; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.fleet-filter { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filter-chip { flex: none; height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 15px; font-weight: 500; transition: border-color .3s, background .3s, color .3s; }
.filter-chip:hover { border-color: var(--ink); }
.filter-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.fleet-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 12px; }
.fleet-search { flex: 1 1 280px; }
.fleet-search input { width: 100%; height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; font: inherit; font-size: 15px; }
.fleet-search input:focus { outline: none; border-color: var(--ink); }
.fleet-price { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.fleet-price input { accent-color: var(--red); width: 160px; }
.fleet-count { font-size: 14px; color: var(--muted); }

/* ป๊อปอัปรายละเอียดรถ + ปฏิทิน */
body.modal-open { overflow: hidden; }
.bike-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; visibility: hidden; opacity: 0; transition: opacity .3s, visibility 0s .3s; }
.bike-modal.active { visibility: visible; opacity: 1; transition: opacity .3s; }
.bike-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 10, .6); }
.bike-modal-dialog { position: relative; width: min(1080px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; background: #fff; border-radius: 8px; transform: translateY(16px); transition: transform .4s var(--ease); }
.bike-modal.active .bike-modal-dialog { transform: none; }
.bike-modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 26px; line-height: 1; }
.bike-modal-close:hover { background: var(--red); }
.bike-modal-grid { display: grid; grid-template-columns: 1fr 1.05fr; }
.bike-modal-media { background: var(--soft); padding: clamp(20px, 3vw, 40px); }
.bike-modal-media-frame { position: sticky; top: 0; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.bike-modal-media-frame img { width: 100%; height: 100%; object-fit: contain; }
.bike-modal-body { padding: clamp(24px, 3vw, 40px); }
.modal-bike-brand { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bike-modal-body h3 { font: 400 clamp(34px, 3.4vw, 52px)/1 var(--display); text-transform: uppercase; margin: 4px 48px 10px 0; }
.modal-bike-desc { color: var(--muted); }
.modal-spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.modal-spec-item { padding: 12px 10px 12px 0; }
.modal-spec-item span { display: block; font-size: 12px; color: var(--muted); }
.modal-spec-item strong { font-size: 16px; }
.modal-spec-item small { display: block; font-size: 12px; color: var(--muted); }
.modal-spec-item--rate strong { color: var(--red); }
.modal-trackday-box { margin-top: 18px; padding: 16px; background: var(--soft); border-radius: 6px; }
.modal-trackday-title { font-weight: 700; margin-bottom: 8px; }
.trackday-item { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.modal-calendar-wrap { margin-top: 22px; }
.cal-status-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 6px; background: var(--soft); font-size: 15px; }
.cal-status-bar.is-range-set { background: var(--ink); color: #fff; }
.cal-step { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; margin-right: 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.cal-step.is-active { background: var(--red); border-color: var(--red); color: #fff; }
.cal-step.is-done { background: var(--red); border-color: var(--red); color: #fff; }
.cal-clear-btn { font-size: 14px; font-weight: 600; border-bottom: 1.5px solid currentColor; }
.cal-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.cal-preset { height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 14px; }
.cal-preset:hover { border-color: var(--ink); }
.modal-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-nav { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 20px; }
.cal-nav:hover { border-color: var(--ink); }
.modal-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal-day { display: grid; place-items: center; aspect-ratio: 1; max-height: 46px; width: 100%; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1.5px solid var(--line); transition: border-color .2s, background .2s; }
.cal-day:hover { border-color: var(--ink); }
.cal-day.is-empty { border: 0; cursor: default; }
.cal-day.is-past { color: #b9b9b9; border-color: transparent; background: #fafafa; cursor: not-allowed; }
.cal-day.is-booked { background: #2b2b2b; color: rgba(255, 255, 255, .55); border-color: #2b2b2b; cursor: not-allowed; text-decoration: line-through; }
.cal-day.is-service { background: repeating-linear-gradient(45deg, #ffe7e5 0 6px, #fff 6px 12px); color: var(--red-d); border-color: #f4c3bf; cursor: not-allowed; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--red); }
.cal-day.is-in-range { background: #fde3e1; border-color: #fde3e1; }
.cal-day.is-selected { background: var(--red); border-color: var(--red); color: #fff; }
.cal-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 12px; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: 6px; }
.cal-summary__dates { display: flex; flex-direction: column; font-size: 14px; }
.cal-summary__days { color: var(--muted); }
.cal-summary__price strong { font-size: 22px; color: var(--red); }
.modal-calendar-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.cal-legend { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend span { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--line); }
.cal-legend--booked span { background: #2b2b2b; border-color: #2b2b2b; }
.cal-legend--service span { background: repeating-linear-gradient(45deg, #ffe7e5 0 3px, #fff 3px 6px); border-color: #f4c3bf; }
.cal-legend--past span { background: #fafafa; border-color: transparent; }
.delivery-method-wrap { margin-top: 22px; }
.delivery-label, .field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.delivery-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.delivery-btn { height: 46px; border-radius: 6px; border: 1.5px solid var(--line); font-weight: 500; }
.delivery-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.extra-field { margin-top: 12px; }
.pickup-static-box { padding: 12px 14px; background: var(--soft); border-radius: 6px; font-size: 15px; }
.field input { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 6px; font: inherit; font-size: 15px; }
.field input:focus { outline: none; border-color: var(--ink); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.modal-actions .btn-primary { flex: 1 1 220px; }
.modal-note { margin-top: 12px; font-size: 13px; color: var(--muted); white-space: pre-line; }

@media (max-width: 1100px) {
  .fleet-grid { grid-template-columns: repeat(3, 1fr); }
  .rent-svc__list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .rent-hero__in { grid-template-columns: 1fr; }
  .rent-hero__img { order: -1; max-width: 520px; }
  .rent-cats__list { grid-template-columns: repeat(2, 1fr); }
  .rent-cats__list li:nth-child(odd) a { padding-right: 16px; }
  .fleet-grid { grid-template-columns: repeat(2, 1fr); }
  .rent-price__grid, .rent-trips__list { grid-template-columns: 1fr; }
  .rent-steps .proc__list { grid-template-columns: repeat(2, 1fr); }
  .bike-modal { padding: 0; place-items: end center; }
  .bike-modal-dialog { max-height: 94dvh; border-radius: 12px 12px 0 0; }
  .bike-modal-grid { grid-template-columns: 1fr; }
  .bike-modal-media { padding: 16px 16px 0; }
  .bike-modal-media-frame { position: relative; aspect-ratio: 16 / 9; }
  .modal-spec-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .fleet-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bike-body { padding: 12px; }
  .bike-body h3 { font-size: 17px; }
  .bike-specs { display: none; }
  .bike-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .bike-poster__model { font-size: 24px; }
  .bike-poster { padding: 12px; }
  .rent-cats__list, .rent-svc__list { grid-template-columns: 1fr; }
  .rent-steps .proc__list { grid-template-columns: 1fr; }
  .stat-card { padding-right: 16px; margin-right: 16px; }
  .stat-card + .stat-card { padding-left: 16px; }
  .fleet-price input { width: 120px; }
}
