/* ==========================================================================
   Ray Blessed Auto Sales — woocommerce.css (made by Escopanel)
   Car showroom: filter bar, car cards, spec sheets, deposit checkout.
   ========================================================================== */

.rb-shop { padding-bottom: clamp(48px, 7vw, 80px); }

/* filter bar */
.rb-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #fff; border: 1px solid var(--rb-line); border-radius: var(--rb-radius); padding: 14px; margin: 10px 0 22px; box-shadow: 0 10px 30px -26px rgba(11, 31, 58, 0.5); }
.rb-filters select, .rb-filters input { padding: 11px 12px; border: 1px solid var(--rb-line); border-radius: 10px; background: #fff; font: 400 14px/1.4 var(--rb-font-body); width: 100%; }
.rb-filters select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230b1f3a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.rb-filters select:focus, .rb-filters input:focus { outline: none; border-color: var(--rb-navy); box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.25); }
.rb-filters .rb-btn { padding: 11px 16px; }
.rb-filters__reset { align-self: center; justify-self: start; font-size: 13px; color: var(--rb-muted); text-decoration: underline; }

/* result count / ordering */
.woocommerce-result-count { color: var(--rb-muted); font-size: 13px; margin: 0 0 14px; display: inline-block; }
.woocommerce-ordering { float: right; margin: -4px 0 14px; }
.woocommerce-ordering select { padding: 9px 32px 9px 13px; border: 1px solid var(--rb-line); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230b1f3a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; -webkit-appearance: none; font: inherit; font-size: 13px; }

/* car grid */
ul.products { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: 1fr; clear: both; }
/* Defeat WooCommerce core layout floats/widths if its stylesheets ever load. */
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product, .woocommerce ul.products[class*="columns-"] li.product { width: 100% !important; float: none !important; margin: 0 !important; clear: none !important; }
.woocommerce ul.products li.product img { width: 100% !important; height: auto; }

/* car card */
.rb-car-card { background: #fff; border: 1px solid var(--rb-line); border-radius: var(--rb-radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.25s; position: relative; }
.rb-car-card:hover { transform: translateY(-4px); box-shadow: var(--rb-shadow); }
.rb-car-card__media { display: block; position: relative; background: #eef1f6; }
.rb-car-card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.rb-badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--rb-gold); color: var(--rb-navy); font: 700 11px/1 var(--rb-font-body); letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.rb-badge--sold { background: #b42318; color: #fff; }
.rb-car-card.is-sold .rb-car-card__media img { filter: grayscale(0.9); opacity: 0.75; }
.rb-car-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rb-car-card__make { font: 600 11.5px/1 var(--rb-font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--rb-gold-dark); }
.rb-car-card__title { font-size: 17px; margin: 0; }
.rb-car-card__title a { color: var(--rb-ink); }
.rb-car-card__title a:hover { color: var(--rb-navy); }
.rb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--rb-soft); border: 1px solid var(--rb-line); border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--rb-text); white-space: nowrap; }
.rb-chip .icon { color: var(--rb-navy); }
.rb-car-card__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--rb-line); }
.rb-car-card__price .price { font: 800 19px/1.1 var(--rb-font-display); color: var(--rb-navy); display: block; }
.rb-car-card__price .price del { color: var(--rb-muted); font-weight: 500; font-size: 14px; margin-right: 6px; }
.rb-car-card__price .price ins { text-decoration: none; }
.rb-car-card__price small { color: var(--rb-muted); font-size: 12px; }

