/* ==========================================================================
   BDS STORE SKIN — the WooCommerce cart, checkout and account pages, dressed
   to match bonvillain.design.

   Loaded only on those pages (see bds-store-skin.php). CSS only: no markup is
   filtered and no script is touched, so nothing here can break a payment.

   Tokens mirror src/app/globals.css on the Next.js site. If the site's palette
   or button shape changes there, change it here too; these are two codebases
   describing one brand.
   ========================================================================== */

:root {
  --bds-base: #0a0a0b;
  --bds-panel: #16171a;
  --bds-panel-2: #212228;
  --bds-line: rgba(255, 255, 255, 0.1);
  --bds-hairline: rgba(255, 255, 255, 0.1);
  --bds-text: #ececee;
  --bds-bone: #e9ecf1;
  --bds-muted: #9799a0;
  --bds-faint: #62646b;
  --bds-accent: #38e838;
  --bds-radius: 2px; /* BRAND POLICY: buttons are square, not pills */
  --bds-serif: "Fraunces", Georgia, serif;
  --bds-sans: "Hanken Grotesk", system-ui, sans-serif;
  --bds-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ---- Ground ------------------------------------------------------------- */

body.woocommerce-checkout,
body.woocommerce-cart,
body.woocommerce-account,
body.woocommerce-order-received {
  background: var(--bds-base);
  color: var(--bds-text);
  font-family: var(--bds-sans);
  /* EVERY SIZE IN THIS FILE IS px, DELIBERATELY.
     The coastline theme sets html { font-size: 10px }, so a rem here resolves
     at 62.5% of what the same value means on the Next.js site: labels landed at
     6.2px, inputs at 9.5px and the Place Order button at 7.5px. Do not
     reintroduce rem in this stylesheet; it is measuring against a different
     ruler than the one the brand was drawn with.
     The px values below are the site's own COMPUTED sizes, read off
     bonvillain.design: body 16/26, mono label 12/16 at 0.18em, button 12/18. */
  font-size: 16px;
  line-height: 1.6;
}

/* The coastline theme's own chrome. Hidden rather than dequeued: the theme
   still renders normally, it just isn't shown on these four pages. A buyer
   mid-checkout does not need a blog sidebar or a "Mailing List Signup" menu,
   and that furniture is most of what made this page read as another site. */
body.woocommerce-checkout .site-header,
body.woocommerce-cart .site-header,
body.woocommerce-account .site-header,
body.woocommerce-checkout #nav,
body.woocommerce-cart #nav,
body.woocommerce-account #nav,
body.woocommerce-checkout #navigation,
body.woocommerce-cart #navigation,
body.woocommerce-account #navigation,
body.woocommerce-checkout .ignition-top-bar,
body.woocommerce-checkout .ignition-header,
body.woocommerce-cart .ignition-header,
body.woocommerce-account .ignition-header,
body.woocommerce-checkout .ignition-page-title,
body.woocommerce-cart .ignition-page-title,
body.woocommerce-account .ignition-page-title,
body.woocommerce-checkout .sidebar,
body.woocommerce-cart .sidebar,
body.woocommerce-account .sidebar,
body.woocommerce-checkout .site-footer,
body.woocommerce-cart .site-footer,
body.woocommerce-account .site-footer,
body.woocommerce-checkout footer,
body.woocommerce-cart footer,
body.woocommerce-account footer {
  display: none;
}

body.woocommerce-checkout #page,
body.woocommerce-cart #page,
body.woocommerce-account #page,
body.woocommerce-checkout #content,
body.woocommerce-cart #content,
body.woocommerce-account #content,
body.woocommerce-checkout .content-wrap,
body.woocommerce-cart .content-wrap,
body.woocommerce-account .content-wrap {
  background: var(--bds-base);
  max-width: none;
  box-shadow: none;
  border: 0;
}

body.woocommerce-checkout .entry,
body.woocommerce-cart .entry,
body.woocommerce-account .entry {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px) 90px;
  background: transparent;
}

/* ---- Our header --------------------------------------------------------- */

