/* ── Calibre WP theme — WooCommerce + account + header styling (dark, on-brand) ── */
/* Brand palette: --accent #c8553d (rust), --accent-dark #8e2f1f, bright #e0663f */

/* Header bar — the ONE site-wide nav (rendered by cwp_site_nav() in functions.php).
   Desktop: logo, horizontal link list, then sign-in + CTA, all in one row.
   Mobile (<=860px): link list collapses behind a hamburger; sign-in + CTA
   stay pinned in the bar (never hidden — they're the two things that matter). */
.cwp-site-header{position:sticky;top:0;z-index:100;background:#0b1020;border-bottom:1px solid rgba(255,255,255,.12);display:flex;align-items:center;gap:1.75rem;padding:1rem 1.5rem}
.cwp-logo{font-family:"Genos",sans-serif;font-weight:900;font-size:1.7rem;letter-spacing:.14em;text-decoration:none;color:#f4f1ea;line-height:1;white-space:nowrap}
.cwp-nav{margin-left:auto;display:flex;gap:1.4rem;align-items:center}
.cwp-nav a{color:#e9e7e1;font-size:14.5px;text-decoration:none;opacity:.9;white-space:nowrap}
.cwp-nav a:hover{opacity:1;color:#e0663f}
.cwp-nav-status{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;color:#a9a69f;white-space:nowrap}
.cwp-nav-dot{width:8px;height:8px;border-radius:50%;background:#2ecc71;box-shadow:0 0 0 3px rgba(46,204,113,.18);flex:0 0 auto}
.cwp-nav-right{display:flex;align-items:center;gap:1rem}
.cwp-nav-actions{display:flex;align-items:center;gap:14px}
.cwp-signin{color:#e9e7e1;font-size:14.5px;text-decoration:none;opacity:.9;white-space:nowrap}
.cwp-signin:hover{opacity:1;color:#e0663f}
.cwp-cta{background:#c8553d;color:#fff!important;padding:.62em 1.2em;border-radius:8px;font-size:14.5px;font-weight:700;text-decoration:none;white-space:nowrap}
.cwp-cta:hover{background:#e0663f}
.cwp-nav-toggle{display:none;background:none;border:0;color:#f4f1ea;font-size:1.55rem;line-height:1;cursor:pointer;padding:.15rem .35rem}
@media(max-width:860px){
  .cwp-nav-toggle{display:block}
  .cwp-nav-right{margin-left:auto}
  .cwp-nav{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;align-items:stretch;gap:0;background:#0b1020;border-bottom:1px solid rgba(255,255,255,.12);padding:.35rem 0;margin:0;box-shadow:0 16px 30px -12px rgba(0,0,0,.55)}
  .cwp-nav.open{display:flex}
  .cwp-nav a{padding:.8rem 1.5rem;border-top:1px solid rgba(255,255,255,.06)}
  .cwp-nav-status{padding:.8rem 1.5rem;border-top:1px solid rgba(255,255,255,.06)}
}
@media(max-width:480px){
  .cwp-site-header{padding:.85rem 1rem;gap:1rem}
  .cwp-logo{font-size:1.4rem}
  .cwp-cta{padding:.55em .9em;font-size:13px}
  .cwp-signin{font-size:13px}
}

main.site-main{max-width:1040px;margin:2.5rem auto;padding:0 1.25rem;color:#e9e7e1}

/* News article body — in-content links (no rule = browser default blue/underline) */
.article-body a{color:#e0663f}

/* Buttons — brand rust with white text */
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit,
.woocommerce-MyAccount-content .button,.wc-block-components-button{
  background:#c8553d!important;color:#fff!important;border:0!important;border-radius:10px!important;
  padding:.7em 1.3em!important;font-weight:700!important;letter-spacing:.2px;box-shadow:none!important;text-shadow:none!important;transition:background .15s}
.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,.wc-block-components-button:hover{background:#e0663f!important}

/* My Account: sidebar + content (override WooCommerce floats/widths; explicit order) */
body.woocommerce-account main{max-width:1040px;margin:2.5rem auto;padding:0 1.25rem}
body.woocommerce-account .woocommerce{display:flex!important;flex-wrap:wrap;gap:2rem;align-items:flex-start}
body.woocommerce-account .woocommerce-MyAccount-navigation{order:1;flex:0 0 230px;width:230px!important;float:none!important;margin:0!important}
body.woocommerce-account .woocommerce-MyAccount-content{order:2;flex:1 1 320px;width:auto!important;min-width:0;float:none!important;margin:0!important}
.woocommerce-MyAccount-navigation{margin:0}
.woocommerce-MyAccount-navigation ul{list-style:none;margin:0;padding:0;border:1px solid rgba(255,255,255,.14);border-radius:14px;overflow:hidden;background:rgba(255,255,255,.03)}
.woocommerce-MyAccount-navigation li{margin:0}
.woocommerce-MyAccount-navigation li a{display:block;padding:.8rem 1.1rem;text-decoration:none;color:#e9e7e1;border-bottom:1px solid rgba(255,255,255,.08)}
.woocommerce-MyAccount-navigation li:last-child a{border-bottom:0}
.woocommerce-MyAccount-navigation li a:hover{background:rgba(255,255,255,.05)}
.woocommerce-MyAccount-navigation li.is-active a{background:rgba(200,85,61,.20);color:#fff;font-weight:700;box-shadow:inset 3px 0 0 #c8553d}
.woocommerce-MyAccount-content{min-width:0}
.woocommerce-MyAccount-content h2,.woocommerce-MyAccount-content h3{color:#fff}
.woocommerce-MyAccount-content p{color:#c9c6bf}
.woocommerce-MyAccount-content a{color:#e0663f}

/* Tables (orders, cart, account) */
.woocommerce table.shop_table,.woocommerce-MyAccount-content table.shop_table{border:1px solid rgba(255,255,255,.14);border-radius:12px;border-collapse:separate;border-spacing:0;width:100%;overflow:hidden;background:rgba(255,255,255,.02);margin:0 0 1.2rem}
.woocommerce table.shop_table th,.woocommerce table.shop_table td{border-top:1px solid rgba(255,255,255,.08);padding:.8rem 1rem;color:#e9e7e1}
.woocommerce table.shop_table thead th{background:rgba(255,255,255,.05);border-top:0;text-transform:uppercase;font-size:12px;letter-spacing:.4px;color:#a9a69f}
.woocommerce table.shop_table tbody tr:hover{background:rgba(255,255,255,.02)}

/* Forms — dark, on-brand inputs (consistent with the rest of the dark site) */
.woocommerce input.input-text,.woocommerce textarea,.woocommerce select,.wc-block-components-text-input input,
.woocommerce-account input,.woocommerce-account select{background:rgba(255,255,255,.04);color:#f4f1ea;border:1px solid rgba(255,255,255,.20);border-radius:8px;padding:.65em .85em}
.woocommerce input.input-text:focus,.woocommerce textarea:focus,.woocommerce select:focus,
.woocommerce-account input:focus,.woocommerce-account select:focus{outline:none;border-color:#c8553d;box-shadow:0 0 0 2px rgba(200,85,61,.25)}
.woocommerce input.input-text::placeholder{color:#8a877f}
.woocommerce form .form-row label,.woocommerce-account label{color:#c9c6bf}
.woocommerce .show-password-input,.woocommerce .password-input{color:#c9c6bf}

/* Login / register page — centered on-brand card + brand links */
body.woocommerce-account:not(.logged-in) .woocommerce{display:block!important;max-width:460px;margin:1.5rem auto}
body.woocommerce-account:not(.logged-in) .u-columns{display:block}
.woocommerce form.login,.woocommerce form.register{border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:1.7rem 1.5rem 1.5rem;background:rgba(255,255,255,.03);margin:0}
.woocommerce form.login label,.woocommerce form.register label{color:#c9c6bf}
.woocommerce form.login .button,.woocommerce form.register .button{margin-right:.4rem}
.woocommerce-LostPassword a,.woocommerce form.login a,.woocommerce form.register a{color:#e0663f;text-decoration:none}
.woocommerce-LostPassword a:hover,.woocommerce form.login a:hover{text-decoration:underline}
.woocommerce form.login .woocommerce-form-login__rememberme,
.woocommerce form.register .woocommerce-form__label-for-checkbox{color:#c9c6bf}

/* Cart / checkout wrappers */
main.woocommerce-wrap{max-width:1100px;margin:2.5rem auto;padding:0 1.25rem}
.woocommerce .cart_totals h2,.woocommerce-checkout h3,.woocommerce-checkout #order_review_heading{color:#fff}
.woocommerce .order-total .amount,.woocommerce .cart-subtotal .amount{color:#fff}

/* Notices */
.woocommerce-message,.woocommerce-info,.woocommerce-error,.woocommerce-noreviews{border-radius:10px;border-top:3px solid #c8553d;background:rgba(255,255,255,.05);color:#e9e7e1;box-shadow:none}
.woocommerce-message a,.woocommerce-info a,.woocommerce-error a{color:#e0663f}

@media(max-width:782px){ body.woocommerce-account .woocommerce{gap:1.2rem} body.woocommerce-account .woocommerce-MyAccount-navigation{flex-basis:100%;width:100%!important} }

/* This site takes orders via /order (not a browse-store): hide WooCommerce's
   cross-sell + "New in store" product grids on the cart — they expose raw SKUs
   with placeholder art and off-brand blue links. */
.wp-block-woocommerce-product-collection,
.wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-new,
.wp-block-woocommerce-empty-cart-block h2.wp-block-heading:not(.wc-block-cart__empty-cart__title){display:none!important}
/* Empty-cart: give the "Browse store" button the brand button style (it redirects to /order) */
.wp-block-woocommerce-empty-cart-block .wp-block-button__link,
.wp-block-woocommerce-empty-cart-block a.button{background:#c8553d!important;color:#fff!important;border-radius:10px!important}
/* Orphaned dots separator on the empty cart (divided the message from the removed grid) */
.wp-block-woocommerce-empty-cart-block .wp-block-separator{display:none!important}

/* ── WooCommerce Checkout Block (checkout + order-pay) — on-brand, dark ──
   The block ships its own white/light default look (WC Blocks stylesheet),
   which sits inside our dark (--paper/--panel from calibre-dark.css) page
   as a jarring white card. Re-skin every panel/step/summary/input to the
   site's dark tokens so checkout reads as part of the same site, not a
   bolted-on default WooCommerce screen. Stripe's own UPE payment element
   auto-samples colours from these same elements (see
   wc_stripe_appearance/wc_stripe_blocks_appearance transients) so this also
   re-skins the card-payment box once those caches are cleared. */
.wc-block-checkout{color:var(--ink,#eef2f8)}
.wc-block-components-checkout-step,
.wc-block-components-panel,
.wc-block-components-totals-wrapper,
.wc-block-components-express-payment,
.wc-block-components-checkout-order-summary,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-panel__content{
  background:var(--panel,#111a2e)!important;
  border:1px solid var(--line,#1e2b45)!important;
  border-radius:14px!important;
  color:var(--ink,#eef2f8)!important;
}
.wc-block-components-checkout-step__container{background:transparent!important}
.wc-block-components-checkout-step__heading-content,
.wc-block-components-checkout-step__title,
.wc-block-components-title{color:var(--ink,#eef2f8)!important}
.wc-block-components-checkout-step__description,
.wc-block-components-order-summary-item__quantity,
.wc-block-components-order-summary-item__description,
.wc-block-components-totals-item__label,
.wc-block-components-address-card p{color:var(--muted,#8ba0c2)!important}
.wc-block-components-checkout-step__heading .wc-block-components-checkout-step__heading-content .wc-block-components-checkout-step__title{font-family:"Genos",sans-serif}
.wc-block-components-checkout-step__heading .wc-block-components-checkout-step__heading-content::before,
.wc-block-components-checkout-step .wc-block-components-checkout-step__heading-icon{background:var(--accent,#e0663f)!important;color:#160b06!important}

.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-address-form select,
.wc-block-checkout select{
  background:var(--panel-2,#0d1424)!important;color:var(--ink,#eef2f8)!important;
  border:1px solid var(--line,#1e2b45)!important;border-radius:8px!important;
}
.wc-block-components-text-input label{color:var(--muted,#8ba0c2)!important;background:transparent!important}
.wc-block-components-text-input input:focus,.wc-block-components-text-input textarea:focus{
  outline:none!important;border-color:var(--accent,#e0663f)!important;box-shadow:0 0 0 2px rgba(224,102,63,.25)!important;
}

.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option{
  background:var(--panel-2,#0d1424)!important;border:1px solid var(--line,#1e2b45)!important;
  border-radius:10px!important;color:var(--ink,#eef2f8)!important;
}
.wc-block-components-radio-control__option--checked,
.wc-block-components-radio-control-accordion-option--checked{
  border-color:var(--accent,#e0663f)!important;box-shadow:0 0 0 1px var(--accent,#e0663f) inset!important;
}
.wc-block-components-radio-control__option-secondary-label,
.wc-block-components-radio-control__description{color:var(--muted,#8ba0c2)!important}

.wc-block-components-totals-item,.wc-block-components-order-summary-item{border-color:var(--line,#1e2b45)!important}
.wc-block-components-totals-footer-item,.wc-block-components-totals-item__value{color:var(--ink,#eef2f8)!important;font-weight:700}
.wc-block-components-order-summary-item__image img{border-radius:8px;border:1px solid var(--line,#1e2b45)}

.wc-block-components-notice-banner{
  background:rgba(224,102,63,.12)!important;border-color:var(--accent,#e0663f)!important;color:var(--ink,#eef2f8)!important;border-radius:10px!important;
}
.wc-block-components-notice-banner .wc-block-components-notice-banner__title{color:var(--ink,#eef2f8)!important}

.wc-block-components-checkbox svg{fill:var(--accent,#e0663f)!important}
.wc-block-components-checkbox__label{color:var(--muted,#8ba0c2)!important}

.wc-block-components-panel .wc-block-components-panel__button,
.wc-block-components-totals-coupon-link{color:var(--accent,#e0663f)!important}

.wc-block-components-express-payment__title,.wc-block-components-express-payment-continue-rule{color:var(--muted,#8ba0c2)!important}
.wc-block-components-express-payment-continue-rule::before,.wc-block-components-express-payment-continue-rule::after{border-color:var(--line,#1e2b45)!important}
