/* ================================================================
   MTAJRI THEME — MAIN STYLESHEET
   RTL-first · WooCommerce · Theme Editor compatible
   All color/font/spacing values here are defaults only.
   The Mtajri Theme Editor overrides them at wp_head priority 99.
   ================================================================ */

/* ── 1. Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  direction: rtl;
  font-family: 'IBM Plex Sans Arabic', 'Tahoma', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: #fff;
  color: #1a1a2e;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: #f97316; transition: color .2s, opacity .2s; }
a:hover { opacity: .85; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'IBM Plex Sans Arabic', 'Tahoma', sans-serif;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.3;
}
h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
p { margin-bottom: 1em; }
ul, ol { padding-right: 1.5em; }

/* ── 2. Layout ── */
.container, .row-inner {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  width: 100%;
}

.section, .ux-builder-section, .mtajri-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

/* ── 3. Header ── */
#header, #top {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  transition: background .2s, box-shadow .2s;
}
#header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.1); }

.header-wrapper { width: 100%; }
.header-main { width: 100%; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 20px;
}

/* Logo */
.header-logo { flex-shrink: 0; display: flex; align-items: center; }
.header-logo img,
.custom-logo { height: 44px; width: auto; display: block; }
.header-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -.5px;
}
.header-logo-text:hover { color: #f97316; opacity: 1; }

/* ── 4. Navigation ── */
.header-nav { flex: 1; }

.main-nav, .nav {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.main-nav > li, .nav > li {
  position: relative;
}

.main-nav > li > a, .nav > li > a {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a2e;
  border-radius: 6px;
  transition: color .2s, background .2s;
  white-space: nowrap;
  gap: 4px;
}

.main-nav > li > a:hover, .nav > li > a:hover,
.main-nav > li.current-menu-item > a, .nav > li.current-menu-item > a,
.main-nav > li.active > a, .nav > li.active > a {
  color: #f97316;
  background: #fff7ed;
  opacity: 1;
}

/* Dropdown */
.main-nav .sub-menu, .nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  list-style: none;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all .2s;
  z-index: 100;
}
.main-nav > li:hover > .sub-menu, .nav > li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.main-nav .sub-menu li a, .nav .sub-menu li a {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  color: #374151;
  border-radius: 6px;
  transition: all .15s;
}
.main-nav .sub-menu li a:hover, .nav .sub-menu li a:hover {
  background: #fff7ed;
  color: #f97316;
  opacity: 1;
}

/* ── 5. Header Actions ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-search-wrap { position: relative; }
.header-search-input {
  padding: 8px 40px 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  font-size: 13px;
  width: 190px;
  transition: all .25s;
  direction: rtl;
  background: #f9fafb;
  color: #1a1a2e;
  font-family: inherit;
}
.header-search-input:focus {
  width: 240px;
  border-color: #f97316;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.header-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  font-size: 15px;
  padding: 0;
  line-height: 1;
}

.header-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: transparent;
  cursor: pointer;
  color: #1a1a2e;
  font-size: 17px;
  transition: all .2s;
  text-decoration: none;
}
.header-icon-btn:hover {
  border-color: #f97316;
  color: #f97316;
  background: #fff7ed;
  opacity: 1;
}
.cart-count-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  background: #f97316;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 4px;
}

/* ── 6. Mobile Menu ── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 10px;
  color: #1a1a2e;
  font-size: 18px;
  line-height: 1;
  transition: all .2s;
}
.mobile-menu-btn:hover { border-color: #f97316; color: #f97316; }
.mobile-menu-btn.open { background: #fff7ed; border-color: #f97316; color: #f97316; }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid #f3f4f6;
  padding: 8px 16px 16px;
  animation: slideDown .2s ease;
}
.mobile-nav.open { display: flex; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

.mobile-nav .menu { list-style: none; padding: 0; margin: 0; }
.mobile-nav .menu li a {
  display: block;
  padding: 12px 8px;
  border-bottom: 1px solid #f3f4f6;
  color: #1a1a2e;
  font-weight: 500;
  font-size: 15px;
}
.mobile-nav .menu li:last-child a { border-bottom: none; }
.mobile-nav .menu li a:hover { color: #f97316; opacity: 1; }
.mobile-nav .menu .sub-menu {
  list-style: none;
  padding-right: 16px;
  display: none;
}
.mobile-nav .menu .sub-menu.open { display: block; }
.mobile-nav .menu .sub-menu a {
  font-size: 13px;
  color: #6b7280;
  padding: 8px;
}

/* ── 7. Main Content ── */
#main, .site-main { min-height: 60vh; }
.mtajri-page-wrap { padding: 48px 0; }

/* Breadcrumb */
.mtajri-breadcrumb {
  background: #f9fafb;
  border-bottom: 1px solid #f3f4f6;
  padding: 12px 0;
  font-size: 13px;
  color: #9ca3af;
}
.mtajri-breadcrumb a { color: #6b7280; }
.mtajri-breadcrumb a:hover { color: #f97316; opacity: 1; }
.breadcrumb-sep { margin: 0 6px; }

/* Page Title Bar */
.mtajri-page-hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff7ed 100%);
  padding: 40px 0;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}
.mtajri-page-hero h1 { font-size: 28px; color: #1a1a2e; }
.mtajri-page-hero p { color: #6b7280; margin-bottom: 0; }

/* ── 8. Buttons ── */
.button, .btn,
.woocommerce a.button, .woocommerce button.button,
.woocommerce input.button, .woocommerce #respond input#submit,
.add_to_cart_button, .checkout-button, .single_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 8px;
  background: #f97316;
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none !important;
  font-family: inherit;
  line-height: 1.4;
}
.button:hover, .btn:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover {
  opacity: .88;
  transform: translateY(-1px);
  color: #fff !important;
}
.button.btn-outline, .btn-outline {
  background: transparent !important;
  border: 2px solid #f97316 !important;
  color: #f97316 !important;
}
.button.btn-white {
  background: #fff !important;
  color: #f97316 !important;
}
.button.btn-large { padding: 16px 36px; font-size: 16px; }

/* ── 9. Footer ── */
#footer, footer { background: #1a1a2e; color: #e5e7eb; margin-top: auto; }
.footer-bg { background: #1a1a2e; }

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 60px 0 40px;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f97316;
  display: inline-block;
}

.footer-brand-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.footer-brand-desc {
  font-size: 14px;
  color: #9ca3af;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: #9ca3af;
  font-size: 14px;
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-links a::before { content: '›'; color: #f97316; font-weight: 700; }
.footer-links a:hover { color: #f97316; opacity: 1; }

.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.footer-social-link {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af;
  font-size: 16px;
  transition: all .2s;
}
.footer-social-link:hover { background: #f97316; border-color: #f97316; color: #fff; opacity: 1; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0;
  font-size: 13px;
  color: #6b7280;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: #9ca3af; }
.footer-bottom a:hover { color: #f97316; opacity: 1; }
footer a, .footer-bg a { color: #9ca3af; }
footer a:hover, .footer-bg a:hover { color: #f97316; opacity: 1; }

/* ── 10. WooCommerce — Product Grid ── */

/* Kill WooCommerce default float/flex layout completely */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 40px !important;
  float: none !important;
  clear: both;
}

/* Override WC column-count classes */
.woocommerce ul.products.columns-2 { grid-template-columns: repeat(2, 1fr) !important; }
.woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, 1fr) !important; }
.woocommerce ul.products.columns-4 { grid-template-columns: repeat(4, 1fr) !important; }
.woocommerce ul.products.columns-5 { grid-template-columns: repeat(5, 1fr) !important; }
.woocommerce ul.products.columns-6 { grid-template-columns: repeat(6, 1fr) !important; }

/* Product card — base */
.woocommerce ul.products li.product,
.product-small,
.product-small .box {
  background: #fff;
  border-radius: 12px;
  overflow: visible !important;   /* ← was 'hidden', caused clipping */
  border: 1px solid #e5e7eb;
  transition: all .3s ease;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

/* Product link — wraps BOTH image AND title in WooCommerce.
   NEVER put overflow:hidden here — it clips the product title. */
.woocommerce ul.products li.product .woocommerce-LoopProduct-link,
.woocommerce ul.products li.product > a:first-child {
  display: block;
  overflow: visible !important;
  border-radius: 0;
  flex-shrink: 0;
  width: 100%;
}

/* Clip and round ONLY the image thumbnail, not the title */
.woocommerce ul.products li.product .woocommerce-LoopProduct-link img,
.woocommerce ul.products li.product > a:first-child img {
  border-radius: 12px 12px 0 0;
  display: block;
  overflow: hidden;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}

.woocommerce ul.products li.product a img {
  aspect-ratio: 1/1;
  object-fit: cover;
  width: 100% !important;
  height: auto !important;
  display: block;
  transition: transform .35s;
}
.woocommerce ul.products li.product:hover a img { transform: scale(1.04); }

/* Product title */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 12px 16px 4px !important;
  margin: 0 !important;
  color: #1a1a2e !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  width: 100%;
  box-sizing: border-box;
}

/* Price */
.woocommerce ul.products li.product .price {
  display: block !important;
  padding: 4px 16px 10px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #f97316 !important;
  width: 100%;
  box-sizing: border-box;
}

/* Add to cart button */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button {
  display: block !important;
  width: calc(100% - 32px) !important;
  margin: 4px 16px 16px !important;
  font-size: 13px !important;
  padding: 10px 16px !important;
  text-align: center !important;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Sale Badge */
.woocommerce span.onsale {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  z-index: 2;
}

/* Prices */
.woocommerce .price,
.woocommerce-Price-amount,
.price .amount { color: #f97316; font-weight: 700; }
del .woocommerce-Price-amount { color: #9ca3af !important; font-size: .85em; font-weight: 400; }

/* ── WooCommerce page wrapper ── */
.woocommerce-page #main,
.woocommerce #main {
  width: 100%;
}

/* Shop/archive page: result count + ordering bar */
.woocommerce-products-header { margin-bottom: 20px; }

.woocommerce .woocommerce-result-count,
.woocommerce-page .woocommerce-result-count {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 0;
  float: none !important;
  display: inline-block;
}
.woocommerce .woocommerce-ordering,
.woocommerce-page .woocommerce-ordering {
  float: none !important;
  display: inline-block;
  margin-bottom: 0;
}
/* Flexbox toolbar above grid */
.woocommerce-products-header + .woocommerce-notices-wrapper + form,
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
  margin-bottom: 16px;
}

/* Ordering bar row */
.woocommerce-loop-before {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.woocommerce-ordering select {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  direction: rtl;
  background: #fff;
  color: #1a1a2e;
  font-family: inherit;
}

/* ── 11. WooCommerce — Single Product ── */
.woocommerce div.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 60px;
}
.woocommerce div.product .woocommerce-product-gallery {
  border-radius: 12px;
  overflow: hidden;
}
.woocommerce div.product p.price {
  font-size: 28px;
  color: #f97316;
  font-weight: 800;
  margin-bottom: 16px;
}
.woocommerce div.product .woocommerce-product-details__short-description {
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 14px;
}
.woocommerce div.product form.cart {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.woocommerce div.product form.cart .quantity { margin: 0; }
.woocommerce div.product form.cart .quantity input.qty {
  width: 68px;
  text-align: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 8px;
  font-size: 16px;
  font-family: inherit;
}
.single_add_to_cart_button { flex: 1; min-width: 160px; }

/* Product Meta */
.woocommerce div.product .product_meta {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 16px;
}
.woocommerce div.product .product_meta a { color: #6b7280; }
.woocommerce div.product .product_meta a:hover { color: #f97316; opacity: 1; }

/* Tabs */
.woocommerce .woocommerce-tabs .wc-tabs {
  border-bottom: 2px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.woocommerce .woocommerce-tabs .wc-tabs li { margin: 0; }
.woocommerce .woocommerce-tabs .wc-tabs li a {
  display: block;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  color: #6b7280;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
}
.woocommerce .woocommerce-tabs .wc-tabs li.active a {
  color: #f97316;
  border-bottom-color: #f97316;
}
.woocommerce .woocommerce-tabs .wc-tabs li a:hover { color: #f97316; opacity: 1; }
.woocommerce .woocommerce-tabs .panel { padding: 20px 0; }

/* Related Products */
.related.products { margin-top: 60px; }
.related.products > h2 {
  font-size: 20px;
  margin-bottom: 24px;
  color: #1a1a2e;
}

/* ── 12. WooCommerce — Cart ── */
.woocommerce-cart-form { overflow-x: auto; }
.woocommerce-cart-form table.cart { width: 100%; border-collapse: collapse; }
.woocommerce-cart-form table.cart thead tr { border-bottom: 2px solid #e5e7eb; }
.woocommerce-cart-form table.cart th {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  text-align: right;
}
.woocommerce-cart-form table.cart td {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  text-align: right;
}
.woocommerce-cart-form table.cart .product-thumbnail img {
  width: 70px;
  border-radius: 8px;
}
.woocommerce-cart-form table.cart .product-name a { font-weight: 600; color: #1a1a2e; }
.woocommerce-cart-form table.cart .product-name a:hover { color: #f97316; opacity: 1; }
.cart-collaterals { margin-top: 32px; }
.cart_totals h2 { font-size: 18px; margin-bottom: 16px; }
.cart_totals table { width: 100%; border-collapse: collapse; max-width: 420px; }
.cart_totals table th,
.cart_totals table td { padding: 12px 16px; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.cart_totals .order-total td { font-weight: 700; font-size: 18px; color: #f97316; }

/* ── 13. WooCommerce — Checkout ── */
.woocommerce-checkout #customer_details { margin-bottom: 32px; }
.woocommerce-checkout h3 { font-size: 18px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #f3f4f6; }
.woocommerce-checkout .form-row { margin-bottom: 14px; }
.woocommerce-checkout .form-row label { font-size: 13px; font-weight: 600; color: #374151; display: block; margin-bottom: 6px; }
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  font-family: inherit;
  direction: rtl;
  transition: border-color .2s;
}
.woocommerce-checkout .form-row input:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus {
  border-color: #f97316;
  outline: none;
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
#order_review_heading { font-size: 18px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #f3f4f6; }
.woocommerce-checkout-review-order-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td { padding: 12px 8px; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.woocommerce-checkout-review-order-table .order-total td { font-weight: 700; font-size: 18px; color: #f97316; }
#payment { background: #f9fafb; border-radius: 12px; padding: 20px; }
#payment .wc_payment_methods { list-style: none; padding: 0; margin-bottom: 16px; }
#payment .wc_payment_methods li { padding: 10px 0; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
#payment .wc_payment_methods li:last-child { border-bottom: none; }
#payment .payment_box { background: #fff; border-radius: 8px; padding: 12px; margin-top: 8px; font-size: 13px; color: #6b7280; }
#place_order { width: 100%; font-size: 16px; padding: 16px; margin-top: 16px; }

/* ── 14. Forms (WooCommerce & general) ── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
textarea,
select {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #1a1a2e;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  direction: rtl;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
  outline: none;
}

/* ── 15. Notices ── */
.woocommerce-message, .woocommerce-info {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  font-size: 14px;
  border: none;
}
.woocommerce-message { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.woocommerce-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.woocommerce-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  list-style: none;
  font-size: 14px;
}

/* ── 16. Blog ── */
.mtajri-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: all .25s;
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.1); }
.post-card-thumb { aspect-ratio: 16/9; overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.post-card-meta { font-size: 12px; color: #9ca3af; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; }
.post-card-meta a { color: #9ca3af; }
.post-card-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.post-card-title a { color: #1a1a2e; }
.post-card-title a:hover { color: #f97316; opacity: 1; }
.post-card-excerpt { font-size: 14px; color: #6b7280; line-height: 1.6; flex: 1; }
.post-card-footer { margin-top: 16px; }
.post-card-footer .button { font-size: 13px; padding: 8px 18px; }

/* Single Post */
.single-post-header { margin-bottom: 32px; }
.single-post-header h1 { font-size: 32px; line-height: 1.3; margin-bottom: 16px; }
.single-post-meta { font-size: 13px; color: #9ca3af; display: flex; gap: 16px; flex-wrap: wrap; }
.single-post-meta a { color: #9ca3af; }
.single-post-thumb { border-radius: 12px; overflow: hidden; margin-bottom: 32px; }
.single-post-thumb img { width: 100%; height: auto; }
.single-post-content { font-size: 16px; line-height: 1.85; color: #374151; }
.single-post-content h2 { font-size: 22px; margin: 32px 0 16px; }
.single-post-content h3 { font-size: 18px; margin: 24px 0 12px; }
.single-post-content p { margin-bottom: 18px; }
.single-post-content ul, .single-post-content ol { margin-bottom: 18px; padding-right: 24px; }
.single-post-content li { margin-bottom: 8px; }
.single-post-content blockquote {
  border-right: 4px solid #f97316;
  padding: 16px 20px;
  background: #fff7ed;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  color: #92400e;
  font-style: italic;
}
.single-post-content img { border-radius: 8px; margin: 20px auto; }

/* Post Navigation */
.post-navigation { display: flex; gap: 20px; margin-top: 40px; padding-top: 32px; border-top: 2px solid #f3f4f6; }
.post-navigation > * { flex: 1; background: #f9fafb; border-radius: 10px; padding: 16px; border: 1px solid #e5e7eb; }
.post-navigation .nav-subtitle { font-size: 11px; color: #9ca3af; text-transform: uppercase; margin-bottom: 6px; }
.post-navigation .nav-title { font-size: 15px; font-weight: 600; color: #1a1a2e; }

/* Pagination */
.pagination-wrap { display: flex; justify-content: center; margin-top: 48px; }
.page-numbers { display: flex; gap: 4px; list-style: none; }
.page-numbers li a,
.page-numbers li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  color: #374151;
  transition: all .2s;
}
.page-numbers li a:hover { background: #fff7ed; border-color: #f97316; color: #f97316; opacity: 1; }
.page-numbers li span.current { background: #f97316; color: #fff; border-color: #f97316; }

/* ── 17. Sidebar ── */
.mtajri-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}
.widget { margin-bottom: 32px; }
.widget-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f3f4f6;
  position: relative;
}
.widget-title::before {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 40px;
  height: 2px;
  background: #f97316;
}
.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid #f9fafb; font-size: 14px; }
.widget ul li a { color: #374151; }
.widget ul li a:hover { color: #f97316; opacity: 1; }

/* ── 18. Shortcode Sections (Theme Editor compatibility) ── */

/* [section] */
.mtajri-sc-section {
  /* padding handled by .section class */
}

/* [row] */
.mtajri-row-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.mtajri-row-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: stretch;
}

/* [col] */
.mtajri-col { min-width: 0; }
.mtajri-col-middle { display: flex; flex-direction: column; justify-content: center; }

/* [ux_banner] */
.mtajri-banner {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.mtajri-banner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mtajri-banner-body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
}
.mtajri-banner-body.align-center { align-items: center; text-align: center; }
.mtajri-banner-body.align-left   { align-items: flex-end; text-align: right; }
.mtajri-banner-body.align-right  { align-items: flex-start; text-align: left; }

/* [text_box] */
.mtajri-text-box { display: inline-block; }
.mtajri-text-box.text-light,
.mtajri-text-box.text-light h1,
.mtajri-text-box.text-light h2,
.mtajri-text-box.text-light h3,
.mtajri-text-box.text-light p { color: #fff !important; }
.mtajri-text-box.text-dark,
.mtajri-text-box.text-dark h1,
.mtajri-text-box.text-dark h2,
.mtajri-text-box.text-dark p { color: #1a1a2e !important; }

/* [ux_text] */
.mtajri-ux-text { margin-bottom: .6em; line-height: 1.3; }

/* [title] */
.mtajri-section-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 36px;
  line-height: 1.3;
}
.mtajri-section-title.style-bold-center { text-align: center; }
.mtajri-section-title.style-bold-center::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: #f97316;
  margin: 14px auto 0;
  border-radius: 2px;
}

/* [ux_image] */
.mtajri-ux-image img { border-radius: 8px; max-width: 100%; }

/* [ux_banner_grid] */
.mtajri-banner-grid {
  display: grid;
  width: 100%;
}
.mtajri-banner-grid-cell {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  border-radius: 8px;
}
.mtajri-banner-grid-cell-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mtajri-banner-grid-cell-body {
  position: relative;
  z-index: 2;
  padding: 20px;
  width: 100%;
}
.mtajri-grid-cell-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
}

/* [divider] */
.mtajri-divider { border: none; }
.mtajri-divider-line { border-top: 1px solid #e5e7eb; }
.mtajri-divider-fade {
  height: 1px;
  background: linear-gradient(to right, transparent, #e5e7eb, transparent);
  border: none;
}
.mtajri-divider-dots {
  text-align: center;
  color: #d1d5db;
  font-size: 24px;
  letter-spacing: 10px;
  line-height: 1;
}

/* CTA Strip */
.mtajri-cta-strip {
  text-align: center;
  padding: 48px 20px;
}
.mtajri-cta-strip h2 { font-size: 30px; margin-bottom: 12px; }
.mtajri-cta-strip p { font-size: 16px; margin-bottom: 24px; opacity: .85; }

/* ── 19. Utility ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.mt-auto { margin-top: auto; }

/* WC My Account */
.woocommerce-account .woocommerce {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}
.woocommerce-account .woocommerce-MyAccount-navigation {
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
  transition: all .15s;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
  background: #fff7ed;
  color: #f97316;
  opacity: 1;
}

/* 404 Page */
.mtajri-404 {
  text-align: center;
  padding: 80px 20px;
}
.mtajri-404-code {
  font-size: 100px;
  font-weight: 900;
  color: #f97316;
  line-height: 1;
  margin-bottom: 16px;
  opacity: .2;
}
.mtajri-404 h1 { font-size: 28px; margin-bottom: 12px; }
.mtajri-404 p { color: #6b7280; margin-bottom: 28px; }

/* Hide page title hero on cart, checkout, account pages */
.wc-no-hero .mtajri-page-hero { display: none !important; }

/* ── 20. Responsive ── */
/* Hide page title hero on cart, checkout, account pages */
.wc-no-hero .mtajri-page-hero { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   1024px  — Tablet landscape
    768px  — Tablet portrait / large phone
    600px  — Medium phone
    480px  — Small phone
    380px  — Very small phone
═══════════════════════════════════════════════════════════ */

/* ── 1024px: Tablet landscape ─────────────────────────── */
@media (max-width: 1024px) {

  /* Footer: 2-col */
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 48px 0 32px;
  }

  /* Products: 3-col */
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
  }

  /* Single product: tighter gap */
  .woocommerce div.product { gap: 32px; }

  /* Sidebar: narrower */
  .mtajri-with-sidebar { grid-template-columns: 1fr 240px; gap: 28px; }
}

/* ── 768px: Tablet portrait / large phone ─────────────── */
@media (max-width: 768px) {

  /* ── Typography ── */
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  h3 { font-size: 19px; }
  h4 { font-size: 16px; }

  /* ── Spacing ── */
  .section, .ux-builder-section, .mtajri-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .mtajri-page-wrap { padding: 32px 0; }

  /* ── Header ── */
  .header-inner { min-height: 60px; gap: 12px; }
  .header-nav,
  .header-search-wrap { display: none; }
  .mobile-menu-btn { display: flex; }

  /* Shrink header icons */
  .header-icon-btn { width: 36px; height: 36px; font-size: 15px; }

  /* ── Page hero ── */
  .mtajri-page-hero { padding: 28px 0; }
  .mtajri-page-hero h1 { font-size: 22px; }

  /* ── Footer ── */
  .footer-main { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 24px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; gap: 8px; }
  .footer-brand-name { font-size: 18px; }

  /* ── Products grid: 2-col ── */
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* ── Single product: stack ── */
  .woocommerce div.product {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
  }
  .woocommerce div.product .woocommerce-product-gallery {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
  .woocommerce div.product p.price { font-size: 22px; }
  .woocommerce div.product form.cart { gap: 10px; }
  .woocommerce div.product .woocommerce-tabs .wc-tabs li a {
    padding: 10px 14px;
    font-size: 13px;
  }
  .related.products { margin-top: 40px; }

  /* ── Cart: keep table but make scrollable + shrink ── */
  .woocommerce-cart-form { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .woocommerce-cart-form table.cart th,
  .woocommerce-cart-form table.cart td { padding: 12px 10px; font-size: 13px; }
  .woocommerce-cart-form table.cart .product-thumbnail img { width: 52px; }
  .cart_totals { max-width: 100%; }
  .cart_totals table { max-width: 100%; }

  /* ── Account: stack nav + content ── */
  .woocommerce-account .woocommerce { display: flex; flex-direction: column; gap: 24px; }
  .woocommerce-account .woocommerce-MyAccount-navigation {
    width: 100%;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    background: #f9fafb;
    white-space: nowrap;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
  }
  .woocommerce-orders-table { overflow-x: auto; display: block; }

  /* ── Blog grid: 2-col ── */
  .mtajri-blog-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

  /* ── Sidebar: stack ── */
  .mtajri-with-sidebar { grid-template-columns: 1fr; }
  #secondary { order: -1; } /* show sidebar above content on mobile */

  /* ── Shortcode/banner sections ── */
  .mtajri-row-grid { grid-template-columns: 1fr !important; }
  .mtajri-banner-grid { grid-template-columns: 1fr 1fr !important; }
  .mtajri-banner { min-height: 200px !important; }
  .mtajri-banner-body { padding: 28px 16px; }

  /* Banner text: smaller on tablet */
  .mtajri-banner h1 { font-size: 26px !important; }
  .mtajri-banner h2 { font-size: 22px !important; }
  .mtajri-banner p  { font-size: 14px !important; }

  /* ── Order received ── */
  .woocommerce-order-overview { gap: 12px; }
  .woocommerce-order-overview li { padding: 12px 16px; }

  /* ── Post navigation ── */
  .post-navigation { flex-direction: column; gap: 12px; }

  /* ── Single post ── */
  .single-post-header h1 { font-size: 24px; }
  .single-post-content { font-size: 15px; }
}

/* ── 600px: Medium phones ─────────────────────────────── */
@media (max-width: 600px) {

  /* ── Header: tighter ── */
  .header-inner { min-height: 56px; gap: 8px; }
  .header-logo img, .custom-logo { height: 36px; }
  .header-logo-text { font-size: 18px; }

  /* ── Single product button: full width ── */
  .woocommerce div.product form.cart {
    flex-direction: column;
    align-items: stretch;
  }
  .woocommerce div.product form.cart .quantity { width: 100%; }
  .woocommerce div.product form.cart .quantity input.qty { width: 100%; }
  .single_add_to_cart_button { width: 100%; min-width: unset; }

  /* ── Cart: handled in cart CSS block ── */

  /* ── Cart collaterals ── */
  .cart-collaterals .cart_totals { float: none; width: 100%; }

  /* ── Blog: 1-col ── */
  .mtajri-blog-grid { grid-template-columns: 1fr; gap: 16px; }

  /* ── Banner grid: stack ── */
  .mtajri-banner-grid { grid-template-columns: 1fr !important; }

  /* ── Page hero ── */
  .mtajri-page-hero h1 { font-size: 20px; }

  /* ── Products: keep 2-col but tighten ── */
  .woocommerce ul.products,
  .woocommerce-page ul.products { gap: 10px !important; }
  .woocommerce ul.products li.product .woocommerce-loop-product__title,
  .woocommerce ul.products li.product h2 { font-size: 13px !important; padding: 8px 10px 2px !important; }
  .woocommerce ul.products li.product .price { font-size: 14px !important; padding: 2px 10px 6px !important; }
  .woocommerce ul.products li.product .button { font-size: 12px !important; padding: 8px 10px !important; margin: 2px 10px 10px !important; width: calc(100% - 20px) !important; }

  /* ── Account orders table ── */
  .woocommerce-orders-table thead { display: none; }
  .woocommerce-orders-table,
  .woocommerce-orders-table tbody,
  .woocommerce-orders-table tr { display: block; width: 100%; }
  .woocommerce-orders-table tr {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
  }
  .woocommerce-orders-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
  }
  .woocommerce-orders-table td:last-child { border-bottom: none; }
  .woocommerce-orders-table td::before {
    content: attr(data-title);
    font-weight: 700;
    color: #374151;
    font-size: 12px;
  }

  /* ── Section padding ── */
  .section, .ux-builder-section, .mtajri-section {
    padding-top: 32px;
    padding-bottom: 32px;
  }
}

/* ── 480px: Small phones ──────────────────────────────── */
@media (max-width: 480px) {

  /* ── Container ── */
  .container, .row-inner { padding-left: 14px; padding-right: 14px; }

  /* ── Typography ── */
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 16px; }
  body { font-size: 14px; }

  /* ── Header ── */
  .header-inner { gap: 6px; }
  /* On very small screens hide the language switcher if present */
  .lang-switcher { display: none; }

  /* ── Products: 2-col, minimal ── */
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* ── Buttons ── */
  .button.btn-large { padding: 13px 24px; font-size: 15px; }

  /* ── Banner sections ── */
  .mtajri-banner { min-height: 160px !important; }
  .mtajri-banner h1 { font-size: 20px !important; }
  .mtajri-banner h2 { font-size: 18px !important; }
  .mtajri-banner-body { padding: 20px 14px; }

  /* ── Section padding ── */
  .section, .ux-builder-section, .mtajri-section {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  /* ── Footer ── */
  .footer-main { padding: 32px 0 20px; }

  /* ── Page hero ── */
  .mtajri-page-hero { padding: 20px 0; }
  .mtajri-page-hero h1 { font-size: 18px; }

  /* ── Single post ── */
  .single-post-header h1 { font-size: 20px; }
  .single-post-meta { flex-direction: column; gap: 4px; }

  /* ── Pagination ── */
  .page-numbers li a,
  .page-numbers li span { width: 34px; height: 34px; font-size: 13px; }

  /* ── WC notices ── */
  .woocommerce-message,
  .woocommerce-info,
  .woocommerce-error { font-size: 13px; padding: 12px 14px; }

  /* ── Post navigation ── */
  .post-navigation > * { padding: 12px; }
  .post-navigation .nav-title { font-size: 13px; }
}

/* ── 380px: Very small phones ─────────────────────────── */
@media (max-width: 380px) {

  .header-logo-text { font-size: 16px; }
  .header-logo img, .custom-logo { height: 30px; }

  /* Products: still 2-col, just tighter */
  .woocommerce ul.products,
  .woocommerce-page ul.products { gap: 6px !important; }

  h1 { font-size: 20px; }
  h2 { font-size: 17px; }
}

/* ── Print ─────────────────────────────────────────────── */
@media print {
  #header, #footer, .mobile-menu-btn, .header-icon-btn { display: none; }
  body { font-size: 12pt; color: #000; }
}

  padding: 16px 20px;
  flex-shrink: 0;
  background: #fafafa;
}
.cart-drawer-subtotal-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; margin-bottom: 4px;
}
.cart-drawer-subtotal-val { font-weight: 700; font-size: 18px; color: var(--mtajri-primary, #f97316); }
.cart-drawer-shipping-note { font-size: 11px; color: #9ca3af; margin-bottom: 14px; }

.cart-drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cart-drawer-btn-outline, .cart-drawer-btn-primary {
  display: flex; align-items: center; justify-content: center;
  padding: 11px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  text-decoration: none; transition: all .2s; cursor: pointer;
}
.cart-drawer-btn-outline {
  border: 1.5px solid #e5e7eb; color: #374151; background: #fff;
}
.cart-drawer-btn-outline:hover { border-color: var(--mtajri-primary, #f97316); color: var(--mtajri-primary, #f97316); opacity: 1; }
.cart-drawer-btn-primary {
  background: var(--mtajri-primary, #f97316); color: #fff; border: none;
}
.cart-drawer-btn-primary:hover { opacity: .88; color: #fff; }

/* ================================================================
   PROFESSIONAL CART PAGE
================================================================ */
.mtajri-cart-page { padding: 40px 0 60px; }

/* ── Two-column grid: items + summary ── */
.cart-page-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}
.cart-items-col  { min-width: 0; }
.cart-summary-col { min-width: 0; }

/* ── Title ── */
.cart-page-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 700; color: #1a1a2e;
  margin-bottom: 24px;
}
.cart-page-count {
  font-size: 13px; font-weight: 400; color: #6b7280;
  background: #f3f4f6; padding: 3px 10px; border-radius: 20px;
}

/* ── Items list card ── */
.cart-items-list {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 16px;
}

/* ── Header row (desktop only) ── */
.cart-items-header {
  display: grid;
  grid-template-columns: 3fr 1fr 1.2fr 1fr 44px;
  gap: 0;
  padding: 11px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 11px; font-weight: 700; color: #9ca3af;
  text-transform: uppercase; letter-spacing: .06em;
}
.cart-items-header span { padding: 0 6px; }
.cart-items-header span:first-child { padding-right: 0; }

/* ── Each item row ── */
.cart-item-row {
  display: grid;
  grid-template-columns: 3fr 1fr 1.2fr 1fr 44px;
  gap: 0;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  align-items: center;
  transition: background .15s;
}
.cart-item-row:last-child { border-bottom: none; }
.cart-item-row:hover { background: #fafafa; }

/* Each cell — horizontal padding */
.cart-item-row > * { padding: 0 6px; }
.cart-item-row > *:first-child { padding-right: 0; }
.cart-item-row > *:last-child  { padding-left: 0; }

/* ── Product cell ── */
.cart-item-product {
  display: flex; gap: 14px; align-items: center;
}
.cart-item-thumb {
  width: 68px; height: 68px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
  border: 1px solid #f3f4f6; background: #f9fafb;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item-thumb a   { display: block; width: 100%; height: 100%; }

.cart-item-details   { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 14px; font-weight: 600; color: #1a1a2e;
  text-decoration: none; display: block;
  margin-bottom: 3px; line-height: 1.4;
}
.cart-item-name:hover { color: #f97316; opacity: 1; }

/* Mobile price (hidden on desktop) */
.cart-item-price-mobile { display: none; }

/* Price / qty / subtotal cells */
.cart-item-price    { font-size: 14px; color: #374151; }
.cart-item-subtotal { font-size: 15px; font-weight: 700; color: #f97316; }

.cart-item-qty .quantity        { display: block; }
.cart-item-qty .quantity input  {
  width: 60px; text-align: center;
  padding: 7px 4px; border: 1px solid #e5e7eb;
  border-radius: 8px; font-size: 14px;
  font-family: inherit; direction: ltr;
  background: #fff;
}

/* Remove button */
.cart-item-remove-wrap { display: flex; justify-content: center; }
.cart-item-remove {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  color: #d1d5db; transition: all .15s; text-decoration: none;
}
.cart-item-remove:hover { background: #fef2f2; color: #ef4444; opacity: 1; }

/* ── Actions bar ── */
.cart-actions-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.cart-coupon-form {
  display: flex; align-items: center;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 10px; padding: 0 4px 0 12px;
  gap: 8px; overflow: hidden; transition: border-color .2s;
}
.cart-coupon-form:focus-within { border-color: #f97316; }
.cart-coupon-form svg   { color: #9ca3af; flex-shrink: 0; }
.cart-coupon-form input {
  border: none !important; background: transparent !important;
  padding: 10px 4px !important; font-size: 13px !important;
  outline: none !important; box-shadow: none !important;
  width: 160px; direction: rtl;
}
.cart-coupon-btn {
  background: #f97316; color: #fff; border: none;
  border-radius: 8px; padding: 8px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.cart-update-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid #e5e7eb;
  border-radius: 10px; padding: 10px 18px;
  font-size: 13px; font-weight: 500; color: #374151;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.cart-update-btn:hover { border-color: #f97316; color: #f97316; }

/* Continue shopping */
.cart-continue-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: #6b7280; text-decoration: none;
  transition: color .15s;
}
.cart-continue-link:hover { color: #f97316; opacity: 1; }

/* ── Summary column (WC cart_totals) ── */
.cart-summary-col .cart_totals {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 14px; overflow: hidden;
  position: sticky; top: 90px;
}
.cart-summary-col .cart_totals h2 {
  font-size: 16px; font-weight: 700;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #f3f4f6; margin: 0;
}
.cart-summary-col .cart_totals table {
  width: 100%; border-collapse: collapse;
}
.cart-summary-col .cart_totals table th,
.cart-summary-col .cart_totals table td {
  padding: 12px 20px; font-size: 14px;
  border-bottom: 1px solid #f9fafb; text-align: right;
}
.cart-summary-col .cart_totals .order-total th,
.cart-summary-col .cart_totals .order-total td {
  font-size: 17px; font-weight: 700; border-bottom: none;
  color: #f97316;
}
.cart-summary-col .wc-proceed-to-checkout { padding: 16px 20px 20px; }
.cart-summary-col .wc-proceed-to-checkout .checkout-button {
  display: flex !important; width: 100% !important;
  justify-content: center !important; text-align: center !important;
  font-size: 15px !important; padding: 14px !important;
  border-radius: 10px !important;
}

/* ── Empty cart ── */
.cart-empty-state {
  text-align: center; padding: 80px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.cart-empty-state h2 { font-size: 24px; margin: 0; }
.cart-empty-state p  { color: #6b7280; margin: 0; }

/* ── Cart responsive ── */

/* 900px: stack grid, keep row layout */
@media (max-width: 900px) {
  .cart-page-grid { grid-template-columns: 1fr; gap: 24px; }
  .cart-summary-col .cart_totals { position: static; }
  /* Move summary above continue-shopping link */
  .cart-summary-col { order: 2; }
  .cart-items-col   { order: 1; }
}

/* 640px: card layout per row */
@media (max-width: 640px) {
  .cart-page-title { font-size: 18px; }
  .cart-items-header { display: none; }

  .cart-item-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 14px 16px;
    position: relative;
    align-items: flex-start;
  }
  .cart-item-row > * { padding: 0; }

  /* Image + details fill the top row */
  .cart-item-product {
    flex: 1 1 100%;
    padding-left: 40px; /* leave room for × button */
  }
  .cart-item-thumb { width: 60px; height: 60px; }

  /* Hide desktop price col, show mobile price inside details */
  .cart-item-price { display: none; }
  .cart-item-price-mobile {
    display: block;
    font-size: 13px; color: #6b7280; margin-top: 3px;
  }

  /* Qty + subtotal sit side-by-side below */
  .cart-item-qty {
    margin-top: 10px;
    display: flex; align-items: center; gap: 8px;
  }
  .cart-item-qty::before {
    content: 'الكمية:';
    font-size: 12px; color: #9ca3af;
  }
  .cart-item-subtotal {
    margin-top: 10px; margin-right: auto;
    font-size: 15px;
  }
  .cart-item-subtotal::before {
    content: 'الإجمالي: ';
    font-size: 12px; color: #9ca3af; font-weight: 400;
  }

  /* × button — absolute top left */
  .cart-item-remove-wrap {
    position: absolute;
    top: 14px; left: 16px;
  }

  /* Actions bar: stack */
  .cart-actions-bar { flex-direction: column; align-items: stretch; }
  .cart-coupon-form { width: 100%; }
  .cart-coupon-form input { flex: 1; width: auto; }
  .cart-update-btn { width: 100%; justify-content: center; }
}

/* ================================================================
   PROFESSIONAL CHECKOUT PAGE
================================================================ */
.mtajri-checkout-page { padding: 32px 0 60px; }

/* Steps */
.checkout-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 36px; flex-wrap: wrap;
}
.checkout-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: #9ca3af;
}
.checkout-step.active { color: var(--mtajri-primary, #f97316); }
.checkout-step.done { color: #10b981; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.checkout-step.active .step-num { background: var(--mtajri-primary, #f97316); color: #fff; border-color: var(--mtajri-primary, #f97316); }
.checkout-step.done .step-num { background: #10b981; color: #fff; border-color: #10b981; }
.checkout-step-sep {
  width: 60px; height: 1px; background: #e5e7eb; margin: 0 8px; flex-shrink: 0;
}

/* Grid */
.checkout-page-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  align-items: start;
}

/* Cards */
.checkout-section-card, .checkout-order-card {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}
.checkout-order-card { margin-bottom: 0; position: sticky; top: 90px; }

.checkout-section-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #f9fafb;
  background: #fafafa;
}
.checkout-section-head h3 {
  font-size: 15px; font-weight: 700; color: #1a1a2e; margin: 0;
}
.checkout-section-head svg { color: var(--mtajri-primary, #f97316); flex-shrink: 0; }

/* Logged in notice */
.checkout-logged-notice {
  display: flex; align-items: center; gap: 8px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 10px; padding: 12px 16px; margin-bottom: 20px;
  font-size: 13px; color: #166534;
}
.checkout-logged-notice a { color: #059669; margin-right: auto; font-size: 12px; }
.checkout-logged-notice svg { color: #10b981; flex-shrink: 0; }

/* Fields inside cards */
.checkout-section-card .woocommerce-billing-fields,
.checkout-section-card .woocommerce-shipping-fields,
.checkout-fields-grid,
.checkout-section-card #shipping,
.checkout-section-card .woocommerce-additional-fields { padding: 16px 20px; }

.checkout-section-card .form-row { margin-bottom: 14px; }
.checkout-section-card .form-row label { font-size: 12px; font-weight: 600; color: #374151; display: block; margin-bottom: 5px; }
.checkout-section-card .form-row input.input-text,
.checkout-section-card .form-row select,
.checkout-section-card .form-row textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid #e5e7eb; border-radius: 9px;
  font-size: 14px; color: #1a1a2e;
  font-family: inherit; direction: rtl;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.checkout-section-card .form-row input:focus,
.checkout-section-card .form-row select:focus,
.checkout-section-card .form-row textarea:focus {
  border-color: var(--mtajri-primary, #f97316) !important;
  box-shadow: 0 0 0 3px rgba(249,115,22,.1) !important;
  outline: none !important;
}
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px;
}
.woocommerce-billing-fields__field-wrapper .form-row-wide,
.woocommerce-shipping-fields__field-wrapper .form-row-wide { grid-column: 1 / -1; }

/* Order items in summary */
.checkout-order-items { padding: 14px 20px; display: flex; flex-direction: column; gap: 12px; }
.checkout-order-item {
  display: flex; align-items: center; gap: 10px;
}
.checkout-order-item-img {
  position: relative; width: 52px; height: 52px;
  border-radius: 8px; overflow: hidden; border: 1px solid #f3f4f6; flex-shrink: 0;
}
.checkout-order-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.checkout-order-item-qty {
  position: absolute; top: -6px; left: -6px;
  background: var(--mtajri-primary, #f97316); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.checkout-order-item-name { flex: 1; font-size: 13px; font-weight: 500; color: #374151; line-height: 1.4; }
.checkout-order-item-price { font-size: 13px; font-weight: 700; color: #1a1a2e; white-space: nowrap; }

/* Totals */
.checkout-totals {
  border-top: 1px solid #f3f4f6;
  padding: 12px 20px;
}
.checkout-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 13px; color: #374151;
  border-bottom: 1px solid #f9fafb;
}
.checkout-total-row:last-child { border-bottom: none; }
.checkout-total-discount { color: #10b981; }
.checkout-total-grand {
  font-size: 16px; font-weight: 700;
  padding-top: 12px; margin-top: 4px;
  border-top: 2px solid #f3f4f6; border-bottom: none;
}
.checkout-grand-amount { color: var(--mtajri-primary, #f97316); font-size: 20px; }

/* Payment */
.checkout-payment { padding: 16px 20px; border-top: 1px solid #f3f4f6; }
.checkout-payment-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 12px;
}
.checkout-payment-title svg { color: var(--mtajri-primary, #f97316); }

.wc_payment_methods { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.wc_payment_methods li {
  border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s; cursor: pointer;
}
.wc_payment_methods li:has(input:checked) { border-color: var(--mtajri-primary, #f97316); background: #fff7ed; }
.wc_payment_methods li label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: #1a1a2e;
}
.wc_payment_methods li input[type="radio"] { accent-color: var(--mtajri-primary, #f97316); }
.wc_payment_methods li img { height: 22px; width: auto; }
.payment-description { font-size: 12px; color: #6b7280; display: block; margin-top: 4px; font-weight: 400; }
.payment_box { font-size: 13px; color: #6b7280; padding: 10px 0 0 0; }

/* Place order button */
.checkout-place-order-btn {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 15px 20px !important;
  border-radius: 10px !important;
  background: var(--mtajri-primary, #f97316) !important;
  color: #fff !important;
  border: none !important;
  cursor: pointer !important;
  transition: opacity .2s, transform .15s !important;
  font-family: inherit !important;
  letter-spacing: .2px !important;
}
.checkout-place-order-btn:hover { opacity: .88 !important; transform: translateY(-1px) !important; }

/* Security badge */
.checkout-security-badge {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; color: #9ca3af; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid #f9fafb;
}
.checkout-security-badge svg { color: #10b981; }

/* ── Responsive: checkout ── */
@media (max-width: 900px) {
  .checkout-page-grid { grid-template-columns: 1fr; }
  .checkout-order-card { position: static; }
  .woocommerce-billing-fields__field-wrapper,
  .woocommerce-shipping-fields__field-wrapper { grid-template-columns: 1fr; }
  .checkout-steps .checkout-step-sep { width: 30px; }
}

@media (max-width: 480px) {
  #cart-drawer { width: 100vw; right: -100vw; }
  .cart-drawer-actions { grid-template-columns: 1fr; }
  .checkout-steps { gap: 4px; }
  .checkout-step-sep { display: none; }
}
