/* ==========================================================================
   Jordan Routes – booking form, cart, checkout, account (WooCommerce)
   ========================================================================== */

/* ---------- Booking form ---------- */
.w2j-book { display: grid; gap: 16px; }
.w2j-field { margin: 0; min-width: 0; border: 0; padding: 0; }
.w2j-field > label:not(.w2j-vehicle):not(.w2j-extra), .w2j-field > legend, .w2j-counter-label { display: block; font-size: .88rem; font-weight: 500; color: var(--ink); margin-bottom: 6px; padding: 0; }
.w2j-field small, .w2j-counter-label small { font-weight: 400; color: var(--ink-3); }
.w2j-book select, .w2j-book input[type=text], .w2j-book input[type=time], .w2j-book input[type=date], .w2j-book textarea, .w2j-date-btn {
	width: 100%; min-height: 46px; padding: 10px 12px; font: 400 .98rem var(--font-body); color: var(--ink);
	background: var(--paper); border: 1px solid #d6cec4; border-radius: 8px;
}
.w2j-book textarea { min-height: 84px; resize: vertical; }
.w2j-book select:focus, .w2j-book input:focus, .w2j-book textarea:focus, .w2j-date-btn:focus { border-color: var(--sea); outline: 2px solid var(--sea-50); }
.w2j-date-btn { display: flex; align-items: center; justify-content: space-between; cursor: pointer; text-align: start; font-weight: 500; }
.w2j-date-btn::after { content: ""; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat; color: var(--sea); }
.w2j-date-btn.is-empty { color: var(--ink-3); font-weight: 400; }
.w2j-date-field { position: relative; }
.w2j-hint { font-size: .82rem; color: var(--ink-3); margin: 6px 0 0; }
.w2j-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Calendar */
.w2j-cal { position: absolute; z-index: 30; top: calc(100% + 6px); inset-inline: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: var(--shadow-pop); }
.w2j-cal[hidden] { display: none; }
.w2j-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.w2j-cal-head strong { font-weight: 500; }
.w2j-cal-nav { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 1.2rem; line-height: 1; color: var(--ink); }
.w2j-cal-nav:disabled { opacity: .3; cursor: default; }
.w2j-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.w2j-cal-wd { font-size: .72rem; color: var(--ink-3); padding: 4px 0; overflow: hidden; white-space: nowrap; }
.w2j-cal-day { aspect-ratio: 1; border: 0; border-radius: 8px; background: var(--stone); cursor: pointer; font: 500 .9rem var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.w2j-cal-day:hover:not(:disabled) { background: var(--sea-50); color: var(--sea-2); }
.w2j-cal-day:disabled { background: transparent; color: #c6bfb7; text-decoration: line-through; cursor: not-allowed; font-weight: 400; }
.w2j-cal-day[aria-pressed="true"] { background: var(--sea); color: #fff; }

/* Segmented control */
.w2j-seg { display: flex; flex-wrap: wrap; gap: 0; }
.w2j-seg legend { width: 100%; }
.w2j-seg label { flex: 1; position: relative; margin: 0; }
.w2j-seg input { position: absolute; opacity: 0; }
.w2j-seg span { display: block; text-align: center; padding: 10px 6px; border: 1px solid #d6cec4; font-size: .9rem; cursor: pointer; background: var(--paper); }
.w2j-seg label:first-of-type span { border-start-start-radius: 8px; border-end-start-radius: 8px; }
.w2j-seg label:last-of-type span { border-start-end-radius: 8px; border-end-end-radius: 8px; }
.w2j-seg label + label span { margin-inline-start: -1px; }
.w2j-seg input:checked + span { background: var(--sea); border-color: var(--sea); color: #fff; position: relative; }
.w2j-seg input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 1px; }

/* Vehicle / option cards */
.w2j-vehicles { display: grid; gap: 8px; }
.w2j-vehicle { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid #d6cec4; border-radius: 10px; cursor: pointer; }
.w2j-vehicle:has(input:checked) { border-color: var(--sea); background: var(--sea-50); }
.w2j-vehicle input { accent-color: var(--sea); width: 18px; height: 18px; margin: 0; }
.w2j-vehicle-name { display: block; font-weight: 500; font-size: .93rem; line-height: 1.35; }
.w2j-vehicle-note { display: block; font-size: .8rem; color: var(--ink-3); }
.w2j-vehicle-price { font-weight: 600; font-size: .95rem; white-space: nowrap; }

/* Counters */
.w2j-travellers { display: grid; gap: 10px; padding: 12px 0; border-block: 1px solid var(--line); }
.w2j-counter-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.w2j-travellers .w2j-counter-label { margin: 0; }
.w2j-travellers .w2j-counter-label small { display: block; }
.w2j-counter { display: inline-flex; align-items: center; border: 1px solid #d6cec4; border-radius: 99px; overflow: hidden; flex: none; }
.w2j-counter input { width: 44px; min-height: 38px; text-align: center; border: 0; font: 500 1rem var(--font-body); color: var(--ink); -moz-appearance: textfield; background: transparent; }
.w2j-counter input::-webkit-outer-spin-button, .w2j-counter input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.w2j-step { width: 38px; height: 38px; border: 0; background: var(--paper); cursor: pointer; font-size: 1.25rem; line-height: 1; color: var(--sea); }
.w2j-step:hover { background: var(--sea-50); }

/* Extras */
.w2j-extras { display: grid; gap: 8px; }
.w2j-extra { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; font-size: .92rem; cursor: pointer; margin: 0; padding: 6px 0; }
.w2j-extra input { accent-color: var(--sea); width: 18px; height: 18px; margin: 2px 0 0; }
.w2j-extra-name { line-height: 1.45; }
.w2j-extra-price { white-space: nowrap; font-weight: 500; text-align: end; }
.w2j-extra-price small { display: block; font-weight: 400; color: var(--ink-3); font-size: .78rem; }
.w2j-notes summary { cursor: pointer; font-size: .9rem; color: var(--ink-2); padding: 4px 0; }
.w2j-notes textarea { margin-top: 8px; }

/* Summary */
.w2j-summary { background: var(--stone); border-radius: 10px; padding: 14px 16px; }
.w2j-lines { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; font-size: .88rem; color: var(--ink-2); }
.w2j-lines:empty { display: none; }
.w2j-lines li { display: flex; justify-content: space-between; gap: 12px; }
.w2j-lines li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.w2j-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; }
.w2j-total strong { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.w2j-errors { color: #a1261a; font-size: .88rem; margin: 6px 0 0; }
.w2j-errors:empty { display: none; }
.w2j-btn-book { width: 100%; min-height: 54px; font-size: 1.08rem; }
.w2j-btn-book.is-busy { opacity: .7; pointer-events: none; }
.w2j-book .w2j-btn-wa { width: 100%; }
.w2j-reassure { text-align: center; font-size: .82rem; color: var(--ink-3); margin: 0; }
.w2j-qty { font-size: .9rem; color: var(--ink-2); }

/* ---------- WooCommerce notices ---------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner {
	list-style: none; margin: 0 0 20px; padding: 14px 18px; border-radius: 10px; font-size: .95rem;
	background: var(--sea-50); color: var(--sea-2); border: 1px solid #c8dede; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between;
}
.woocommerce-error { background: #fbeeee; color: #8e2318; border-color: #efcfcb; display: block; }
.woocommerce-error li { margin: 2px 0; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; }
.w2j-bookcard .woocommerce-error { margin-bottom: 14px; }

/* ---------- Buttons ---------- */
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button, .wc-block-components-button, .woocommerce #respond input#submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px;
	background: var(--ink); color: #fff; border: 0; border-radius: 8px; font: 500 .96rem var(--font-body); text-decoration: none; cursor: pointer;
}
.woocommerce .button:hover { background: #000; color: #fff; }
.woocommerce .button.alt, .woocommerce .checkout-button, .woocommerce #place_order { background: var(--rose); min-height: 54px; font-size: 1.05rem; }
.woocommerce .button.alt:hover, .woocommerce .checkout-button:hover, .woocommerce #place_order:hover { background: var(--rose-2); }
.woocommerce .button:disabled, .woocommerce .button.disabled { opacity: .5; }

/* ---------- Cart ---------- */
.woocommerce-cart .w2j-page-body, .woocommerce-checkout .w2j-page-body, .woocommerce-account .w2j-page-body { max-width: calc(var(--wrap) + var(--gutter) * 2); }
.woocommerce-cart-form { margin-bottom: 36px; }
.shop_table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.shop_table th, .shop_table td { padding: 16px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.shop_table thead th { font-weight: 500; font-size: .86rem; color: var(--ink-3); }
.shop_table .product-thumbnail img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; }
.shop_table .product-name a { color: var(--ink); font-weight: 500; text-decoration: none; font-size: 1.05rem; }
.shop_table .product-name a:hover { color: var(--rose); }
.shop_table .product-remove a { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ink-3) !important; text-decoration: none; font-size: 1.3rem; }
.shop_table .product-remove a:hover { background: #fbeeee; color: #8e2318 !important; }
dl.variation { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 8px 0 0; font-size: .86rem; color: var(--ink-2); }
dl.variation dt { font-weight: 500; color: var(--ink); }
dl.variation dd { margin: 0; }
dl.variation dd p { margin: 0; }
.shop_table .actions { text-align: end; }
.shop_table .coupon { display: inline-flex; gap: 8px; float: inline-start; }
.shop_table .coupon input { min-height: 46px; padding: 8px 12px; border: 1px solid #d6cec4; border-radius: 8px; font: inherit; }
.shop_table .coupon label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.woocommerce-cart-form button[name="update_cart"] { display: none; }
.cart-collaterals { display: flex; justify-content: flex-end; }
.cart_totals { width: 100%; max-width: 440px; background: var(--stone); border-radius: 14px; padding: 24px; }
.cart_totals h2 { font-size: 1.5rem; }
.cart_totals .shop_table th, .cart_totals .shop_table td { padding: 12px 0; background: transparent; }
.cart_totals .order-total strong .amount, .woocommerce-checkout-review-order-table .order-total .amount { font-size: 1.35rem; }
.wc-proceed-to-checkout { margin-top: 18px; }
.wc-proceed-to-checkout .checkout-button { width: 100%; }
.cart-empty.woocommerce-info { justify-content: center; font-size: 1.05rem; }
.return-to-shop { text-align: center; }

/* ---------- Checkout ---------- */
form.checkout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px 48px; align-items: start; }
form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
#customer_details { display: grid; gap: 24px; }
#customer_details .col-1, #customer_details .col-2 { width: auto; float: none; }
form.checkout #customer_details { grid-column: 1; grid-row: 1 / span 2; }
#order_review_heading { grid-column: 2; grid-row: 1; margin: 0; align-self: end; }
#order_review { grid-column: 2; grid-row: 2; background: var(--stone); border-radius: 16px; padding: 24px; position: sticky; top: calc(var(--header-h) + 20px); }
.woocommerce-checkout h3 { font-size: 1.4rem; margin-top: 0; }
.woocommerce form .form-row { margin: 0 0 16px; padding: 0; }
.woocommerce form .form-row label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 6px; }
.woocommerce form .form-row .required { color: var(--rose); text-decoration: none; border: 0; }
.woocommerce form .form-row .optional { color: var(--ink-3); font-weight: 400; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container .select2-selection--single {
	width: 100%; min-height: 48px; padding: 10px 14px; font: 400 1rem var(--font-body); color: var(--ink); background: var(--paper);
	border: 1px solid #d6cec4; border-radius: 8px; box-shadow: none;
}
.select2-container .select2-selection--single { display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; }
.woocommerce form .form-row textarea { min-height: 110px; }
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { border-color: var(--sea); outline: 2px solid var(--sea-50); }
.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: calc(50% - 8px); display: inline-block; vertical-align: top; }
.woocommerce form .form-row-first { margin-inline-end: 12px; }
.woocommerce-billing-fields__field-wrapper { display: flex; flex-wrap: wrap; gap: 0 16px; }
.woocommerce-billing-fields__field-wrapper .form-row { flex: 1 1 100%; }
.woocommerce-billing-fields__field-wrapper .form-row-first, .woocommerce-billing-fields__field-wrapper .form-row-last { flex: 1 1 calc(50% - 8px); width: auto; margin-inline-end: 0; }
.woocommerce form .form-row.woocommerce-invalid input.input-text { border-color: #c0392b; }
.woocommerce-checkout-review-order-table { margin-bottom: 20px; }
.woocommerce-checkout-review-order-table th, .woocommerce-checkout-review-order-table td { background: transparent; padding: 12px 0; }
.woocommerce-checkout-review-order-table .product-total { text-align: end; }
#payment .payment_methods { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
#payment .payment_methods > li { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
#payment .payment_methods label { font-weight: 500; cursor: pointer; }
#payment .payment_methods input { accent-color: var(--sea); margin-inline-end: 8px; }
#payment .payment_box { font-size: .88rem; color: var(--ink-2); padding-top: 6px; }
#payment .payment_box p { margin: 0; }
#payment .place-order { padding: 0; margin: 0; }
#payment #place_order { width: 100%; }
.woocommerce-terms-and-conditions-wrapper { font-size: .86rem; color: var(--ink-2); margin-bottom: 14px; }
.w2j-policy-note { font-size: .86rem; color: var(--ink-2); background: var(--paper); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--line); }
.w2j-policy-note p { margin: 4px 0 0; }
.woocommerce-form-login-toggle .woocommerce-info, .woocommerce-form-coupon-toggle .woocommerce-info { background: var(--stone); border-color: var(--line); color: var(--ink-2); }
.woocommerce-form-login, .checkout_coupon { background: var(--stone); padding: 18px; border-radius: 12px; margin-bottom: 20px; }

/* Thank-you page */
.woocommerce-order { max-width: 880px; }
.woocommerce-thankyou-order-received { font: 400 1.6rem/1.3 var(--font-display); color: var(--sea-2); background: var(--sea-50); border-radius: 14px; padding: 24px; }
.woocommerce-order-overview { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.woocommerce-order-overview li { background: var(--stone); border-radius: 10px; padding: 12px 14px; font-size: .85rem; color: var(--ink-3); }
.woocommerce-order-overview strong { display: block; color: var(--ink); font-size: 1rem; font-weight: 500; }
.woocommerce-customer-details address { font-style: normal; background: var(--stone); padding: 18px; border-radius: 12px; }

/* ---------- My account ---------- */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.woocommerce-MyAccount-navigation a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.woocommerce-MyAccount-navigation .is-active a, .woocommerce-MyAccount-navigation a:hover { background: var(--stone); color: var(--rose); }
.woocommerce-account:not(.logged-in) .woocommerce { display: block; max-width: 480px; }

/* ---------- Pagination ---------- */
.woocommerce-pagination, .navigation.pagination { margin-top: 48px; text-align: center; }
.woocommerce-pagination ul, .nav-links { list-style: none; display: inline-flex; gap: 6px; padding: 0; margin: 0; }
.woocommerce-pagination a, .woocommerce-pagination span, .nav-links a, .nav-links span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.woocommerce-pagination .current, .nav-links .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Reviews ---------- */
.woocommerce-Reviews-title, #reviews h2 { font-size: 1.75rem; }
.commentlist { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 18px; }
.commentlist .comment_container { display: grid; grid-template-columns: 48px 1fr; gap: 14px; }
.commentlist img.avatar { border-radius: 50%; width: 48px; height: 48px; }
.commentlist .meta { font-size: .88rem; color: var(--ink-3); }
.star-rating { position: relative; display: inline-block; width: 5.4em; height: 1.1em; font-size: .95rem; overflow: hidden; line-height: 1; letter-spacing: .1em; }
.star-rating::before { content: "★★★★★"; color: #e0d7cc; position: absolute; inset-inline-start: 0; top: 0; }
.star-rating span { position: absolute; inset-inline-start: 0; top: 0; overflow: hidden; padding-top: 1.5em; }
.star-rating span::before { content: "★★★★★"; color: var(--sun); position: absolute; top: 0; inset-inline-start: 0; }
p.stars a { display: inline-block; width: 1.4em; font-size: 1.3rem; text-indent: -999em; position: relative; color: var(--sun); text-decoration: none; }
p.stars a::before { content: "☆"; position: absolute; inset-inline-start: 0; text-indent: 0; }
p.stars:hover a::before, p.stars.selected a.active::before, p.stars.selected a:not(.active)::before { content: "★"; }
p.stars.selected a.active ~ a::before, p.stars a:hover ~ a::before { content: "☆"; }
#review_form textarea, #review_form input[type=text], #review_form input[type=email] { width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; border: 1px solid #d6cec4; border-radius: 8px; }
#review_form label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 6px; }
.woocommerce-noreviews { color: var(--ink-2); }
#reply-title { font: 400 1.35rem var(--font-display); display: block; margin-bottom: 12px; }

@media (max-width: 900px) {
	form.checkout { grid-template-columns: 1fr; }
	form.checkout #customer_details, #order_review_heading, #order_review { grid-column: 1; grid-row: auto; }
	#order_review { position: static; }
	.woocommerce-account .woocommerce { grid-template-columns: 1fr; }
	.shop_table.cart thead { display: none; }
	.shop_table.cart tr.cart_item { display: grid; grid-template-columns: 90px 1fr auto; gap: 4px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
	.shop_table.cart td { border: 0; padding: 0; }
	.shop_table.cart .product-thumbnail { grid-row: span 3; }
	.shop_table.cart .product-remove { grid-column: 3; grid-row: 1; }
	.shop_table.cart .product-price, .shop_table.cart .product-quantity { display: none; }
	.shop_table.cart td.product-subtotal { grid-column: 2; font-weight: 600; }
	.shop_table.cart td::before { display: none; }
	.cart-collaterals { display: block; }
	.cart_totals { max-width: none; }
}
