/* ==================================================================
   NOOK — inner pages and WooCommerce checkout.
   Uses the v3.1 tokens from nook.css (--ink, --stone, --line, --wall,
   --glass, --offer, --font). Loaded only when !is_front_page().
   Covers the Checkout block and [woocommerce_checkout].
   ================================================================== */
.page{max-width:var(--max);padding-top:clamp(40px,6vw,88px);padding-bottom:clamp(72px,9vw,128px)}
.page-body > h1{font-weight:300;font-size:var(--s-h2);letter-spacing:-.02em;line-height:1.08;margin:0 0 clamp(28px,4vw,48px)}
.page-content{color:var(--ink)}
.page-content p,.page-content li{color:var(--stone);max-width:62ch}
.page-content h2,.page-content h3{font-weight:500;font-size:var(--s-h3);margin:2em 0 .5em}
.page-content a{text-underline-offset:3px}
body:not(.woocommerce-checkout):not(.woocommerce-cart) .page-content{max-width:62ch}

/* Checkout page: no distractions, no page title above the form */
.woocommerce-checkout .page-body > h1{margin-bottom:clamp(20px,3vw,32px)}

/* Form controls (classic) --------------------------------------- */
.woocommerce form .form-row{margin:0 0 16px;padding:0}
.woocommerce form .form-row label{display:block;font-size:var(--s-small);color:var(--stone);margin:0 0 6px;line-height:1.3}
.woocommerce form .form-row .required{color:var(--offer);text-decoration:none}
.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.select2-container--default .select2-selection--single{
  width:100%;height:52px;padding:0 14px;border:1px solid var(--line);border-radius:2px;background:var(--white);
  font:inherit;color:var(--ink);box-shadow:none;transition:border-color .2s
}
.woocommerce textarea{height:auto;min-height:104px;padding:12px 14px}
.woocommerce input.input-text:hover,.woocommerce textarea:hover,.woocommerce select:hover{border-color:#BDB8AE}
.woocommerce input.input-text:focus,.woocommerce textarea:focus,.woocommerce select:focus{border-color:var(--ink);outline:2px solid var(--glass);outline-offset:2px}
.select2-container--default .select2-selection--single{display:flex;align-items:center}
.select2-container--default .select2-selection--single .select2-selection__rendered{padding:0;line-height:1.3;color:var(--ink)}
.select2-container--default .select2-selection--single .select2-selection__arrow{height:50px;right:8px}

/* Classic checkout layout */
.woocommerce-checkout form.checkout{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:clamp(32px,5vw,80px);align-items:start}
.woocommerce-checkout form.checkout #customer_details{grid-column:1}
.woocommerce-checkout form.checkout #order_review_heading,
.woocommerce-checkout form.checkout #order_review{grid-column:2}
.woocommerce-checkout form.checkout #order_review_heading{margin:0 0 12px;font-size:var(--s-h3);font-weight:500}
.woocommerce-checkout h3{font-weight:500;font-size:var(--s-h3);margin:0 0 16px}
.woocommerce-checkout .col2-set .col-1,.woocommerce-checkout .col2-set .col-2{float:none;width:auto}
@media (max-width:900px){
  .woocommerce-checkout form.checkout{grid-template-columns:1fr}
  .woocommerce-checkout form.checkout #customer_details,
  .woocommerce-checkout form.checkout #order_review_heading,
  .woocommerce-checkout form.checkout #order_review{grid-column:1}
}
.woocommerce table.shop_table{width:100%;border-collapse:collapse;border:0;font-size:var(--s-small)}
.woocommerce table.shop_table th,.woocommerce table.shop_table td{padding:14px 0;border:0;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;background:none}
.woocommerce table.shop_table td:last-child,.woocommerce table.shop_table th:last-child{text-align:right}
.woocommerce table.shop_table tfoot th{color:var(--stone);font-weight:400}
.woocommerce table.shop_table .order-total th,.woocommerce table.shop_table .order-total td{font-size:var(--s-body);color:var(--ink);font-weight:500}
.woocommerce table.shop_table dl.variation{margin:6px 0 0;font-size:var(--s-micro);color:var(--stone)}
.woocommerce table.shop_table dl.variation dt{display:inline;font-weight:400}
.woocommerce table.shop_table dl.variation dd{display:inline;margin:0}
.woocommerce table.shop_table dl.variation dd p{display:inline;margin:0}
.woocommerce table.shop_table del{color:var(--stone)}
.woocommerce table.shop_table ins{text-decoration:none;color:var(--offer)}
#payment{background:none;border-radius:0}
#payment ul.payment_methods{padding:0;margin:0;border:0;border-top:1px solid var(--line);list-style:none}
#payment ul.payment_methods li{padding:16px 0;border-bottom:1px solid var(--line);font-size:var(--s-small)}
#payment div.payment_box{background:var(--wall);color:var(--stone);border-radius:2px;margin:10px 0 0;padding:14px 16px}
#payment div.payment_box::before{display:none}
.woocommerce-privacy-policy-text,.woocommerce-terms-and-conditions-wrapper{font-size:var(--s-micro);color:var(--stone)}

/* Buttons: 56px, ink, 2px radius, as .add in v3.1 */
.woocommerce #place_order,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.wc-block-components-button:not(.is-link),
.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button{
  display:flex;align-items:center;justify-content:center;width:100%;min-height:56px;height:56px;padding:0 22px;
  background:var(--ink);color:#fff;border:0;border-radius:2px;font:inherit;font-weight:500;text-decoration:none;
  cursor:pointer;transition:background .2s
}
.woocommerce #place_order:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,
.wc-block-components-button:not(.is-link):hover{background:#000;color:#fff}
.woocommerce #place_order:disabled,.woocommerce button.button:disabled,.wc-block-components-button:disabled{background:#BDB8AE;cursor:default}
.wc-block-components-button__text{color:inherit}

/* Checkout block ------------------------------------------------- */
.wp-block-woocommerce-checkout{font-family:var(--font);font-size:var(--s-body);color:var(--ink)}
.wc-block-components-sidebar-layout{gap:clamp(32px,5vw,80px)}
.wc-block-components-checkout-step__title,.wc-block-components-title,.wc-block-components-checkout-order-summary__title-text{font-weight:500;font-size:var(--s-h3);letter-spacing:0}
.wc-block-components-checkout-step__description,.wc-block-components-checkout-step__container{color:var(--stone)}
.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-block-components-combobox .components-combobox-control input,
.wc-block-components-form .wc-block-components-text-input input[type]{
  height:52px;border:1px solid var(--line);border-radius:2px;background:var(--white);color:var(--ink);font:inherit;box-shadow:none
}
.wc-block-components-text-input input:focus,.wc-block-components-textarea:focus{border-color:var(--ink);outline:2px solid var(--glass);outline-offset:2px;box-shadow:none}
.wc-block-components-text-input label,.wc-block-components-text-input.is-active label{color:var(--stone)}
.wc-block-components-select .wc-block-components-select__select{height:52px;border:1px solid var(--line);border-radius:2px;font:inherit;color:var(--ink)}
.wc-block-components-radio-control__option,.wc-block-components-radio-control-accordion-option{border-radius:2px;border-color:var(--line);box-shadow:none}
.wc-block-components-radio-control__option-checked,.wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option-checked{font-weight:500}
.wc-block-components-order-summary,.wc-block-components-totals-wrapper{border-color:var(--line)}
.wc-block-components-order-summary-item__description,.wc-block-components-product-metadata{font-size:var(--s-small);color:var(--stone)}
.wc-block-components-product-details{font-size:var(--s-micro);color:var(--stone)}
.wc-block-components-product-price__regular,.wc-block-components-sale-badge{color:var(--stone)}
.wc-block-components-product-price__value.is-discounted{color:var(--offer)}
.wc-block-components-sale-badge{border:0;background:none;padding:0;font-size:var(--s-micro);color:var(--offer)}
.wc-block-components-totals-footer-item{font-weight:500}
.wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:var(--ink)}
.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]{border-radius:2px;border-color:#BDB8AE}
.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{background:var(--white);border-color:var(--ink)}
.wc-block-components-notice-banner{border-radius:2px;font-size:var(--s-small)}
/* Room for Apple Pay / Google Pay: stay on top, full width, clean spacing */
.wc-block-components-express-payment{margin:0 0 28px}
.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content{padding:0}
.wc-block-components-express-payment__event-buttons{gap:10px}
.wc-block-components-express-payment__title-container{margin:0 0 14px}
.wc-block-components-express-payment-continue-rule{color:var(--stone);font-size:var(--s-small);margin:0 0 20px}
#wc-stripe-express-checkout-element,.wc-block-components-express-payment .StripeElement{min-height:48px}

/* Cart / notices ------------------------------------------------- */
.woocommerce-message,.woocommerce-info,.woocommerce-error{list-style:none;margin:0 0 24px;padding:14px 16px;border:0;border-left:2px solid var(--glass);background:var(--wall);font-size:var(--s-small);color:var(--ink)}
.woocommerce-error{border-left-color:var(--offer)}
.woocommerce-message::before,.woocommerce-info::before,.woocommerce-error::before{display:none}
.woocommerce-order-received .page-body > h1{margin-bottom:12px}

/* ==================================================================
   A1 · Focused header (checkout and order received)
   ================================================================== */
.head.focus .wide{display:grid;grid-template-columns:1fr auto 1fr}
.head.focus .secure{display:inline-flex;align-items:center;gap:8px;font-size:var(--s-small);color:var(--stone)}
.head.focus .back{justify-self:end;font-size:var(--s-small);color:var(--stone);text-underline-offset:3px;padding:6px 0}
.head.focus .back:hover{color:var(--ink)}
.head.focus .back{white-space:nowrap}
@media (max-width:520px){.head.focus .secure{font-size:0;gap:0}.head.focus .back{font-size:var(--s-micro)}}

/* ==================================================================
   A2 · Two columns, sticky summary
   ================================================================== */
.woocommerce-checkout .page{max-width:1120px}
.woocommerce-checkout .page-body > h1{font-weight:300;font-size:var(--s-h2);letter-spacing:-.02em;line-height:1.08}
.woocommerce-checkout .wc-block-components-sidebar-layout{align-items:flex-start;gap:0}
.woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-main{width:58.3333%;padding-right:clamp(24px,4vw,64px);box-sizing:border-box}
.woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar{width:41.6667%;position:sticky;top:88px;padding-left:0;box-sizing:border-box}
@media (max-width:900px){
  .woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-main,
  .woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar{width:100%;padding-right:0;position:static}
}

/* ==================================================================
   A3 · The summary as a showcase (nook-checkout.js, order received)
   ================================================================== */
.wp-block-woocommerce-checkout-order-summary-cart-items-block,
.wp-block-woocommerce-checkout-order-summary-coupon-form-block,
.wp-block-woocommerce-checkout-order-summary-subtotal-block,
.wp-block-woocommerce-checkout-order-summary-fee-block,
.wp-block-woocommerce-checkout-order-summary-discount-block,
.wp-block-woocommerce-checkout-order-summary-shipping-block,
.wp-block-woocommerce-checkout-order-summary-taxes-block,
.wc-block-components-totals-wrapper:has(.wc-block-components-totals-footer-item){display:none}
.nsum .nitem{padding:0 0 22px;margin:0 0 22px;border-bottom:1px solid var(--line)}
.nsum .nset{background:var(--wall);padding:30px 16px 26px;display:flex;justify-content:center}
.nsum .nset .show{display:flex;justify-content:center;width:100%}
.nsum .nrow{display:flex;justify-content:space-between;gap:16px;margin-top:16px}
.nsum .ninfo h3{font-size:var(--s-body);font-weight:500;margin:0}
.nsum .nqty{color:var(--stone);font-weight:400}
.nsum .ninfo p{margin:3px 0 0;font-size:var(--s-small);color:var(--stone)}
.nsum .nprice{text-align:right;font-size:var(--s-body);display:flex;flex-direction:column;align-items:flex-end;flex:none}
.nsum .nprice strong{font-weight:500}
.nsum .nprice strong.on{color:var(--offer)}
.nsum .nprice s{color:var(--stone);font-size:var(--s-small)}
.nsum .nprice small{color:var(--offer);font-size:var(--s-micro);margin-top:3px;max-width:18ch}
.nsum .ntotals{margin:0;display:grid;grid-template-columns:1fr auto;gap:8px 16px;font-size:var(--s-small)}
.nsum .ntotals dt{color:var(--stone)}
.nsum .ntotals dd{margin:0;text-align:right}
.nsum .ntotals .saved{color:var(--offer)}
.nsum .ntotals .total{font-size:var(--s-body);color:var(--ink);font-weight:500;padding-top:12px;margin-top:4px;border-top:1px solid var(--line)}

/* ==================================================================
   A5 · Button and trust line
   ================================================================== */
.wc-block-checkout__actions .wc-block-components-checkout-return-to-cart-button{display:none}
.wc-block-checkout__actions_row{justify-content:stretch}
.trust{margin:14px 0 0;font-size:var(--s-micro);color:var(--stone);text-align:center;line-height:1.5}
.trust a{text-underline-offset:3px}

/* ==================================================================
   A7 · Order received
   ================================================================== */
.woocommerce-order-received .page-body > h1{display:none}
.received h1{font-weight:300;font-size:var(--s-h2);letter-spacing:-.02em;line-height:1.08;margin:0}
.received .lede{color:var(--stone);margin:12px 0 0}
.received h2{font-weight:500;font-size:var(--s-h3);margin:36px 0 8px}
.received address{font-style:normal;color:var(--stone);font-size:var(--s-small);line-height:1.6}
.received .steps{list-style:none;margin:clamp(28px,4vw,44px) 0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:0;counter-reset:s}
.received .steps li{position:relative;padding:18px 20px 0 0;border-top:1px solid var(--line);font-size:var(--s-small);counter-increment:s}
.received .steps li::before{content:counter(s);position:absolute;top:-11px;left:0;width:22px;height:22px;border-radius:50%;background:var(--ink);color:#fff;font-size:.72rem;display:grid;place-items:center}
.received .steps li b{display:block;font-weight:500;font-size:var(--s-body);margin-top:6px}
.received .steps li span{color:var(--stone)}
.received .nsum{max-width:520px}
@media (max-width:640px){.received .steps{grid-template-columns:1fr;gap:22px}.received .steps li{border-top:0;border-left:1px solid var(--line);padding:0 0 0 22px}.received .steps li::before{top:0;left:-11px}}

/* Desktop: the summary is always open, so the "Show order summary" toggle is mobile-only */
@media (min-width:901px){
  .woocommerce-checkout .wc-block-components-checkout-order-summary__title{display:none}
}

/* ==================================================================
   B2 · Rush production checkbox, above the Place order button
   ================================================================== */
.rush{display:flex;align-items:flex-start;gap:12px;margin:0 0 18px;padding:14px 16px;border:1px solid var(--line);border-radius:2px;font-size:var(--s-small);line-height:1.4;cursor:pointer}
.rush input{margin:2px 0 0;width:18px;height:18px;accent-color:var(--ink);flex:none}
.rush b{font-weight:500}
.rush .num{color:var(--stone)}

/* Mobile summary toggle reads "Show order summary — $423" */
.wc-block-components-checkout-order-summary__title{justify-content:flex-start;gap:8px}
.wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-price::before{content:"— "}
.wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-icon{margin-left:auto}

.wp-block-woocommerce-checkout-contact-information-block .wc-block-components-checkbox{margin-top:16px}

/* 2 · Summary text keeps a 20px inner margin (images may run edge to edge) */
.wp-block-woocommerce-checkout .nsum .nrow,
.wp-block-woocommerce-checkout .nsum .ntotals{padding-left:20px;padding-right:20px}
.wp-block-woocommerce-checkout .nsum .ntotals{padding-bottom:20px}
.wp-block-woocommerce-checkout .nsum .nitem:last-of-type{margin-bottom:22px}

/* summary: continuous rule above Total, and no empty leftover of WooCommerce's own totals */
.wp-block-woocommerce-checkout-order-summary-totals-block{display:none}
.nsum .ntotals{column-gap:0}
.nsum .ntotals dd{padding-left:16px}

/* ==================================================================
   Last chance (checkout cross-sell): inside the summary on desktop,
   under the "Show order summary" toggle on mobile
   ================================================================== */
.wp-block-woocommerce-checkout .nsum .last-chance{padding:0 20px 22px}
.last-chance .cross{margin:0}
.last-chance--mobile{margin:0 0 20px}
.last-chance--mobile .cross{margin:0}
.cross--done{margin:0;padding:14px 18px;border:1px solid var(--line);border-radius:2px;background:var(--wall);font-size:var(--s-small);color:var(--offer)}
.cross--checkout .ghost{margin-top:12px}
@media (min-width:901px){.last-chance--mobile{display:none}}
@media (max-width:900px){.last-chance--inline{display:none}}

/* ==================================================================
   Remove (X), Undo, empty bag, header link
   ================================================================== */
.nsum .nitem{position:relative}
.nsum .nx{position:absolute;top:8px;right:8px;z-index:2;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;color:var(--stone);background:rgba(255,255,255,.82);transition:color .2s,background .2s}
.nsum .nx:hover{color:var(--ink);background:var(--white)}
.nsum .removed{margin:0 20px 16px;padding:12px 16px;border:1px solid var(--line);border-radius:2px;background:var(--wall);font-size:var(--s-small);color:var(--stone)}
.nsum .removed button{color:var(--ink);font-weight:500;text-decoration:underline;text-underline-offset:3px}
.nsum .nempty{padding:36px 20px;text-align:center;display:grid;gap:16px;justify-items:center;font-size:var(--s-small);color:var(--stone)}
.nsum .nempty b{color:var(--ink);font-weight:500;font-size:var(--s-body)}

/* lines without a picture (Rush): keep the price clear of the X */
.nsum .nitem:not(:has(.nset)) .nrow{padding-right:44px;align-items:center;margin-top:0;padding-top:14px}
.nsum .nitem:not(:has(.nset)) .nx{top:50%;transform:translateY(-50%);right:12px}

.nook-empty-undo{margin:0 0 16px;padding:12px 16px;border:1px solid var(--line);border-radius:2px;background:var(--wall);font-size:var(--s-small);color:var(--stone);text-align:center}
.nook-empty-undo button{color:var(--ink);font-weight:500;text-decoration:underline;text-underline-offset:3px}
.wc-block-checkout-empty{text-align:center;padding:clamp(24px,5vw,56px) 0;display:grid;gap:14px;justify-items:center}
.wc-block-checkout-empty__image{width:48px;height:48px;color:var(--stone);opacity:.6}
.wc-block-checkout-empty__title{font-weight:300;font-size:var(--s-h2);letter-spacing:-.02em;line-height:1.1}
.wc-block-checkout-empty__description{margin:0;color:var(--stone);font-size:var(--s-small)}
.wc-block-checkout-empty .wp-block-button__link{display:inline-flex;align-items:center;height:52px;padding:0 26px;background:var(--ink);color:#fff;text-decoration:none;border-radius:2px;font-weight:500}
.wc-block-checkout-empty .wp-block-button__link:hover{background:#000}

.nook-empty-undo{width:fit-content;margin:0 auto 16px}

.cross--checkout .cact{margin-top:12px}
.cross--checkout .cact .ghost{margin-top:0}
