/**
 * NN Rent a Car — WooCommerce (cart, checkout, thank you, account).
 * Scoped to .nn-woo-main and WooCommerce body classes. Revert: dequeue 'nn-woocommerce' in inc/woocommerce-theme.php.
 */

.nn-woo-main {
  padding-top: 2rem;
  padding-bottom: 3rem;
  background: #f6f6f4;
}

/* Page wrap (woocommerce-page-wrap.php): horizontal padding comes from .container in main.css */
.nn-woo-main--wrapped {
  width: 100%;
  box-sizing: border-box;
}

/* Inner width: cart/checkout wrap uses .container — cap to readable content width; other nn-woo uses --container-max. */
.nn-woo-main__inner {
  margin-inline: auto;
}

body.nn-woocommerce-checkout .nn-woo-main--wrapped .nn-woo-main__inner.container,
body.nn-woocommerce-cart .nn-woo-main--wrapped .nn-woo-main__inner.container {
  width: 100%;
  box-sizing: border-box;
}

.nn-woo-main__inner:not(.container) {
  max-width: var(--container-max, 1200px);
}

/* Single root from the_content() should span the inner (avoids alignwide / layout-constrained ancestors squeezing checkout). */
.nn-woo-main--wrapped .nn-woo-main__inner > * {
  width: 100%;
  max-width: none !important;
  box-sizing: border-box;
}

.nn-woo-main .woocommerce,
.nn-woo-main .woocommerce-page {
  font-family: inherit;
  color: #1a1a1a;
  line-height: 1.5;
}

.nn-woo-main .woocommerce h1,
.nn-woo-main .woocommerce h2,
.nn-woo-main .woocommerce h3,
.nn-woo-main .woocommerce-cart h1,
.nn-woo-main .woocommerce-checkout h1 {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 1rem;
  color: #111;
}

.nn-woo-main .woocommerce table.shop_table {
  border-radius: 10px;
  border: 1px solid #e2e2df;
  overflow: hidden;
  background: #fff;
  border-collapse: separate;
  border-spacing: 0;
}

.nn-woo-main .woocommerce table.shop_table th,
.nn-woo-main .woocommerce table.shop_table td {
  border-color: #ececea;
  padding: 0.85rem 1rem;
}

.nn-woo-main .woocommerce table.shop_table thead th {
  background: #fafaf8;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #555;
}