.bds-skin-head {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 72px;
  padding: 0 clamp(20px, 4vw, 60px);
  border-bottom: 1px solid var(--bds-line);
  background: var(--bds-base);
}
.bds-skin-mark img {
  height: 40px;
  width: auto;
  display: block;
}
.bds-skin-step {
  font-family: var(--bds-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bds-faint);
}
.bds-skin-back {
  margin-left: auto;
  padding: 8.8px 17.6px;
  border: 1px solid var(--bds-hairline);
  border-radius: var(--bds-radius);
  font-family: var(--bds-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bds-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.bds-skin-back:hover {
  color: #fff;
  border-color: var(--bds-accent);
  background: color-mix(in srgb, var(--bds-accent) 10%, transparent);
}

/* ---- Type --------------------------------------------------------------- */

body.woocommerce-checkout .entry-title,
body.woocommerce-cart .entry-title,
body.woocommerce-account .entry-title {
  font-family: var(--bds-serif);
  font-weight: 300;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--bds-bone);
  margin: 56px 0 38px;
}
body.woocommerce-checkout h3,
body.woocommerce-cart h3,
body.woocommerce-account h3,
body.woocommerce-checkout #order_review_heading {
  font-family: var(--bds-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bds-faint);
  margin: 34px 0 16px;
}
body.woocommerce-checkout label,
body.woocommerce-cart label,
body.woocommerce-account label {
  font-family: var(--bds-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bds-muted);
  display: inline-block;
  margin-bottom: 7px;
}
.woocommerce form .form-row label.checkbox,
.woocommerce-form__label-for-checkbox span {
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--bds-sans);
  font-size: 15px;
  line-height: 24px;
  color: var(--bds-muted);
  margin-bottom: 0;
}

/* ---- Fields ------------------------------------------------------------- */

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-account input.input-text,
.select2-container--default .select2-selection--single {
  background: var(--bds-panel);
  border: 1px solid var(--bds-hairline);
  border-radius: var(--bds-radius);
  color: var(--bds-text);
  font-family: var(--bds-sans);
  font-size: 16px;
  padding: 13px 15px;
  height: auto;
  line-height: 1.5;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.select2-container--default.select2-container--open .select2-selection--single {
  outline: none;
  border-color: var(--bds-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bds-accent) 45%, transparent);
}
.woocommerce form .form-row input.input-text::placeholder,
.woocommerce form .form-row textarea::placeholder {
  color: var(--bds-faint);
}
/* Woo's own invalid/valid states, restated so they read on a dark ground. */
.woocommerce form .form-row.woocommerce-invalid input.input-text,
.woocommerce form .form-row.woocommerce-invalid select {
  border-color: #f87878;
}
.woocommerce form .form-row.woocommerce-validated input.input-text {
  border-color: color-mix(in srgb, var(--bds-accent) 55%, transparent);
}
.required {
  color: var(--bds-accent);
  text-decoration: none;
}

/* Select2 renders the Country and State pickers, and ships its own sizing:
   a fixed 28px control height and a 50px line-height on the value. Against our
   13px padding that made those two fields noticeably taller than every other
   input in the column. Matched to the text inputs; the specificity here has to
   beat select2's own sheet, hence the full selector chain. */
.select2-container--default .select2-selection--single .select2-selection__rendered,
.woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--bds-text);
  font-family: var(--bds-sans);
  font-size: 16px;
  line-height: 24px;
  padding: 0;
}
.select2-container--default .select2-selection--single,
.woocommerce .select2-container--default .select2-selection--single {
  height: auto;
  min-height: 0;
}
.select2-container--default .select2-results__option {
  font-size: 15px;
  line-height: 22px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 50%;
  transform: translateY(-50%);
  right: 8px;
}
.select2-dropdown {
  background: var(--bds-panel);
  border: 1px solid var(--bds-line);
  border-radius: var(--bds-radius);
  color: var(--bds-text);
}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option[aria-selected="true"] {
  background: color-mix(in srgb, var(--bds-accent) 18%, var(--bds-panel-2));
  color: #fff;
}
.select2-search--dropdown .select2-search__field {
  background: var(--bds-base);
  border: 1px solid var(--bds-hairline);
  color: var(--bds-text);
}

/* ---- Order summary ------------------------------------------------------ */

/* The theme wraps the summary in its own 3px light frame, which on a dark
   ground reads as a second box drawn around our box. One border is enough. */
.ignition-checkout-order {
  border: 0;
  padding: 0;
  background: transparent;
}

/* WooCommerce covers the summary with a white 60%-opacity overlay every time it
   recalculates shipping, which on this page flashed as a grey slab over the
   order. Same mechanism, dark. */
.blockUI.blockOverlay {
  background: var(--bds-base) !important;
  opacity: 0.55 !important;
}
.woocommerce .blockUI.blockOverlay::before {
  border-color: var(--bds-faint);
  border-top-color: var(--bds-accent);
}

