/* KitabX Core: shop page design (cart, checkout, order received, login / my account).
   Brand: navy #0a2540, red #e63946, Plus Jakarta Sans, 15px rounded white cards.
   Change colours here or override from Settings > KitabX Core > Custom CSS. */

body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account){
  --kx-navy:#0a2540;--kx-navy2:#0d2340;--kx-red:#e63946;--kx-red-dark:#c8323d;
  --kx-line:#e8edf3;--kx-bg:#f6f8fb;--kx-muted:#6b7280;--kx-radius:15px;
  background:var(--kx-bg);font-family:"Plus Jakarta Sans",system-ui,sans-serif;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main{max-width:1200px;margin:0 auto;padding:28px 16px 64px}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .page-header{margin:0 0 22px}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .entry-title{margin:0;font-size:clamp(26px,3.2vw,36px);font-weight:800;color:var(--kx-navy);letter-spacing:-.01em}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) :is(h2,h3,h4){color:var(--kx-navy);font-weight:700}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) h2{font-size:22px}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) h3{font-size:19px}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main a{color:var(--kx-navy)}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main a:hover{color:var(--kx-red)}

/* ---------- Notices ---------- */
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) :is(.woocommerce-message,.woocommerce-info,.woocommerce-error,.woocommerce-notice){
  background:#fff;border:1px solid var(--kx-line);border-left:4px solid var(--kx-navy);border-radius:12px;padding:14px 18px;margin:0 0 20px;color:#1f2937;list-style:none;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .woocommerce-error{border-left-color:var(--kx-red)}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .woocommerce-message{border-left-color:#16a34a}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) :is(.woocommerce-message,.woocommerce-info)::before{display:none}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .woocommerce-info a{font-weight:700;text-decoration:underline}

/* ---------- Tables ---------- */
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table{
  width:100%;background:#fff;border:1px solid var(--kx-line);border-radius:var(--kx-radius);border-collapse:separate;border-spacing:0;overflow:hidden;margin:0 0 24px;font-size:15px;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table :is(th,td){border:0;border-bottom:1px solid var(--kx-line);padding:16px 18px;background:#fff;vertical-align:middle;color:#1f2937}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table tbody tr:nth-child(odd) td,
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table tbody tr:nth-child(odd) th{background:#fff}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table thead th{background:var(--kx-navy);color:#fff;font-weight:700;font-size:13px;letter-spacing:.04em;text-transform:uppercase;border:0}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table tr:last-child :is(th,td){border-bottom:0}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table tfoot th{font-weight:700;color:var(--kx-navy)}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table .order-total :is(th,td){font-size:18px;font-weight:800;color:var(--kx-navy);background:#f3f6fa}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table td.product-name a{font-weight:700;text-decoration:none}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table .product-thumbnail img{width:72px;height:96px;object-fit:cover;border-radius:8px}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table a.remove{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#fdecee;color:var(--kx-red)!important;font-size:18px;text-decoration:none}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table a.remove:hover{background:var(--kx-red);color:#fff!important}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table .amount{font-weight:700;color:var(--kx-navy)}

/* ---------- Forms ---------- */
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main label{font-size:14px;font-weight:600;color:var(--kx-navy);margin-bottom:6px;display:inline-block}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main :is(input[type=text],input[type=email],input[type=tel],input[type=password],input[type=number],input[type=search],select,textarea,.select2-selection){
  width:100%;box-sizing:border-box;min-height:48px;padding:12px 14px;background:#fff;border:1px solid #dfe6ee;border-radius:10px;font:inherit;font-size:15px;color:#111827;box-shadow:none;transition:border-color .2s,box-shadow .2s;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main textarea{min-height:96px}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main :is(input,select,textarea):focus{outline:0;border-color:var(--kx-navy);box-shadow:0 0 0 3px rgba(10,37,64,.12)}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .form-row{margin:0 0 16px}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .required{color:var(--kx-red);text-decoration:none}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main :is(input[type=checkbox],input[type=radio]){width:auto;min-height:0;accent-color:var(--kx-navy);margin-right:8px}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main .quantity .qty{width:84px;text-align:center;padding:10px}

/* ---------- Buttons ---------- */
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main :is(.button,button.button,input.button,#place_order,.checkout-button,.woocommerce-Button,button[type=submit]){
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 26px;background:var(--kx-navy);color:#fff!important;border:0;border-radius:12px;font:inherit;font-size:15px;font-weight:700;text-decoration:none;cursor:pointer;line-height:1.2;transition:background .2s,transform .15s;
}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main :is(.button,button.button,input.button,#place_order,.checkout-button,.woocommerce-Button,button[type=submit]):hover{background:var(--kx-navy2);transform:translateY(-1px)}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main :is(#place_order,.checkout-button,a.checkout-button){background:var(--kx-red);width:100%;font-size:16px;min-height:54px;padding:0 26px;line-height:1.2;box-sizing:border-box}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main :is(#place_order,.checkout-button,a.checkout-button):hover{background:var(--kx-red-dark)}
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main button[disabled],
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main .button:disabled{opacity:.5;cursor:not-allowed;transform:none}

/* ---------- Cart ---------- */
body.woocommerce-cart .woocommerce-cart-form table.cart td.actions{background:#f3f6fa;padding:16px 18px}
body.woocommerce-cart .coupon{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
body.woocommerce-cart .site-main .coupon input{flex:1 1 200px;width:auto;min-width:180px;min-height:46px}
body.woocommerce-cart .cart-collaterals{display:flex;justify-content:flex-end}
body.woocommerce-cart .cart_totals{width:100%;max-width:460px;background:#fff;border:1px solid var(--kx-line);border-radius:var(--kx-radius);padding:22px;box-sizing:border-box}
body.woocommerce-cart .cart_totals h2{margin:0 0 14px;font-size:20px}
body.woocommerce-cart .cart_totals table.shop_table{border:0;margin:0 0 16px;border-radius:0}
body.woocommerce-cart .cart_totals table.shop_table :is(th,td){padding:12px 4px}
body.woocommerce-cart .wc-proceed-to-checkout{padding:0}

/* ---------- Checkout (two columns) ---------- */
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info{margin-bottom:14px}
body.woocommerce-checkout form.checkout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);gap:0 28px;align-items:start}
body.woocommerce-checkout form.checkout #customer_details{grid-column:1;grid-row:1/span 3;background:#fff;border:1px solid var(--kx-line);border-radius:var(--kx-radius);padding:26px}
body.woocommerce-checkout form.checkout #customer_details :is(.col-1,.col-2){float:none;width:100%;padding:0}
body.woocommerce-checkout form.checkout #customer_details h3{margin:0 0 18px;padding-bottom:12px;border-bottom:2px solid var(--kx-red);display:inline-block}
body.woocommerce-checkout form.checkout #order_review_heading{grid-column:2;grid-row:1;margin:0 0 12px}
body.woocommerce-checkout form.checkout #order_review{grid-column:2;grid-row:2;background:#fff;border:1px solid var(--kx-line);border-radius:var(--kx-radius);padding:22px;position:sticky;top:20px}
body.woocommerce-checkout #order_review table.shop_table{border:0;margin:0 0 18px;border-radius:0}
body.woocommerce-checkout #order_review table.shop_table :is(th,td){padding:12px 4px;font-size:14px}
body.woocommerce-checkout #payment{background:transparent;border-radius:0}
body.woocommerce-checkout #payment ul.payment_methods{list-style:none;margin:0 0 14px;padding:0;border:0}
body.woocommerce-checkout #payment ul.payment_methods li{background:#f3f6fa;border:1px solid var(--kx-line);border-radius:12px;padding:14px 16px;margin:0 0 10px}
body.woocommerce-checkout #payment div.payment_box{background:#fff;border-radius:8px;color:#374151;margin:10px 0 0;padding:12px 14px;font-size:14px}
body.woocommerce-checkout #payment div.payment_box::before{display:none}
body.woocommerce-checkout #payment .place-order{padding:0;background:transparent}
body.woocommerce-checkout .woocommerce-privacy-policy-text{font-size:13px;color:var(--kx-muted);margin-bottom:14px}

/* ---------- Order received (thank you) ---------- */
body.woocommerce-order-received .woocommerce-thankyou-order-received{background:#ecfdf3;border:1px solid #bbf7d0;border-radius:var(--kx-radius);padding:18px 22px;font-size:17px;font-weight:700;color:#166534;margin:0 0 22px}
body.woocommerce-order-received ul.woocommerce-order-overview{list-style:none;margin:0 0 28px;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px}
body.woocommerce-order-received ul.woocommerce-order-overview li{float:none;margin:0;border:1px solid var(--kx-line);border-radius:12px;background:#fff;padding:14px 16px;font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--kx-muted)}
body.woocommerce-order-received ul.woocommerce-order-overview li strong{display:block;margin-top:6px;font-size:16px;letter-spacing:0;text-transform:none;color:var(--kx-navy)}
body.woocommerce-order-received .woocommerce-order-details,
body.woocommerce-order-received .woocommerce-customer-details{background:#fff;border:1px solid var(--kx-line);border-radius:var(--kx-radius);padding:24px;margin-bottom:22px}
body.woocommerce-order-received .woocommerce-order-details table.shop_table{margin-bottom:0}
body.woocommerce-order-received address{border:0;padding:0;font-style:normal;line-height:1.7;color:#374151}

/* ---------- Login / My account ---------- */
body.woocommerce-account:not(.logged-in) .site-main .page-header{text-align:center}
body.woocommerce-account:not(.logged-in) .woocommerce{max-width:480px;margin:0 auto}
body.woocommerce-account:not(.logged-in) .woocommerce>h2{text-align:center;margin:0 0 16px}
body.woocommerce-account form.woocommerce-form-login,
body.woocommerce-account form.woocommerce-form-register,
body.woocommerce-account form.lost_reset_password{background:#fff;border:1px solid var(--kx-line);border-radius:var(--kx-radius);padding:28px;box-shadow:0 10px 30px rgba(10,37,64,.07);margin:0 0 20px}
body.woocommerce-account form.woocommerce-form-login .woocommerce-form-login__submit{width:100%;margin:6px 0 14px}
body.woocommerce-account form.woocommerce-form-login .woocommerce-form-login__rememberme{display:flex;align-items:center;font-weight:500;margin:6px 0 10px}
body.woocommerce-account .lost_password{text-align:center;margin:0}
body.woocommerce-account .lost_password a{font-weight:600;text-decoration:underline}
body.woocommerce-account .password-input{display:block;position:relative}
body.woocommerce-account .show-password-input{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none!important;border:0;min-height:0;padding:0;width:24px}
body.woocommerce-account.logged-in .woocommerce{display:grid;grid-template-columns:260px minmax(0,1fr);gap:26px;align-items:start}
body.woocommerce-account .woocommerce-MyAccount-navigation ul{list-style:none;margin:0;padding:10px;background:#fff;border:1px solid var(--kx-line);border-radius:var(--kx-radius)}
body.woocommerce-account .woocommerce-MyAccount-navigation li a{display:block;padding:12px 14px;border-radius:10px;font-weight:600;text-decoration:none;color:var(--kx-navy)}
body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover{background:var(--kx-navy);color:#fff}
body.woocommerce-account .woocommerce-MyAccount-content{background:#fff;border:1px solid var(--kx-line);border-radius:var(--kx-radius);padding:26px}

/* ---------- Mobile ---------- */
@media (max-width:900px){
  body.woocommerce-checkout form.checkout{display:block}
  body.woocommerce-checkout form.checkout #customer_details{padding:18px;margin-bottom:22px}
  body.woocommerce-checkout form.checkout #order_review{position:static;padding:16px}
  body.woocommerce-cart .cart-collaterals{display:block}
  body.woocommerce-cart .cart_totals{max-width:none}
  body.woocommerce-account.logged-in .woocommerce{display:block}
  body.woocommerce-account .woocommerce-MyAccount-navigation{margin-bottom:18px}
}
@media (max-width:640px){
  body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main{padding:18px 12px 56px}
  body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) table.shop_table :is(th,td){padding:12px 14px}
  body.woocommerce-cart table.shop_table_responsive tr{display:block;position:relative;border-bottom:1px solid var(--kx-line);padding:8px 0}
  body.woocommerce-cart table.shop_table_responsive tr td{display:flex;justify-content:space-between;align-items:center;text-align:right;border:0;padding:8px 14px}
  body.woocommerce-cart table.shop_table_responsive tr td::before{content:attr(data-title) ": ";font-weight:700;color:var(--kx-navy);text-align:left;float:none}
  body.woocommerce-cart table.shop_table_responsive tr td.product-thumbnail{display:block!important;text-align:center}
  body.woocommerce-cart table.shop_table_responsive tr td.product-thumbnail::before,
  body.woocommerce-cart table.shop_table_responsive tr td.product-remove::before,
  body.woocommerce-cart table.shop_table_responsive tr td.actions::before{display:none}
  body.woocommerce-cart table.shop_table_responsive tr td.product-remove{display:block;position:absolute;top:10px;right:10px;padding:0;z-index:2}
  body.woocommerce-cart table.shop_table_responsive tr td.actions{display:block;text-align:left}
  body.woocommerce-cart .coupon{flex-direction:column;align-items:stretch;margin-bottom:12px}
  body.woocommerce-cart .site-main .coupon input{flex:none;width:100%}
  body.woocommerce-cart .coupon .button,body.woocommerce-cart button[name=update_cart]{width:100%}
  body.woocommerce-cart .cart_totals table.shop_table_responsive tr td{display:block;text-align:left;padding:4px 14px 12px}
  body.woocommerce-cart .cart_totals table.shop_table_responsive tr th{display:block;padding:12px 14px 0}
  body.woocommerce-cart .cart_totals table.shop_table_responsive tr td::before{display:none}
}
}

/* ---------- My account (logged in): explicit columns, ignore WooCommerce's old float widths ---------- */
body.woocommerce-account.logged-in .woocommerce>.woocommerce-notices-wrapper{grid-column:1/-1;grid-row:1;min-height:0}
body.woocommerce-account.logged-in .woocommerce>.woocommerce-notices-wrapper:empty{display:none}
body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation{float:none;width:auto;grid-column:1;grid-row:2;margin:0}
body.woocommerce-account.logged-in .woocommerce-MyAccount-content{float:none;width:auto;grid-column:2;grid-row:2;margin:0;min-width:0;overflow-wrap:anywhere}
body.woocommerce-account .woocommerce-MyAccount-content p{line-height:1.8;color:#374151}
body.woocommerce-account .woocommerce-MyAccount-content a{text-decoration:underline}
body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a{color:var(--kx-red)}
body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a:hover{background:var(--kx-red);color:#fff}
body.woocommerce-account .woocommerce-Addresses{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}
body.woocommerce-account .woocommerce-Addresses .u-column1,body.woocommerce-account .woocommerce-Addresses .u-column2{float:none;width:auto;border:1px solid var(--kx-line);border-radius:12px;padding:18px}
@media (max-width:900px){
  body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation,
  body.woocommerce-account.logged-in .woocommerce-MyAccount-content{grid-column:auto;grid-row:auto}
}

/* ---------- Fixes: centred button labels, order-overview grid ---------- */
body:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .site-main :is(.button,button.button,input.button,a.button,#place_order,.checkout-button,a.checkout-button,.woocommerce-Button,button[type=submit]),
body.woocommerce-cart .woocommerce .wc-proceed-to-checkout a.checkout-button{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;
  line-height:1.2!important;padding-top:0!important;padding-bottom:0!important;min-height:48px;height:auto;box-sizing:border-box;
}
body:is(.woocommerce-cart,.woocommerce-checkout) .site-main :is(#place_order,a.checkout-button,.checkout-button){display:flex!important;width:100%;min-height:54px;padding-left:26px!important;padding-right:26px!important}
body.woocommerce-order-received ul.woocommerce-order-overview::before,
body.woocommerce-order-received ul.woocommerce-order-overview::after{display:none!important;content:none!important}
body.woocommerce-order-received ul.woocommerce-order-overview li{min-width:0}
body.woocommerce-order-received ul.woocommerce-order-overview li strong{overflow-wrap:anywhere;word-break:break-word}
.wc-proceed-to-checkout br,.woocommerce-cart-form .button br,.woocommerce .button br{display:none}