/* pagination */
.woocommerce-pagination { text-align: center; margin-top: 30px; clear: both; }
.woocommerce-pagination .page-numbers { display: inline-flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.woocommerce-pagination a.page-numbers, .woocommerce-pagination span.page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--rb-line); border-radius: 10px; background: #fff; color: var(--rb-ink); padding: 0 10px; font-size: 13.5px; }
.woocommerce-pagination span.page-numbers.current { background: var(--rb-navy); color: #fff; border-color: var(--rb-navy); }

/* notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error { list-style: none; margin: 0 0 20px; padding: 13px 18px; border: 1px solid var(--rb-line); border-left: 3px solid var(--rb-navy); border-radius: 10px; background: #fff; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.woocommerce-error { border-left-color: #b42318; }
.woocommerce-message .button, .woocommerce-info .button { margin-left: auto; order: 2; }
.woocommerce-store-notice { background: var(--rb-navy); color: #fff; text-align: center; padding: 9px; font-size: 13px; }

/* buttons (WC contexts) */
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button, .woocommerce #respond input#submit, .wc-block-components-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--rb-navy); color: #fff; border: 1.5px solid var(--rb-navy); border-radius: 10px; padding: 11px 20px; font: 600 13.5px/1.2 var(--rb-font-body); cursor: pointer; transition: background 0.2s, color 0.2s, box-shadow 0.2s; text-align: center; }
.woocommerce .button:hover, .woocommerce a.button:hover { background: var(--rb-navy-2); color: #fff; box-shadow: var(--rb-shadow); }
.woocommerce .button.alt, .woocommerce #payment #place_order, .single_add_to_cart_button { background: var(--rb-gold); border-color: var(--rb-gold); color: var(--rb-navy); }
.woocommerce .button.alt:hover, .woocommerce #payment #place_order:hover, .single_add_to_cart_button:hover { background: var(--rb-gold-dark); border-color: var(--rb-gold-dark); color: #fff; }
.woocommerce .added_to_cart { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--rb-gold-dark); }

/* single car */
.single-product div.product { display: grid; gap: 30px; padding-top: 4px; }
.single-product .woocommerce-product-gallery { border: 1px solid var(--rb-line); border-radius: var(--rb-radius); overflow: hidden; background: #eef1f6; }
.single-product .woocommerce-product-gallery__image img { object-fit: cover; }
.single-product .woocommerce-product-gallery .flex-control-thumbs { display: flex; gap: 8px; list-style: none; padding: 10px; margin: 0; flex-wrap: wrap; background: #fff; }
.single-product .woocommerce-product-gallery .flex-control-thumbs li { width: 72px; }
.single-product .woocommerce-product-gallery .flex-control-thumbs img { border: 1.5px solid var(--rb-line); border-radius: 8px; opacity: 0.65; cursor: pointer; }
.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active { opacity: 1; border-color: var(--rb-gold); }
.single-product .summary { display: flex; flex-direction: column; gap: 12px; }
.single-product .product_title { font-size: clamp(25px, 3.2vw, 38px); margin: 0; }
.single-product .summary .price { font: 800 clamp(22px, 2.6vw, 30px)/1.1 var(--rb-font-display); color: var(--rb-navy); }
.rb-deposit-line { background: rgba(217, 164, 65, 0.13); border: 1px solid rgba(217, 164, 65, 0.5); border-radius: 10px; padding: 11px 14px; font-size: 14px; color: var(--rb-ink); }
.rb-deposit-line .woocommerce-Price-amount { font-weight: 700; }
.rb-ask-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--rb-navy); text-decoration: underline; }
.single-product .woocommerce-product-details__short-description { color: var(--rb-text); font-size: 15px; }
.single-product form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0; }
.single-product form.cart .qty { display: none; } /* one of each car */
.single-product .product_meta { font-size: 13px; color: var(--rb-muted); display: grid; gap: 4px; border-top: 1px solid var(--rb-line); padding-top: 14px; }
.woocommerce-tabs { grid-column: 1 / -1; }
.woocommerce-tabs ul.tabs { list-style: none; padding: 0; margin: 4px 0 18px; display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--rb-line); }
.woocommerce-tabs ul.tabs li a { display: inline-block; padding: 11px 16px; font-weight: 600; font-size: 14px; color: var(--rb-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.woocommerce-tabs ul.tabs li.active a { color: var(--rb-navy); border-color: var(--rb-gold); }
.woocommerce-tabs .panel { background: #fff; border: 1px solid var(--rb-line); border-radius: var(--rb-radius); padding: clamp(18px, 3vw, 28px); font-size: 14.5px; }

/* spec sheet */
.rb-specs { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.rb-spec { display: flex; justify-content: space-between; gap: 14px; padding: 11px 4px; border-bottom: 1px solid var(--rb-line); }
.rb-spec:last-child { border-bottom: 0; }
.rb-spec dt { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--rb-ink); font-size: 13.5px; margin: 0; }
.rb-spec dt .icon { color: var(--rb-gold-dark); }
.rb-spec dd { margin: 0; color: var(--rb-text); font-size: 13.5px; text-align: right; }

.related.products { grid-column: 1 / -1; margin-top: clamp(26px, 4vw, 44px); }
.related.products > h2 { font-size: 22px; margin-bottom: 16px; }

/* cart & checkout */
.rb-deposit-tag { display: block; font-size: 11.5px; color: var(--rb-muted); font-weight: 500; }
.rb-thankyou-note { background: rgba(217, 164, 65, 0.13); border: 1px solid rgba(217, 164, 65, 0.5); border-radius: 10px; padding: 13px 16px; font-size: 14.5px; }
.woocommerce table.shop_table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--rb-line); border-radius: var(--rb-radius); overflow: hidden; font-size: 14px; }
table.shop_table th, table.shop_table td { padding: 13px 15px; border-bottom: 1px solid var(--rb-line); text-align: left; vertical-align: middle; }
table.shop_table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rb-muted); }
table.shop_table tr:last-child td, table.shop_table tr:last-child th { border-bottom: 0; }
table.shop_table .product-thumbnail img { width: 64px; border: 1px solid var(--rb-line); border-radius: 8px; }
table.shop_table .product-remove a { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border: 1px solid var(--rb-line); border-radius: 50%; color: var(--rb-ink); font-weight: 600; }
table.shop_table .product-remove a:hover { background: #b42318; border-color: #b42318; color: #fff; }
.woocommerce .coupon { display: flex; gap: 8px; flex-wrap: wrap; }
.woocommerce .coupon input[type="text"] { padding: 10px 14px; border: 1px solid var(--rb-line); border-radius: 10px; font: inherit; font-size: 13px; }
.cart_totals { border: 1px solid var(--rb-line); border-radius: var(--rb-radius); padding: 20px; max-width: 460px; margin: 24px 0 0 auto; background: #fff; }
.cart_totals table.shop_table { border: 0; }
.cart_totals .checkout-button { display: flex; width: 100%; margin-top: 10px; }
.woocommerce form .form-row { margin-bottom: 12px; }
.woocommerce form .form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--rb-ink); }
.woocommerce form .form-row .input-text, .woocommerce form .form-row select, .woocommerce form .form-row textarea, .select2-container .select2-selection--single { width: 100%; padding: 11px 13px; border: 1px solid var(--rb-line); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; height: auto; }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 1.5; padding: 0; }
.select2-container .select2-selection--single .select2-selection__arrow { top: 50%; transform: translateY(-50%); }
.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 48%; float: left; }
.woocommerce form .form-row-last { float: right; }
.woocommerce form .form-row-wide { clear: both; }
.woocommerce-checkout form.checkout { display: grid; gap: 26px; }
.woocommerce-checkout .col-1, .woocommerce-checkout .col-2 { width: auto; float: none; }
#order_review_heading { margin-top: 0; }
#order_review { border: 1px solid var(--rb-line); border-radius: var(--rb-radius); padding: 18px; background: #fff; }
#order_review table.shop_table { border: 0; }
#payment ul.payment_methods { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
#payment ul.payment_methods li { border: 1px solid var(--rb-line); border-radius: 10px; padding: 11px 13px; font-size: 14px; }
#payment .payment_box { background: var(--rb-soft); border-radius: 8px; padding: 10px 12px; margin-top: 8px; font-size: 13px; }
#payment #place_order { width: 100%; padding: 14px; font-size: 15px; }