.woocommerce-checkout #order_review,
.woocommerce-cart .cart_totals,
.woocommerce-checkout-review-order {
  background: var(--bds-panel);
  border: 1px solid var(--bds-line);
  border-radius: var(--bds-radius);
  padding: 26px;
}
.woocommerce table.shop_table {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--bds-text);
  font-family: var(--bds-sans);
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border: 0;
  border-bottom: 1px solid var(--bds-line);
  padding: 15px 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--bds-text);
}
.woocommerce table.shop_table thead th {
  font-family: var(--bds-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bds-faint);
  font-weight: 500;
}
.woocommerce table.shop_table tfoot th,
.woocommerce table.shop_table tfoot td {
  font-weight: 500;
  color: var(--bds-bone);
}
.woocommerce table.shop_table tfoot tr:last-child th,
.woocommerce table.shop_table tfoot tr:last-child td {
  border-bottom: 0;
  padding-top: 20px;
  font-family: var(--bds-serif);
  font-size: 24px;
  line-height: 30px;
}
.woocommerce-Price-amount {
  font-family: var(--bds-mono);
  font-size: 14px;
  color: var(--bds-bone);
}
.product-name {
  color: var(--bds-text);
}
.product-name .variation,
.wc-item-meta,
.wc-item-meta p {
  font-family: var(--bds-mono);
  font-size: 11px;
  line-height: 17px;
  margin: 4px 0 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bds-faint);
}

/* Shipping choices. Printful quotes these live, so they matter and should not
   look like an afterthought squeezed into a table cell. */
#shipping_method {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
#shipping_method li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 0;
  font-size: 15px;
  line-height: 23px;
  color: var(--bds-muted);
}
#shipping_method li label {
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--bds-sans);
  font-size: 15px;
  line-height: 23px;
  color: var(--bds-muted);
  margin-bottom: 0;
}
#shipping_method input[type="radio"],
.wc_payment_methods input[type="radio"],
.woocommerce input[type="checkbox"] {
  accent-color: var(--bds-accent);
  margin-top: 2px;
}

/* ---- Payment ------------------------------------------------------------ */

.woocommerce-checkout #payment {
  background: transparent;
  border-radius: 0;
  margin-top: 22px;
}
.woocommerce-checkout #payment ul.payment_methods {
  border-bottom: 1px solid var(--bds-line);
  padding: 0 0 16px;
  margin: 0 0 18px;
}
.woocommerce-checkout #payment ul.payment_methods li {
  list-style: none;
  padding: 6px 0;
}
.woocommerce-checkout #payment ul.payment_methods label {
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--bds-sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--bds-text);
  margin-bottom: 0;
}
.woocommerce-checkout #payment div.payment_box {
  background: var(--bds-panel-2);
  border-radius: var(--bds-radius);
  color: var(--bds-muted);
  font-size: 15px;
  line-height: 23px;
}
.woocommerce-checkout #payment div.payment_box::before {
  border-bottom-color: var(--bds-panel-2);
}
/* The PayPal buttons are cross-origin iframes. Left entirely alone: they should
   look like PayPal, because that is the mark a buyer is looking for. */

/* ---- Buttons ------------------------------------------------------------ */

.woocommerce #payment #place_order,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce button.button:disabled,
.woocommerce button.button:disabled[disabled] {
  background: color-mix(in srgb, var(--bds-accent) 8%, transparent);
  border: 1px solid var(--bds-hairline);
  border-radius: var(--bds-radius);
  color: var(--bds-bone);
  font-family: var(--bds-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 15px 28px;
  line-height: 18px;
  height: auto;
  text-shadow: none;
  transition: color 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.3s;
}
.woocommerce #payment #place_order:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  color: #fff;
  border-color: var(--bds-accent);
  background: color-mix(in srgb, var(--bds-accent) 16%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--bds-accent) 40%, transparent),
    0 10px 44px -14px color-mix(in srgb, var(--bds-accent) 72%, transparent);
}
.woocommerce button.button:disabled,
.woocommerce button.button:disabled[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---- Notices ------------------------------------------------------------ */

.woocommerce-info,
.woocommerce-message,
.woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
  background: var(--bds-panel);
  border: 1px solid var(--bds-line);
  border-top-width: 1px;
  border-radius: var(--bds-radius);
  color: var(--bds-muted);
  font-family: var(--bds-sans);
  font-size: 15px;
  line-height: 24px;
  padding: 16px 20px;
}
.woocommerce-info::before,
.woocommerce-message::before,
.woocommerce-error::before {
  display: none;
}
.woocommerce-info {
  border-left: 2px solid color-mix(in srgb, var(--bds-accent) 60%, transparent);
}
.woocommerce-error {
  border-left: 2px solid #f87878;
  color: #f8a0a0;
}
.woocommerce-info a,
.woocommerce-message a,
.woocommerce a {
  color: var(--bds-bone);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  text-underline-offset: 4px;
}
.woocommerce-info a:hover,
.woocommerce a:hover {
  color: var(--bds-accent);
}

/* ---- Layout ------------------------------------------------------------- */

/* The coastline theme puts the page inside a Bootstrap-style grid
   (.col-md-8.col-md-push-2) that reserves a third of the width for a sidebar
   we have hidden, and offsets the rest. Left alone, checkout renders in a
   660px gutter with the order summary crushed to 54px and one character per
   line. Reclaim the full width first; everything below assumes it. */