.nn-woo-main .woocommerce .cart-collaterals .cart_totals,
.nn-woo-main .woocommerce-checkout-review-order-table {
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.nn-woo-main .woocommerce #respond input#submit,
.nn-woo-main .woocommerce a.button,
.nn-woo-main .woocommerce button.button,
.nn-woo-main .woocommerce input.button,
.nn-woo-main .woocommerce #place_order,
.nn-woo-main .woocommerce .button.alt {
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.25rem;
  background: var(--brand-gold, #c69b3c) !important;
  color: #111 !important;
  border: 1px solid var(--brand-gold, #c69b3c) !important;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.nn-woo-main .woocommerce #respond input#submit:hover,
.nn-woo-main .woocommerce a.button:hover,
.nn-woo-main .woocommerce button.button:hover,
.nn-woo-main .woocommerce input.button:hover,
.nn-woo-main .woocommerce #place_order:hover,
.nn-woo-main .woocommerce .button.alt:hover {
  background: #b58d35 !important;
  border-color: #b58d35 !important;
  color: #fff !important;
}

.nn-woo-main .woocommerce form .form-row input.input-text,
.nn-woo-main .woocommerce form .form-row textarea,
.nn-woo-main .woocommerce form .form-row select {
  border-radius: 8px;
  border: 1px solid #d4d4d0;
  padding: 0.65rem 0.85rem;
  background: #fff;
}

.nn-woo-main .woocommerce form .form-row input.input-text:focus,
.nn-woo-main .woocommerce form .form-row textarea:focus,
.nn-woo-main .woocommerce form .form-row select:focus {
  outline: 2px solid rgba(198, 155, 60, 0.45);
  outline-offset: 1px;
  border-color: var(--brand-gold, #c69b3c);
}

.nn-woo-main .woocommerce-checkout #customer_details .col-1,
.nn-woo-main .woocommerce-checkout #customer_details .col-2 {
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.nn-woo-main #order_review_heading,
.nn-woo-main .woocommerce-checkout-review-order {
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 10px;
  padding: 1.25rem;
}

.nn-woo-main .woocommerce-order {
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 10px;
  padding: 1.5rem;
}

.nn-woo-main .woocommerce-order-overview {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.nn-woo-main .woocommerce-order-overview li {
  border: 1px solid #ececea;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: #fafaf8;
  font-size: 0.9rem;
}

.nn-woo-main .woocommerce-MyAccount-navigation {
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 10px;
  padding: 0.5rem 0;
}

.nn-woo-main .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nn-woo-main .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 0.6rem 1rem;
  text-decoration: none;
  color: #222;
  border-left: 3px solid transparent;
}

.nn-woo-main .woocommerce-MyAccount-navigation a:hover,
.nn-woo-main .woocommerce-MyAccount-navigation .is-active a {
  background: #faf8f3;
  border-left-color: var(--brand-gold, #c69b3c);
  color: #111;
}

.nn-woo-main .woocommerce-MyAccount-content {
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 10px;
  padding: 1.25rem;
}

/* —— Block Checkout / Cart (wc-block-*) —— */
/* Two different nodes use .wc-block-checkout: outer block wrapper vs inner .wc-block-components-sidebar-layout.wc-block-checkout — never grid the outer wrapper (it has notices + layout child). */
.nn-woo-main .wp-block-woocommerce-checkout.wc-block-checkout:not(.wc-block-components-sidebar-layout),
.nn-woo-main .wc-block-cart {
  font-family: inherit;
  color: #1a1a1a;
  background: transparent;
  width: 100%;
  max-width: none !important;
  margin-inline: 0;
  box-sizing: border-box;
  display: block;
}

.nn-woo-main .wp-block-woocommerce-checkout,
.nn-woo-main .wp-block-woocommerce-cart {
  max-width: none !important;
  width: 100%;
  margin-inline: 0;
  box-sizing: border-box;
}

.nn-woo-main .wp-block-woocommerce-checkout-fields-block,
.nn-woo-main .wp-block-woocommerce-checkout-totals-block {
  max-width: none !important;
  box-sizing: border-box;
}

/* Block alignments (Woo defaults to alignwide) must not squeeze checkout inside the site container. */
.nn-woo-main .wp-block-woocommerce-checkout.alignwide,
.nn-woo-main .wp-block-woocommerce-checkout.alignfull,
.nn-woo-main .wp-block-woocommerce-cart.alignwide,
.nn-woo-main .wp-block-woocommerce-cart.alignfull {
  max-width: none !important;
  width: 100%;
}

/* Desktop: form fills remaining width; summary column fixed 360–420px; full width of inner container. */
@media (min-width: 900px) {
  /* Block cart (sidebar-layout). */
  .nn-woo-main .wc-block-components-sidebar-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(360px, 28vw, 420px);
    gap: 40px;
    align-items: start;
    flex-wrap: nowrap !important;
    margin-inline: 0;
    width: 100%;
  }

  .nn-woo-main .wc-block-components-sidebar-layout .wc-block-components-main,
  .nn-woo-main .wc-block-components-sidebar-layout .wc-block-components-sidebar {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    /* Override Woo percentage padding; keep in sync with .wc-block-components-main card padding below. */
    padding: 1.5rem clamp(1.25rem, 2vw, 1.75rem) 1.75rem !important;
  }

  .nn-woo-main .wc-block-components-sidebar-layout .wc-block-components-sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
  }

  /*
   * Block checkout: the real two-column shell is ONE node:
   * .wc-block-components-sidebar-layout.wc-block-checkout (NOT the outer .wp-block-woocommerce-checkout.wc-block-checkout).
   * Do not grid the outer wrapper — it contains notices, scroll anchor, etc.
   */
  body:not(.nn-woocommerce-order-received) .nn-woo-main .wc-block-components-sidebar-layout.wc-block-checkout,
  body:not(.nn-woocommerce-order-received) .nn-woo-main .wc-block-components-sidebar-layout.wc-block-checkout.is-medium,
  body:not(.nn-woocommerce-order-received) .nn-woo-main .wc-block-components-sidebar-layout.wc-block-checkout.is-small,
  body:not(.nn-woocommerce-order-received) .nn-woo-main .wc-block-components-sidebar-layout.wc-block-checkout.is-large {
    display: grid !important;
    grid-template-columns: minmax(0, 1.65fr) minmax(360px, 420px);
    gap: 40px;
    align-items: start;
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    flex-wrap: nowrap !important;
  }

  body:not(.nn-woocommerce-order-received) .nn-woo-main .wc-block-components-sidebar-layout.wc-block-checkout .wc-block-components-main,
  body:not(.nn-woocommerce-order-received) .nn-woo-main .wc-block-components-sidebar-layout.wc-block-checkout .wc-block-components-sidebar {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    padding: 1.5rem clamp(1.25rem, 2vw, 1.75rem) 1.75rem !important;
  }

  body:not(.nn-woocommerce-order-received)
    .nn-woo-main
    .wc-block-components-sidebar-layout.wc-block-checkout
    .wc-block-components-sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
  }

  /* Woo “fill” order summary inside the main column — hide on desktop when the real sidebar exists. */
  body:not(.nn-woocommerce-order-received) .nn-woo-main .wc-block-checkout__main .checkout-order-summary-block-fill-wrapper {
    display: none !important;
  }
}

.nn-woo-main .wc-block-components-sidebar-layout {
  gap: 40px;
}

.nn-woo-main .wc-block-components-main,
.nn-woo-main .wc-block-components-sidebar {
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 12px;
  padding: 1.5rem 1.75rem 1.75rem;
  box-sizing: border-box;
}

@media (max-width: 899px) {
  .nn-woo-main .wc-block-components-sidebar-layout {
    flex-direction: column !important;
  }
  .nn-woo-main .wc-block-components-main,
  .nn-woo-main .wc-block-components-sidebar {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }

  body:not(.nn-woocommerce-order-received) .nn-woo-main .wc-block-components-sidebar-layout.wc-block-checkout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  body:not(.nn-woocommerce-order-received) .nn-woo-main .wp-block-woocommerce-checkout-totals-block,
  body:not(.nn-woocommerce-order-received) .nn-woo-main .wc-block-checkout__sidebar {
    max-width: none !important;
    width: 100%;
  }
}

.nn-woo-main .wc-block-components-title,
.nn-woo-main .wc-block-cart__totals-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #111;
  margin-top: 0;
}

/* Booking meta: one row per datum (Blocks + classic .variation) */
/* Blocks render each item_data row inline and insert " / " between rows — stack rows and hide separators. */
.nn-woo-main .wc-block-components-product-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nn-woo-main .wc-block-components-product-details > span {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
}

.nn-woo-main .wc-block-components-product-details > span > span[aria-hidden="true"] {
  display: none !important;
}

.nn-woo-main .wc-block-components-product-metadata .wc-block-components-product-metadata__variation-data,
.nn-woo-main .wc-block-components-product-metadata .wc-block-components-product-metadata__description {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nn-woo-main .wc-block-components-product-metadata .wc-block-components-product-metadata__variation-data p,
.nn-woo-main .wc-block-components-product-metadata .wc-block-components-product-metadata__description p {
  margin: 0;
}

.nn-woo-main .woocommerce-checkout-review-order-table dl.variation,
.nn-woo-main .woocommerce-table .variation {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.nn-woo-main .woocommerce-checkout-review-order-table dl.variation dt,
.nn-woo-main .woocommerce-table .variation dt {
  grid-column: 1;
  margin: 0;
  font-weight: 600;
}

.nn-woo-main .woocommerce-checkout-review-order-table dl.variation dd,
.nn-woo-main .woocommerce-table .variation dd {
  grid-column: 2;
  margin: 0;
}

.nn-woo-main .wc-block-components-product-metadata,
.nn-woo-main .wc-block-components-order-summary-item {
  font-size: 0.95rem;
}

.nn-woo-main .wc-block-components-order-summary-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid #ececea;
}

.nn-woo-main .wc-block-components-order-summary-item:last-child {
  border-bottom: 0;
}

.nn-woo-main .wc-block-components-product-image {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ececea;
  background: #fafaf8;
}

.nn-woo-main .wc-block-components-product-image img {
  object-fit: cover;
}

.nn-woo-main .wc-block-components-totals-item,
.nn-woo-main .wc-block-components-panel {
  border-color: #ececea;
}

.nn-woo-main .wc-block-cart__submit-button,
.nn-woo-main .wc-block-components-checkout-place-order-button,
.nn-woo-main .wp-block-woocommerce-checkout-place-order-button .wc-block-components-button {
  border-radius: 8px !important;
  background: var(--brand-gold, #c69b3c) !important;
  color: #111 !important;
  border: 1px solid var(--brand-gold, #c69b3c) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.5rem !important;
  min-height: 48px;
}

.nn-woo-main .wc-block-cart__submit-button:hover,
.nn-woo-main .wc-block-components-checkout-place-order-button:hover,
.nn-woo-main .wp-block-woocommerce-checkout-place-order-button .wc-block-components-button:hover {
  background: #b58d35 !important;
  border-color: #b58d35 !important;
  color: #fff !important;
}

.nn-woo-main .wc-block-components-checkout-return-to-cart-button {
  color: #333 !important;
  text-decoration: underline;
}

.nn-woo-main .wc-block-components-text-input input,
.nn-woo-main .wc-block-components-text-input textarea,
.nn-woo-main .wc-blocks-components-select .wc-blocks-components-select__container {
  border: 1px solid #d4d4d0 !important;
  border-radius: 8px !important;
}

.nn-woo-main .wc-block-components-text-input input:focus,
.nn-woo-main .wc-block-components-text-input textarea:focus {
  outline: 2px solid rgba(198, 155, 60, 0.45);
  outline-offset: 1px;
  border-color: var(--brand-gold, #c69b3c) !important;
}

/* ── Order received / thank you (classic checkout) ───────────────────────── */
body.nn-woocommerce-order-received.nn-woocommerce-checkout
  .nn-woo-main--wrapped
  .nn-woo-main__inner.container {
  max-width: min(1080px, 100%);
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-top: 0;
}

body.nn-woocommerce-order-received .nn-woo-main p.woocommerce-thankyou-order-received {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 12px;
  border-left: 4px solid var(--brand-gold, #c69b3c);
  color: #111;
  font-size: 1rem;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.nn-woocommerce-order-received .nn-woo-main p.woocommerce-thankyou-order-received::before {
  display: none;
}

body.nn-woocommerce-order-received .nn-woo-main .nn-order-received__lead {
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

body.nn-woocommerce-order-received .nn-woo-main .nn-order-received__sub {
  font-size: 0.95rem;
  font-weight: 500;
  color: #444;
  max-width: 42em;
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order-overview {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem 0.75rem;
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order-overview li {
  margin: 0;
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  line-height: 1.35;
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order-overview li strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: #111;
  word-break: break-word;
}

body.nn-woocommerce-order-received .nn-woo-main section.woocommerce-order-details {
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.25rem 1.25rem;
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order-details__title {
  margin: 0 0 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #ececea;
  font-size: 1.05rem;
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-table--order-details {
  margin: 0;
  border-radius: 10px;
  border: 1px solid #ececea;
  overflow: hidden;
}

body.nn-woocommerce-order-received .nn-woo-main section.woocommerce-customer-details {
  margin: 0 0 1rem;
  padding: 1.1rem 1.25rem 1.25rem;
  background: #fff;
  border: 1px solid #e2e2df;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-column__title,
body.nn-woocommerce-order-received .nn-woo-main .woocommerce-customer-details > h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-customer-details .woocommerce-column--billing-address,
body.nn-woocommerce-order-received .nn-woo-main .woocommerce-customer-details address {
  margin: 0;
  font-style: normal;
  line-height: 1.55;
  color: #333;
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order a.button,
body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order a.woocommerce-button,
body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order button.button,
body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order input.button {
  border-radius: 8px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.35rem !important;
  min-height: 48px;
  background: var(--brand-gold, #c69b3c) !important;
  color: #111 !important;
  border: 1px solid var(--brand-gold, #c69b3c) !important;
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order a.button:hover,
body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order a.woocommerce-button:hover,
body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order button.button:hover,
body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order input.button:hover {
  background: #b58d35 !important;
  border-color: #b58d35 !important;
  color: #fff !important;
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order a:not(.button):not(.woocommerce-button) {
  color: var(--brand-gold, #c69b3c);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order a:not(.button):not(.woocommerce-button):hover {
  color: #b58d35;
}

body.nn-woocommerce-order-received .nn-woo-main .wc-block-order-confirmation-status {
  margin-top: 0;
}

@media (max-width: 599px) {
  body.nn-woocommerce-order-received .nn-woo-main .woocommerce-order-overview {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .nn-woo-main .woocommerce-checkout #customer_details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
  .nn-woo-main .woocommerce-checkout #customer_details .col-1,
  .nn-woo-main .woocommerce-checkout #customer_details .col-2 {
    margin-bottom: 0;
  }
}
