/* WooCommerce screens dressed in the original store's look. */

/* Font: Almarai everywhere; all titles in the heaviest weight (bold). */
body, button, input, select, textarea, .select2-container { font-family: 'Almarai', Tahoma, 'Segoe UI', Arial, sans-serif !important; }
h1, h2, h3, h4,
.original-hero-copy h1, .original-hero-copy h2,
.home-section-head h2, .home-products > h2, .home-banners h2, .home-wholesale h2, .home-offers h2,
.page-title h1, .section-head h2, .offers-hero h1, .offers-heading h2, .wholesale-hero-copy h1,
.wholesale-section-title h2, .wholesale-summary h2, .detail-copy h1, .footer-columns h3,
.original-product-body h3, .cart-item-info h3, .wholesale-card-body h3, .offer-body h2 {
  font-family: 'Almarai', Tahoma, sans-serif !important; font-weight: 800 !important; letter-spacing: 0;
}
.black-nav.najjar-home-drawer:not(.open) { display: none; }
.wa-float .wa-close, .wa-float.open .wa-open { display: none; }
.wa-float.open .wa-close { display: grid; place-items: center; }
.najjar-notices:empty { display: none; }

.original-product-image img, .wholesale-card-image img, .offer-image img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.original-product-image button.added, .offer-body button.added, .wholesale-cart.added { background: #1f8a4c !important; color: #fff !important; }
.najjar-buy p { margin: 0 0 10px; }
.unit-tag { display: inline-block; margin-inline-start: 6px; padding: 1px 10px; border-radius: 20px; font-size: 11.5px; background: #f1f1f1; color: #666; vertical-align: middle; }
.unit-tag.carton { background: var(--brand-cream); color: var(--brand-maroon); font-weight: 700; }
.pagination, .navigation.pagination { margin: 26px 0; }
.nav-links { display: flex; gap: 6px; justify-content: center; }
.nav-links .page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; }
.nav-links .current { background: var(--brand-maroon); color: #fff; border-color: var(--brand-maroon); }

/* Offers: old price + discount badge */
del.najjar-old { color: #a99; font-weight: 400; font-size: .82em; margin-inline-start: 6px; text-decoration: line-through; }
.original-product-image { position: relative; }
.najjar-sale-badge { position: absolute; top: 8px; right: 8px; z-index: 3; background: #c62828; color: #fff; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.najjar-sale-badge.inline { position: static; display: inline-block; margin: -10px 0 12px; }
.najjar-sale-badge[hidden] { display: none; }
.najjar-off-tag { font-style: normal; color: #c62828; font-weight: 800; font-size: 11px; }
.offer-prices del { color: #aaa; }

.najjar-free-hint { margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; background: #f3fbf6; border: 1px solid #bfe3cc; color: #1f6b3c; font-size: 14px; }

/* Floating cart (always visible) */
.najjar-cartbar { position: fixed; bottom: 20px; right: 20px; z-index: 89; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 40px; background: var(--brand-maroon); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); text-decoration: none; transition: transform .2s; }
.najjar-cartbar:hover { transform: translateY(-2px); color: #fff; }
.najjar-cartbar.bump { animation: ncb-bump .5s; }
@keyframes ncb-bump { 30% { transform: scale(1.1); } 100% { transform: none; } }
.najjar-cartbar .ncb-icon { position: relative; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; }
.najjar-cartbar .ncb-icon i { position: absolute; top: -4px; left: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--brand-gold); color: #3a0a0d; font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.najjar-cartbar .ncb-text { display: flex; flex-direction: column; line-height: 1.25; }
.najjar-cartbar .ncb-text small { font-size: 11px; opacity: .8; }
.najjar-cartbar .ncb-text b { font-size: 15px; }
.najjar-cartbar .ncb-go { background: #fff; color: var(--brand-maroon); font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 20px; }
.najjar-cartbar:not(.has-items) .ncb-go { display: none; }
@media (max-width: 520px) { .najjar-cartbar { bottom: 14px; right: 12px; } .najjar-cartbar .ncb-go { padding: 7px 10px; } }

.woocommerce-cart-form.is-updating { opacity: .55; pointer-events: none; }
.cart-item-info h3 a { color: inherit; }
.cart-item img { width: 90px; height: 90px; object-fit: contain; }

/* Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice {
  list-style: none; margin: 16px 0; padding: 14px 18px; border-radius: 7px; background: var(--brand-cream);
  border-inline-start: 4px solid var(--brand-maroon); color: #333; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
}
.woocommerce-error { border-color: #c0392b; background: #fdf0ee; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; }

/* Buttons */
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button, #place_order, .checkout-button, .woocommerce-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border: 1px solid var(--brand-maroon);
  background: var(--brand-maroon); color: #fff; font-weight: 700; border-radius: 4px; cursor: pointer; font-family: inherit; font-size: 14px; text-decoration: none;
}
.woocommerce .button:hover, #place_order:hover { background: #7b1a21; }
.woocommerce .button:disabled, .woocommerce .button.disabled { opacity: .55; cursor: not-allowed; }
#place_order, .checkout-button { width: 100%; padding: 14px; font-size: 16px; }

/* Forms */
.woocommerce form .form-row { display: flex; flex-direction: column; gap: 5px; margin: 0 0 14px; }
.woocommerce form .form-row label { font-size: 14px; font-weight: 700; color: #444; }
.woocommerce form .form-row .required { color: var(--brand-maroon); text-decoration: none; }
.woocommerce input.input-text, .woocommerce textarea, .woocommerce select, .woocommerce .select2-selection, .woocommerce-input-wrapper input, .woocommerce-input-wrapper select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-family: inherit; font-size: 14px; min-height: 44px; box-sizing: border-box;
}
.woocommerce input:focus, .woocommerce textarea:focus, .woocommerce select:focus { outline: none; border-color: var(--brand-maroon); }
.woocommerce .select2-container .select2-selection--single { height: 44px; display: flex; align-items: center; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* Tables (cart, order review, my account orders) */
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; font-size: 14px; }
.woocommerce table.shop_table thead th { background: #faf7f2; color: #555; font-weight: 700; }
.woocommerce table.shop_table .product-thumbnail img { width: 70px; height: 70px; object-fit: contain; }
.woocommerce table.shop_table .product-remove a { color: #c0392b; font-size: 22px; text-decoration: none; }
.woocommerce table.shop_table .product-name a { color: #333; font-weight: 700; }
.woocommerce table.shop_table .amount { color: var(--brand-maroon); font-weight: 700; }
.woocommerce .quantity .qty { width: 70px; text-align: center; min-height: 40px; }
.woocommerce .actions { text-align: end; }
.woocommerce .actions .coupon { display: inline-flex; gap: 8px; float: right; }
.woocommerce .actions .coupon input { width: 160px; }

/* Cart page layout like the original (items + summary) */
.najjar-woo-page .woocommerce { display: block; }
.najjar-woo-page .woocommerce-cart-form { margin-bottom: 24px; overflow-x: auto; }
.cart-collaterals .cart_totals { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; max-width: 460px; margin-inline-start: auto; }
.cart-collaterals .cart_totals h2 { font-size: 20px; margin: 0 0 12px; }
.cart-collaterals .cart_totals table.shop_table { border: 0; }
.cart-collaterals .cart_totals .order-total .amount { font-size: 19px; }
.woocommerce-shipping-methods { list-style: none; margin: 0; padding: 0; }
.woocommerce-shipping-methods li { margin: 4px 0; }

/* Checkout */
.woocommerce-checkout form.checkout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.woocommerce-checkout #customer_details { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.woocommerce-checkout #customer_details .col-2 { margin-top: 10px; }
.woocommerce-checkout #order_review_heading { display: none; }
.woocommerce-checkout #order_review { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; position: sticky; top: 20px; }
.woocommerce-checkout #order_review::before { content: "طلبك"; display: block; font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.woocommerce-checkout .woocommerce-form-coupon-toggle, .woocommerce-checkout .woocommerce-form-login-toggle { grid-column: 1 / -1; }
.woocommerce-checkout-payment ul.payment_methods { list-style: none; margin: 16px 0; padding: 0; }
.woocommerce-checkout-payment ul.payment_methods li { padding: 12px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; }
.woocommerce-checkout-payment .payment_box { margin-top: 8px; font-size: 13px; color: #666; }
.woocommerce-terms-and-conditions-wrapper { font-size: 13px; color: #666; margin: 10px 0; }
h3#ship-to-different-address { font-size: 15px; }
.woocommerce-billing-fields h3, .woocommerce-additional-fields h3 { font-size: 18px; margin: 0 0 14px; }

/* Checkout map */
.najjar-location { margin: 18px 0 6px; padding: 16px; border: 1px dashed #cdbba8; border-radius: 8px; background: #fffdf9; }
.najjar-location.is-set { border-style: solid; border-color: #1f8a4c; }
.najjar-location h3 { font-size: 16px; margin: 0 0 4px; }
.najjar-location-hint { font-size: 13px; color: #777; margin: 0 0 10px; }
.najjar-locate { margin-bottom: 10px; }
.najjar-map { height: 300px; border-radius: 8px; border: 1px solid var(--line); z-index: 1; }
.najjar-location-status { font-size: 13px; margin: 8px 0 0; color: #8e7768; }
.najjar-location.is-set .najjar-location-status { color: #1f8a4c; font-weight: 700; }
.leaflet-container { font-family: inherit; direction: ltr; }

/* Bank transfer next-step box (thank-you page) */
.najjar-bank-box { margin: 0 0 22px; padding: 20px; border: 2px solid var(--brand-gold); border-radius: 10px; background: #fffaf0; }
.najjar-bank-box h2 { font-size: 19px; color: var(--brand-maroon); margin: 0 0 8px; }
.najjar-bank-box p { margin: 0 0 14px; color: #444; }
.najjar-bank-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; display: grid; gap: 8px; }
.najjar-bank-card > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.najjar-bank-card span { color: #888; font-size: 13px; min-width: 90px; }
.najjar-bank-card .iban b { font-size: 17px; letter-spacing: .5px; color: var(--brand-maroon); }
.najjar-copy { border: 1px solid var(--brand-maroon); background: #fff; color: var(--brand-maroon); border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.najjar-copy.done { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
.najjar-send-receipt { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 30px; background: #25d366; color: #fff !important; font-weight: 700; text-decoration: none; }
.najjar-send-receipt:hover { background: #1ebe5b; }

/* Checkout: bank transfer steps + receipt upload */
.najjar-transfer { margin: 14px 0; padding: 16px; border: 2px solid var(--brand-gold); border-radius: 10px; background: #fffaf0; }
.najjar-transfer h4 { margin: 0 0 8px; font-size: 16px; color: var(--brand-maroon); }
.najjar-transfer ol { margin: 6px 0 10px; padding-inline-start: 20px; font-size: 14px; }
.najjar-receipt { padding: 12px; border: 1px dashed #cdbba8; border-radius: 8px; background: #fff; text-align: center; }
.najjar-receipt.is-done { border-style: solid; border-color: #1f8a4c; }
.najjar-receipt .ok { color: #1f8a4c; font-weight: 700; margin: 0 0 8px; }
.najjar-receipt .hint { font-size: 12px; color: #888; margin: 6px 0 0; }
.najjar-receipt-btn { display: inline-block; padding: 10px 18px; border-radius: 30px; background: var(--brand-maroon); color: #fff !important; opacity: 1 !important; font-weight: 700; cursor: pointer; }
.najjar-receipt-btn.secondary { background: #fff; color: var(--brand-maroon) !important; border: 1px solid var(--brand-maroon); font-size: 13px; padding: 6px 14px; }
.najjar-receipt-msg { margin: 6px 0 0; font-size: 13px; color: var(--brand-maroon); }
.najjar-receipt-msg:empty { display: none; }

/* Thank you / order details */
.woocommerce-order { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.woocommerce-order-overview { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.woocommerce-order-overview li { background: #faf7f2; padding: 10px 12px; border-radius: 6px; font-size: 13px; }
.woocommerce-thankyou-order-received { font-size: 18px; color: #1f8a4c; font-weight: 700; }

/* My account */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.woocommerce-MyAccount-navigation li a { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); color: #444; }
.woocommerce-MyAccount-navigation li.is-active a { background: var(--brand-cream); color: var(--brand-maroon); font-weight: 700; }
.woocommerce-MyAccount-content { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.woocommerce-account:not(.logged-in) .woocommerce { grid-template-columns: 1fr; max-width: 520px; }
.woocommerce-form-login, .woocommerce-form-register { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.u-columns.col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

@media (max-width: 860px) {
  .woocommerce-checkout form.checkout, .woocommerce-account .woocommerce, .u-columns.col2-set { grid-template-columns: 1fr; }
  .woocommerce-checkout #order_review { position: static; }
  .cart-collaterals .cart_totals { max-width: none; }
  .woocommerce table.shop_table_responsive thead { display: none; }
  .woocommerce table.shop_table_responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .woocommerce table.shop_table_responsive td { display: flex; justify-content: space-between; border: 0; padding: 6px 12px; }
  .woocommerce table.shop_table_responsive td::before { content: attr(data-title); font-weight: 700; color: #777; }
  .woocommerce table.shop_table_responsive td.product-thumbnail::before, .woocommerce table.shop_table_responsive td.product-remove::before, .woocommerce table.shop_table_responsive td.actions::before { content: none; }
  .woocommerce .actions .coupon { float: none; display: flex; margin-bottom: 10px; }
}