body.woocommerce-checkout .col-md-8,
body.woocommerce-cart .col-md-8,
body.woocommerce-account .col-md-8,
body.woocommerce-order-received .col-md-8 {
  /* .row is a FLEX container here, so width alone loses to the theme's
     flex-basis of two thirds. All three properties are needed. */
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  left: 0;
  right: 0;
  float: none;
  padding-left: 0;
  padding-right: 0;
}
/* The content column keeps a left margin sized for the sidebar we hid, which
   pushed the whole page off centre and out past the right edge. */
body.woocommerce-checkout #content,
body.woocommerce-cart #content,
body.woocommerce-account #content {
  margin-left: 0;
  margin-right: 0;
}
body.woocommerce-checkout .row,
body.woocommerce-cart .row,
body.woocommerce-account .row {
  margin-left: 0;
  margin-right: 0;
}
body.woocommerce-checkout #content,
body.woocommerce-cart #content,
body.woocommerce-account #content {
  width: 100%;
  margin: 0 auto;
  float: none;
}
/* coastline runs an off-canvas side menu and reserves 250px of left margin on
   .content-wrap for it. We hide that menu, but the margin stayed, pushing the
   page 250px right and making the document 1680px wide in a 1430px window: the
   order summary hung off the right edge and the whole page scrolled sideways.
   Reclaiming the margin is what actually centres the checkout. */
body.woocommerce-checkout .content-wrap,
body.woocommerce-cart .content-wrap,
body.woocommerce-account .content-wrap,
body.woocommerce-order-received .content-wrap {
  float: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
/* Belt and braces: nothing on a checkout should scroll the page sideways. */
body.woocommerce-checkout,
body.woocommerce-cart,
body.woocommerce-account {
  overflow-x: hidden;
}

@media (min-width: 900px) {
  /* Two columns, using the theme's OWN wrappers as the flex children. An
     earlier attempt put a grid on form.checkout and addressed #order_review
     directly, which does nothing: the theme nests it two levels down inside
     .ignition-checkout-order-wrap, so the rule matched an element that was not
     a grid item and the summary collapsed. Style what is actually there. */
  .woocommerce-checkout form.checkout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 54px;
  }
  .woocommerce-checkout form.checkout > #customer_details {
    flex: 1 1 440px;
    min-width: 0;
    max-width: none;
    width: auto;
  }
  .woocommerce-checkout form.checkout > .ignition-checkout-order-wrap,
  .woocommerce-checkout form.checkout > #order_review_heading,
  .woocommerce-checkout form.checkout > #order_review {
    flex: 0 1 400px;
    min-width: 320px;
    max-width: 440px;
    width: auto;
  }
  /* The summary follows the buyer down a long address form. */
  .woocommerce-checkout .ignition-checkout-order-wrap {
    position: sticky;
    top: 24px;
  }
  .woocommerce-checkout .ignition-checkout-order,
  .woocommerce-checkout .woocommerce-checkout-review-order {
    width: 100%;
    max-width: none;
  }
  /* Billing and shipping stack rather than sitting side by side in a column
     that is now half as wide. */
  .woocommerce-checkout .col2-set .col-1,
  .woocommerce-checkout .col2-set .col-2 {
    width: 100%;
    float: none;
    margin: 0;
  }
}

/* The order table must be allowed to shrink its cells rather than forcing the
   column wider; without this the price column wraps a character at a time. */
.woocommerce-checkout table.shop_table {
  width: 100%;
  table-layout: auto;
  word-break: normal;
}
.woocommerce-checkout table.shop_table td,
.woocommerce-checkout table.shop_table th {
  word-break: normal;
  overflow-wrap: anywhere;
}
.woocommerce-checkout table.shop_table td.product-total,
.woocommerce-checkout table.shop_table .woocommerce-Price-amount {
  white-space: nowrap;
}
.woocommerce-privacy-policy-text,
.woocommerce-privacy-policy-text p {
  font-size: 13px;
  line-height: 21px;
  color: var(--bds-faint);
}

/* ---- Account and order-received ---------------------------------------- */

.woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
}
.woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 9px 0;
  font-family: var(--bds-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bds-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--bds-line);
}
.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
  color: var(--bds-bone);
}
.woocommerce-order .woocommerce-thankyou-order-received {
  font-family: var(--bds-serif);
  font-size: 30px;
  line-height: 38px;
  color: var(--bds-bone);
}
.woocommerce ul.order_details {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--bds-line);
  border-bottom: 1px solid var(--bds-line);
}
.woocommerce ul.order_details li {
  font-family: var(--bds-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bds-faint);
  border-right: 1px solid var(--bds-line);
}
.woocommerce ul.order_details li strong {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--bds-bone);
}