/* account */
.woocommerce-account .woocommerce { display: grid; gap: 22px; }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.woocommerce-MyAccount-navigation a { display: inline-block; padding: 9px 15px; border: 1px solid var(--rb-line); border-radius: 10px; font-size: 13px; color: var(--rb-ink); background: #fff; }
.woocommerce-MyAccount-navigation .is-active a { background: var(--rb-navy); color: #fff; border-color: var(--rb-navy); }
.woocommerce-MyAccount-content { border: 1px solid var(--rb-line); border-radius: var(--rb-radius); padding: clamp(18px, 3vw, 28px); background: #fff; font-size: 14px; }
.woocommerce-form-login, .woocommerce-form-register { border: 1px solid var(--rb-line); border-radius: var(--rb-radius); padding: clamp(18px, 3vw, 28px); max-width: 480px; background: #fff; }

@media (max-width: 767px) {
  table.shop_table { display: block; border: 1px solid var(--rb-line); }
  table.shop_table thead { display: none; }
  table.shop_table tbody, table.shop_table tr, table.shop_table td { display: block; width: 100%; }
  table.shop_table tr { border-bottom: 1px solid var(--rb-line); padding: 10px 0; }
  table.shop_table td { border: 0; padding: 5px 14px; }
  table.shop_table td::before { content: attr(data-title); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rb-muted); }
  table.shop_table td.product-remove::before, table.shop_table td.product-thumbnail::before, table.shop_table td.actions::before { display: none; }
  .cart_totals { max-width: none; }
  .woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 100%; float: none; }
}
@media (min-width: 640px) {
  ul.products { grid-template-columns: repeat(2, 1fr); }
  .rb-filters { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .single-product div.product { grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: start; }
  .woocommerce-checkout form.checkout { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .woocommerce-account .woocommerce { grid-template-columns: 220px 1fr; align-items: start; }
  .woocommerce-MyAccount-navigation ul { flex-direction: column; }
  .rb-specs { grid-template-columns: 1fr 1fr; gap: 0 34px; }
}
@media (min-width: 1024px) {
  ul.products, ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
  ul.products.columns-4 { grid-template-columns: repeat(4, 1fr); }
  ul.products.columns-2 { grid-template-columns: repeat(2, 1fr); }
  .rb-filters { grid-template-columns: repeat(5, 1fr) auto; }
}

/* ---------- finance strip (cards + car page) ---------- */
.rb-finance { display: flex; align-items: stretch; justify-content: space-between; gap: 6px; background: var(--rb-soft); border: 1px solid var(--rb-line); border-radius: 12px; padding: 12px 12px; margin: 4px 0 0; }
.rb-finance__col { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; flex: 1; min-width: 0; }
.rb-finance__col + .rb-finance__col { border-left: 1px solid var(--rb-line); padding-left: 6px; }
.rb-finance__col span { font: 600 11.5px/1.2 var(--rb-font-body); color: var(--rb-navy); letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 4px; }
.rb-finance__col strong { font: 800 18px/1.1 var(--rb-font-display); color: var(--rb-navy); white-space: nowrap; }
.rb-finance__plus { align-self: center; font: 700 18px/1 var(--rb-font-display); color: var(--rb-navy); padding: 0 2px; margin-top: 10px; }
.rb-finance__plus + .rb-finance__col { border-left: 0; padding-left: 0; }
.rb-save { color: #b42318; font: 600 13px/1.3 var(--rb-font-body); text-align: center; margin: 8px 0 0; }
.single-product .rb-finance { padding: 16px 14px; }
.single-product .rb-finance__col strong { font-size: clamp(20px, 2.2vw, 26px); }
.single-product .rb-finance__col span { font-size: 12.5px; }
.single-product .rb-save { text-align: left; font-size: 14px; }
/* tooltip */
.rb-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--rb-navy); font: 700 10px/1 var(--rb-font-body); color: var(--rb-navy); cursor: help; }
.rb-tip__box { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 260px; background: var(--rb-navy); color: #fff; font: 400 12.5px/1.5 var(--rb-font-body); text-align: left; padding: 12px 14px; border-radius: 10px; box-shadow: var(--rb-shadow); z-index: 20; white-space: normal; letter-spacing: 0; }
.rb-tip__box em { display: block; margin-top: 6px; color: var(--rb-gold); font-style: normal; font-weight: 600; }
.rb-tip:hover .rb-tip__box, .rb-tip:focus .rb-tip__box, .rb-tip:focus-within .rb-tip__box { display: block; }
.rb-car-card .rb-finance { margin-top: 6px; }
.rb-car-card__foot { border-top: 0; padding-top: 4px; }

/* plan choice on the car page */
.rb-plan-choice { display: grid; gap: 8px; width: 100%; margin: 4px 0 10px; }
.rb-plan-choice__opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--rb-line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; transition: border-color 0.2s, background 0.2s; }
.rb-plan-choice__opt:has(input:checked), .rb-plan-choice__opt.is-active { border-color: var(--rb-gold); background: rgba(217, 164, 65, 0.08); }
.rb-plan-choice__opt input { margin-top: 4px; accent-color: var(--rb-navy); }
.rb-plan-choice__opt strong { display: block; font-size: 14.5px; color: var(--rb-ink); }
.rb-plan-choice__opt small { color: var(--rb-muted); font-size: 12.5px; }

/* My Account → Payment plan */
.rb-plan { margin-bottom: 26px; }
.rb-plan h3 { font-size: 19px; margin-bottom: 4px; }
.rb-plan__meta { color: var(--rb-muted); font-size: 13.5px; margin: 0 0 8px; }
.rb-plan__bar { height: 8px; border-radius: 99px; background: var(--rb-line); overflow: hidden; margin-bottom: 14px; }
.rb-plan__bar span { display: block; height: 100%; background: var(--rb-gold); }
.rb-plan__table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rb-plan__table th, .rb-plan__table td { padding: 9px 8px; border-bottom: 1px solid var(--rb-line); text-align: left; }
.rb-plan__table tr.is-overdue td { color: #b42318; }
.rb-plan__table tr.is-paid td { color: var(--rb-muted); }
.rb-pill { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--rb-soft); }
.rb-pill--paid { background: #e6f4ea; color: #1b7f3b; }
@media (max-width: 420px) { .rb-finance__col strong { font-size: 15px; } .single-product .rb-finance__col strong { font-size: 18px; } }
@media (max-width: 767px) {
  .rb-tip__box { left: auto; right: -8px; transform: none; width: min(260px, 78vw); }
}
