/*
Theme Name: Nakhla Dates
Theme URI: https://example.com
Author: Ayman Qallash
Description: RTL Arabic WooCommerce theme for a dates store. Testimonials and FAQs are custom post types; About, Contact, FAQ, Cart and Checkout use page templates.
Version: 1.0.0
Text Domain: nakhla
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: rtl-language-support, e-commerce, custom-menu, custom-logo, featured-images
*/

/* ==========================================================
   1. Tokens
   ========================================================== */
:root {
  --green: #007a32;
  --green-2: #007a32;
  --gold: #C99A2E;
  --gold-2: #E3B84E;
  --brown: #6B3418;
  --cream: #FBF7EF;
  --sand: #F3EBDD;
  --text: #1F1F1F;
  --muted: #6E6A63;
  --line: #E7DFD1;
  --white: #fff;
  --sale: #B3261E;
  --success: #1B5A38;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(14, 59, 36, .08);
  --container: 1200px;
  --font: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ==========================================================
   2. Base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  direction: rtl;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--green); font-weight: 800; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
input, select, textarea, button { font: inherit; color: inherit; }
.muted { color: var(--muted); font-size: .9rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
.container--narrow { max-width: 820px; }
.section { padding-block: 48px; }
.section--alt { background: var(--white); }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
}
.section-head h2 { margin: 0; }
.section-head > a { font-weight: 700; font-size: .95rem; }

.eyebrow {
  display: inline-block; font-weight: 700; font-size: .85rem;
  color: var(--gold); letter-spacing: .02em; margin-bottom: 8px;
}

/* ==========================================================
   3. Buttons & form controls  (.button = WooCommerce buttons)
   ========================================================== */
.btn, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border: 2px solid var(--green); border-radius: 999px;
  background: var(--green); color: var(--white); font-weight: 700; line-height: 1.4;
  cursor: pointer; transition: .2s ease; text-align: center;
}
.btn:hover, .button:hover { background: var(--green-2); border-color: var(--green-2); color: var(--white); }
.btn--outline { background: transparent; color: var(--green); }
.btn--outline:hover { background: var(--green); color: var(--white); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: var(--white); color: var(--green); border-color: var(--white); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--white); }
.btn--gold:hover { background: var(--gold-2); border-color: var(--gold-2); }
.btn--sm { padding: 8px 16px; font-size: .9rem; }
.btn--lg { padding: 15px 28px; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }
.btn--grow { flex: 1; }
.button:disabled, .button.disabled, .button[disabled] { opacity: .5; cursor: not-allowed; }
.button.loading { opacity: .6; pointer-events: none; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="search"], input[type="url"], input[type="password"], select, textarea, .input-text {
  width: 100%; padding: 11px 14px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none;
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: .92rem; }
.form-grid { display: grid; gap: 16px; margin-bottom: 28px; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}

/* Quantity stepper (theme adds − / + around WooCommerce's input.qty) */
.quantity {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 999px; background: var(--white); overflow: hidden;
}
.quantity .qty-btn { width: 40px; height: 44px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.quantity input.qty { width: 44px; border: 0; border-radius: 0; text-align: center; padding: 0; -moz-appearance: textfield; }
.quantity input.qty::-webkit-outer-spin-button, .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; }
.quantity:has(input[type="hidden"]) { display: none; }

/* ==========================================================
   4. Header
   ========================================================== */
.topbar {
  background: var(--green); color: var(--gold-2); text-align: center;
  font-size: .88rem; font-weight: 500; padding: 8px 16px;
}

.site-header {
  background: var(--white); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: 72px; }

.logo {
  display: flex; flex-direction: column; line-height: 1;
  font-size: 1.8rem; font-weight: 800; color: var(--green);
}
.logo span { font-size: .75rem; font-weight: 500; color: var(--gold); margin-top: 4px; }
.logo--light { color: var(--white); }
.custom-logo-link img { max-height: 56px; width: auto; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; color: var(--green); cursor: pointer;
}
.icon-btn:hover { background: var(--sand); color: var(--green); }
.cart-count {
  position: absolute; top: 2px; left: 2px; min-width: 18px; height: 18px;
  display: grid; place-items: center; padding: 0 4px; border-radius: 999px;
  background: var(--gold); color: var(--white); font-size: .7rem; font-weight: 700;
}
.cart-count.is-empty { display: none; }

.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.search { display: none; }
.search input { border-radius: 999px; background: var(--cream); width: 240px; }

/* Nav – mobile first (off-canvas via checkbox) */
.main-nav {
  position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw);
  background: var(--white); padding: 88px 24px 24px; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s ease;
  z-index: 60;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul > li > a {
  display: block; padding: 12px 0; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--line);
}
.main-nav a.is-active, .main-nav a:hover { color: var(--gold); }
.sub-menu { padding-inline-start: 16px !important; }
.sub-menu a { display: block; padding: 8px 0; color: var(--muted); font-size: .95rem; }

.menu-btn { z-index: 70; }
.nav-toggle:checked ~ .main-nav { transform: translateX(0); box-shadow: -8px 0 32px rgba(0,0,0,.12); }

@media (min-width: 992px) {
  .menu-btn { display: none; }
  .search { display: block; }
  .main-nav {
    position: static; transform: none; width: auto; padding: 0;
    box-shadow: none; overflow: visible; background: none; margin-inline-start: 24px;
  }
  .main-nav > ul { display: flex; gap: 28px; }
  .main-nav > ul > li { position: relative; }
  .main-nav > ul > li > a { border: 0; padding: 24px 0; }
  .has-sub > a::after { content: " ▾"; font-size: .75em; }
  .sub-menu {
    position: absolute; top: 100%; right: -16px; min-width: 210px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
    box-shadow: var(--shadow); padding: 8px 16px !important;
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
  }
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu {
    opacity: 1; visibility: visible; transform: none;
  }
}

/* ==========================================================
   5. Hero / page hero / breadcrumb
   ========================================================== */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
  color: var(--white); overflow: hidden;
}
.hero__inner { display: grid; gap: 32px; align-items: center; padding-block: 48px; }
.hero h1 { color: var(--white); }
.hero p { color: rgba(255,255,255,.85); max-width: 520px; font-size: 1.05rem; }
.hero .eyebrow { color: var(--gold-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__cta .btn:first-child { background: var(--gold); border-color: var(--gold); }
.hero__media img { border-radius: 24px; aspect-ratio: 1; object-fit: cover; width: 100%; max-width: 440px; margin-inline: auto; }
@media (min-width: 768px) {
  .hero__inner { grid-template-columns: 1.1fr .9fr; padding-block: 72px; }
}

.page-hero { background: var(--sand); padding-block: 32px; }
.page-hero h1 { margin: 0; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }

/* ==========================================================
   6. Categories
   ========================================================== */
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 640px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .cats { grid-template-columns: repeat(6, 1fr); } }

.cat-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 12px; transition: .2s;
}
.cat-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.cat-card__name { font-weight: 700; color: var(--green); }
.cat-card__count { font-size: .82rem; color: var(--muted); }

/* ==========================================================
   7. Product grid & card  (ul.products > li.product-card)
   ========================================================== */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 768px) { .products { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .products { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

.product-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .2s;
}
.product-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.product-card__media { position: relative; display: block; aspect-ratio: 1; background: var(--sand); overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-card__media img { transform: scale(1.05); }
.product-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px; flex: 1; }
.product-card__cat { font-size: .78rem; color: var(--muted); }
.product-card__title { font-size: .98rem; font-weight: 700; margin: 0; flex: 1; }
.product-card__title a { color: var(--text); }
.product-card__title a:hover { color: var(--green); }
.product-card .btn { margin-top: 8px; padding: 9px 12px; font-size: .88rem; }
.product-card .added_to_cart { text-align: center; font-size: .85rem; font-weight: 700; }
.product-card .btn.added::after { content: " ✓"; }

.badge, .onsale {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--green); color: var(--white); font-size: .75rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.badge--sale, .onsale { background: var(--sale); }

.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--green); font-weight: 800; font-size: 1.05rem; }
.price del { color: var(--muted); font-size: .85rem; font-weight: 400; }
.price ins { text-decoration: none; color: var(--green); font-weight: 800; }

/* ==========================================================
   8. Promo, tabs, reviews, features
   ========================================================== */
.promo {
  display: flex; flex-direction: column; gap: 20px; align-items: flex-start;
  background: var(--sand); border-radius: 24px; padding: 32px;
  background-image: radial-gradient(circle at 10% 90%, rgba(201,154,46,.18), transparent 50%);
}
.promo h2 { margin-bottom: 4px; }
.promo p { margin: 0; color: var(--muted); }
@media (min-width: 768px) { .promo { flex-direction: row; align-items: center; justify-content: space-between; padding: 40px 48px; } }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a {
  padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line);
  font-size: .9rem; font-weight: 700; color: var(--muted); background: var(--white);
}
.tabs a.is-active, .tabs a:hover { background: var(--green); border-color: var(--green); color: var(--white); }

.reviews { display: grid; gap: 16px; }
@media (min-width: 768px) { .reviews { grid-template-columns: repeat(3, 1fr); } }
.review {
  margin: 0; background: var(--cream); border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--line);
}
.review p { font-size: 1rem; }
.review cite { font-style: normal; font-weight: 700; color: var(--green); font-size: .9rem; }
.stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 8px; }

.features { background: var(--white); border-top: 1px solid var(--line); padding-block: 36px; }
.features__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (min-width: 992px) { .features__grid { grid-template-columns: repeat(4, 1fr); } }
.feature { text-align: center; }
.feature__icon {
  display: inline-grid; place-items: center; width: 56px; height: 56px;
  border-radius: 50%; background: var(--sand); font-size: 1.5rem; margin-bottom: 10px;
}
.feature h4 { font-size: 1rem; margin-bottom: 4px; }
.feature p { font-size: .88rem; color: var(--muted); margin: 0; }

/* ==========================================================
   9. Shop archive
   ========================================================== */
.shop-layout { display: grid; gap: 32px; }
.shop-layout .sidebar { order: 2; }
.shop-main { min-width: 0; }
@media (min-width: 992px) { .shop-layout { grid-template-columns: 250px 1fr; } .shop-layout .sidebar { order: 0; } }

.widget { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.widget h4 { font-size: 1rem; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.widget-list li:last-child { border: 0; }
.widget-list a { color: var(--text); }
.widget-list li.is-active a { color: var(--gold); font-weight: 700; }
.widget-list span { font-size: .8rem; color: var(--muted); }
.price-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-filter .btn { grid-column: 1 / -1; }

.term-description, .woocommerce-products-header { margin-bottom: 20px; color: var(--muted); }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.woocommerce-result-count { margin: 0; color: var(--muted); font-size: .9rem; }
.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select { width: auto; }

.pagination, .woocommerce-pagination { display: flex; justify-content: center; margin-top: 40px; }
.pagination, .woocommerce-pagination ul { flex-wrap: wrap; gap: 8px; }
.woocommerce-pagination ul { display: flex; list-style: none; margin: 0; padding: 0; }
.pagination .page-numbers, .woocommerce-pagination .page-numbers {
  min-width: 42px; height: 42px; padding: 0 14px; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 700; color: var(--text);
}
.pagination .dots, .woocommerce-pagination .dots { border: 0; background: none; }
.pagination a:hover, .pagination .current,
.woocommerce-pagination a:hover, .woocommerce-pagination .current { background: var(--green); color: var(--white); border-color: var(--green); }

/* ==========================================================
   10. Single product
   ========================================================== */
.single-product div.product { position: relative; display: grid; gap: 32px; margin-block: 16px 48px; }
.single-product div.product > * { min-width: 0; }
@media (min-width: 900px) {
  .single-product div.product { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .single-product div.product > .product-tabs,
  .single-product div.product > .related,
  .single-product div.product > .upsells { grid-column: 1 / -1; }
}

/* Gallery (WooCommerce flexslider / zoom / lightbox) */
.woocommerce-product-gallery { position: relative; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image { background: var(--sand); border-radius: var(--radius); overflow: hidden; }
.woocommerce-product-gallery__image img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.woocommerce-product-gallery .flex-viewport { border-radius: var(--radius); }
.woocommerce-product-gallery .flex-control-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; list-style: none; margin: 10px 0 0; padding: 0; }
.woocommerce-product-gallery .flex-control-thumbs img { border-radius: var(--radius-sm); aspect-ratio: 1; object-fit: cover; border: 2px solid transparent; cursor: pointer; opacity: .7; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active,
.woocommerce-product-gallery .flex-control-thumbs img:hover { border-color: var(--gold); opacity: 1; }
.woocommerce-product-gallery__trigger {
  position: absolute; top: 12px; left: 12px; z-index: 3; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 50%; background: var(--white); font-size: 0;
}
.woocommerce-product-gallery__trigger::before { content: "⤢"; font-size: 1.1rem; color: var(--green); }
.woocommerce-product-gallery__trigger img { display: none !important; }

.summary .product_title { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 6px; }
.woocommerce-product-rating { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.woocommerce-product-rating a { color: inherit; }
.summary .price { font-size: 1.6rem; }
.summary .price del { font-size: 1.05rem; }
.woocommerce-product-details__short-description { color: var(--muted); margin-top: 16px; }
.woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }
.stock { font-weight: 700; font-size: .9rem; }
.stock.out-of-stock { color: var(--sale); }
.stock.in-stock { color: var(--success); }

form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-block: 20px; border-block: 1px solid var(--line); margin-block: 20px; }
form.cart .single_add_to_cart_button { flex: 1; }
form.cart .nakhla-buy-now { flex-basis: 100%; }
form.variations_form { display: block; }
.woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.variations { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.variations th, .variations td { display: block; padding: 0; text-align: start; }
.variations th label { font-weight: 700; font-size: .92rem; }
.variations td { margin: 6px 0 12px; }
.reset_variations { display: inline-block; margin-top: 8px; font-size: .85rem; color: var(--muted); }
.woocommerce-variation { margin-bottom: 12px; }
.woocommerce-variation-price .price { font-size: 1.3rem; }
.nakhla-js .variations select { display: none; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { position: relative; }
.swatches input { position: absolute; opacity: 0; }
.swatches span {
  display: inline-block; padding: 8px 18px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--white); cursor: pointer; font-weight: 500;
}
.swatches input:checked + span { border-color: var(--green); background: var(--green); color: var(--white); }
.swatches input:disabled + span { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.swatches input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.summary__meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; color: var(--muted); }

/* Tabs as accordions (woocommerce/single-product/tabs/tabs.php) + FAQ */
.product-tabs details, .faq details {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden;
}
.product-tabs summary, .faq summary {
  padding: 16px 20px; font-weight: 700; color: var(--green); cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.product-tabs summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.product-tabs summary::after, .faq summary::after { content: "+"; font-size: 1.4rem; color: var(--gold); transition: transform .2s; }
details[open] > summary::after { transform: rotate(45deg); }
.product-tabs__panel, .faq__answer { padding: 0 20px 16px; }
.product-tabs__panel > h2:first-child { display: none; } /* WooCommerce repeats the tab title inside the panel. */
.product-tabs__panel > :last-child, .faq__answer > :last-child { margin-bottom: 0; }
.faq-intro { margin-bottom: 24px; }

.shop_attributes, .table { width: 100%; border-collapse: collapse; }
.shop_attributes th, .shop_attributes td, .table th, .table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: start; }
.shop_attributes th, .table th { width: 35%; color: var(--muted); font-weight: 500; }
.shop_attributes p { margin: 0; }

/* Star ratings */
.star-rating {
  position: relative; display: inline-block; overflow: hidden; width: 5.4em; height: 1.2em;
  line-height: 1.2; font-size: 1rem; letter-spacing: .08em; color: var(--line); white-space: nowrap;
}
.star-rating::before { content: "★★★★★"; position: absolute; top: 0; right: 0; }
.star-rating span { position: absolute; top: 0; right: 0; overflow: hidden; padding-top: 1.5em; height: 0; }
.star-rating span::before { content: "★★★★★"; position: absolute; top: 0; right: 0; color: var(--gold); }
p.stars { margin: 0 0 12px; }
p.stars a { position: relative; display: inline-block; width: 1.3em; height: 1.3em; font-size: 1.3rem; text-indent: -999em; }
p.stars a::before { content: "☆"; position: absolute; inset: 0; text-indent: 0; color: var(--gold); }
p.stars:hover a::before, p.stars.selected a::before { content: "★"; }
p.stars:hover a:hover ~ a::before, p.stars.selected a.active ~ a::before { content: "☆"; }
p.stars.selected:hover a::before { content: "★"; }

/* Reviews tab */
#reviews .commentlist { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
#reviews .comment_container { display: flex; gap: 12px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
#reviews .comment_container img.avatar { width: 48px; height: 48px; border-radius: 50%; }
#reviews .comment-text { flex: 1; }
#reviews .meta { color: var(--muted); font-size: .88rem; margin-bottom: 6px; }
#reviews .description p:last-child { margin: 0; }
.comment-respond { margin-top: 12px; }
.comment-reply-title { display: block; font-size: 1.1rem; font-weight: 800; color: var(--green); margin-bottom: 12px; }
.comment-form { display: grid; gap: 14px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); }
.comment-form-cookies-consent input { width: auto; }
.comment-form-cookies-consent label { margin: 0; font-weight: 400; }

.related > h2, .upsells > h2, .cross-sells > h2 { margin-bottom: 24px; }

/* ==========================================================
   11. Cart (classic [woocommerce_cart] in template-cart.php)
   ========================================================== */
.wc-page .woocommerce { display: grid; gap: 32px; align-items: start; }
.wc-page .woocommerce > * { min-width: 0; }
@media (min-width: 992px) {
  .wc-page--cart .woocommerce { grid-template-columns: 1fr 360px; }
  .wc-page--cart .woocommerce > :not(.woocommerce-cart-form):not(.cart-collaterals) { grid-column: 1 / -1; }
}

.shop_table.cart, .shop_table.cart tbody { display: block; }
.shop_table.cart thead { display: none; }
.shop_table.cart tr.cart_item {
  display: grid; grid-template-columns: 72px 1fr auto;
  grid-template-areas: "img name remove" "img price price" "img qty sub";
  gap: 6px 16px; align-items: center; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
.shop_table.cart td { display: block; padding: 0; border: 0; }
.shop_table.cart td::before { content: none; }
.shop_table.cart .product-thumbnail { grid-area: img; }
.shop_table.cart .product-thumbnail img { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; }
.shop_table.cart .product-name { grid-area: name; font-weight: 700; }
.shop_table.cart .product-name a { color: var(--text); }
.shop_table.cart .product-name dl.variation { margin: 4px 0 0; font-size: .85rem; font-weight: 400; color: var(--muted); }
.shop_table.cart .product-name dl.variation dt, .shop_table.cart .product-name dl.variation dd { display: inline; margin: 0; }
.shop_table.cart .product-name dl.variation p { display: inline; margin: 0; }
.shop_table.cart .product-price { grid-area: price; color: var(--muted); font-size: .9rem; }
.shop_table.cart .product-quantity { grid-area: qty; justify-self: start; }
.shop_table.cart .product-subtotal { grid-area: sub; color: var(--green); font-weight: 800; }
.shop_table.cart .product-remove { grid-area: remove; }
.shop_table.cart a.remove {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: var(--sand); color: var(--text); font-size: 1.2rem;
}
.shop_table.cart a.remove:hover { background: var(--sale); color: var(--white); }
@media (min-width: 640px) {
  .shop_table.cart tr.cart_item {
    grid-template-columns: 80px 1fr auto 110px 32px;
    grid-template-areas: "img name qty sub remove" "img price qty sub remove";
  }
  .shop_table.cart .product-thumbnail img { width: 80px; height: 80px; }
}
.shop_table.cart tr:not(.cart_item) { display: block; }
.shop_table.cart td.actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.shop_table.cart .coupon { display: flex; gap: 8px; flex: 1; max-width: 420px; }
.shop_table.cart .coupon .button { background: transparent; color: var(--green); white-space: nowrap; }
.shop_table.cart .coupon .button:hover { background: var(--green); color: var(--white); }
.shop_table.cart [name="update_cart"] { background: transparent; color: var(--green); padding: 8px 16px; }
.nakhla-js .shop_table.cart [name="update_cart"] { display: none; } /* theme.js updates automatically */

.cart-collaterals .cart_totals, .wc-page--checkout #order_review, .totals {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
@media (min-width: 992px) {
  .cart-collaterals .cart_totals, .totals { position: sticky; top: 96px; }
}
.cart_totals h2, .totals h3 { font-size: 1.2rem; }
.cart_totals .shop_table, #order_review .shop_table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; }
.cart_totals .shop_table th, .cart_totals .shop_table td,
#order_review .shop_table th, #order_review .shop_table td { padding: 10px 0; border-bottom: 1px dashed var(--line); text-align: start; vertical-align: top; font-size: .95rem; }
.cart_totals .shop_table th, #order_review tfoot th { color: var(--muted); font-weight: 500; }
.cart_totals .shop_table td, #order_review .shop_table td:last-child { text-align: end; font-weight: 700; }
.cart_totals .order-total th, .cart_totals .order-total td,
#order_review .order-total th, #order_review .order-total td { font-size: 1.15rem; color: var(--green); font-weight: 800; border-bottom: 0; }
.woocommerce-shipping-methods { list-style: none; margin: 0; padding: 0; }
.woocommerce-shipping-methods li { margin-bottom: 4px; }
.woocommerce-shipping-destination, .woocommerce-shipping-calculator { font-size: .85rem; font-weight: 400; color: var(--muted); }
.wc-proceed-to-checkout { display: grid; gap: 12px; }
.wc-proceed-to-checkout .checkout-button { width: 100%; }
.notice { background: var(--sand); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .88rem; }
.link-back { display: block; text-align: center; font-size: .9rem; }

.cart-empty { font-size: 1.05rem; }
.return-to-shop .button { margin-top: 8px; }

/* ==========================================================
   12. Checkout (classic [woocommerce_checkout] in template-checkout.php)
   ========================================================== */
@media (min-width: 992px) {
  .wc-page--checkout form.checkout { display: grid; grid-template-columns: 1fr 380px; column-gap: 32px; align-items: start; }
  .wc-page--checkout #customer_details { grid-column: 1; grid-row: 1 / span 2; }
  .wc-page--checkout #order_review_heading { grid-column: 2; grid-row: 1; }
  .wc-page--checkout #order_review { grid-column: 2; grid-row: 2; position: sticky; top: 96px; }
  .wc-page--checkout form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
}
#customer_details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
#customer_details h3, #order_review_heading { font-size: 1.2rem; }
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-address-fields__field-wrapper { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .woocommerce-billing-fields__field-wrapper,
  .woocommerce-shipping-fields__field-wrapper,
  .woocommerce-address-fields__field-wrapper { grid-template-columns: 1fr 1fr; }
  .form-row-wide, .notes, #order_comments_field { grid-column: 1 / -1; }
}
.form-row { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.woocommerce-billing-fields__field-wrapper .form-row,
.woocommerce-shipping-fields__field-wrapper .form-row,
.woocommerce-address-fields__field-wrapper .form-row { margin: 0; }
.form-row label { font-weight: 700; font-size: .92rem; }
.form-row label.checkbox, .form-row .woocommerce-form__label-for-checkbox { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form-row input[type="checkbox"], .form-row input[type="radio"] { width: auto; accent-color: var(--green); }
.form-row .required { color: var(--sale); text-decoration: none; border: 0; }
.form-row .optional { color: var(--muted); font-weight: 400; }
.form-row.woocommerce-invalid input.input-text, .form-row.woocommerce-invalid select { border-color: var(--sale); }
.woocommerce-input-wrapper { display: block; }
.woocommerce-additional-fields { margin-top: 20px; }
#ship-to-different-address { font-size: 1rem; }

/* select2 / selectWoo (governorate field) */
.select2-container .select2-selection--single { height: 46px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 44px; padding-inline: 14px; }
.select2-container .select2-selection--single .select2-selection__arrow { height: 44px; }

/* Payment methods */
#payment { margin-top: 8px; }
#payment .wc_payment_methods { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
#payment .wc_payment_method { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
#payment .wc_payment_method:has(input:checked) { border-color: var(--green); background: var(--cream); }
#payment .wc_payment_method > label { font-weight: 700; cursor: pointer; }
#payment .wc_payment_method > input { accent-color: var(--green); margin-inline-end: 6px; }
#payment .payment_box { font-size: .88rem; color: var(--muted); margin-top: 6px; }
#payment .payment_box p:last-child { margin: 0; }
#payment .place-order { display: grid; gap: 12px; margin: 0; }
.woocommerce-terms-and-conditions-wrapper { font-size: .85rem; color: var(--muted); }
#place_order { width: 100%; padding: 15px 28px; font-size: 1.05rem; }

.woocommerce-form-coupon-toggle, .woocommerce-form-login-toggle { grid-column: 1 / -1; }
form.checkout_coupon, form.woocommerce-form-login {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}
form.checkout_coupon { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.checkout_coupon p { margin: 0; }
form.checkout_coupon .form-row { margin: 0; }

/* Order received / order details */
.woocommerce-order { display: grid; gap: 20px; }
.woocommerce-thankyou-order-received {
  background: #E6F2EA; color: var(--success); border-radius: var(--radius); padding: 16px 20px; font-weight: 700; margin: 0;
}
.woocommerce-order-overview {
  list-style: none; margin: 0; padding: 20px; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.woocommerce-order-overview li { font-size: .85rem; color: var(--muted); }
.woocommerce-order-overview strong { display: block; font-size: 1rem; color: var(--text); }
.woocommerce-order-details, .woocommerce-customer-details {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.woocommerce-table--order-details { width: 100%; border-collapse: collapse; }
.woocommerce-table--order-details th, .woocommerce-table--order-details td { padding: 10px 0; border-bottom: 1px dashed var(--line); text-align: start; }
.woocommerce-table--order-details td:last-child, .woocommerce-table--order-details tfoot td { text-align: end; }
.woocommerce-customer-details address { font-style: normal; line-height: 1.9; }

/* ==========================================================
   13. WooCommerce notices & my account
   ========================================================== */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .notice--success, .notice--error {
  list-style: none; margin: 0 0 20px; padding: 12px 16px; border-radius: var(--radius-sm);
  border-inline-start: 4px solid var(--gold); background: var(--sand); font-size: .92rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.woocommerce-message, .notice--success { background: #E6F2EA; color: var(--success); border-color: var(--success); }
.woocommerce-error, .notice--error { background: #FBEAEA; color: var(--sale); border-color: var(--sale); display: block; }
.woocommerce-error li { margin: 2px 0; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; padding: 6px 16px; font-size: .85rem; }
.woocommerce-store-notice, p.demo_store {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 99; margin: 0; padding: 10px 16px;
  background: var(--green); color: var(--white); text-align: center; font-size: .9rem;
}
.woocommerce-store-notice a { color: var(--gold-2); }

.woocommerce-account .woocommerce { display: grid; gap: 24px; }
@media (min-width: 900px) { .woocommerce-account .woocommerce { grid-template-columns: 240px 1fr; align-items: start; } }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.woocommerce-MyAccount-navigation a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; }
.woocommerce-MyAccount-navigation .is-active a, .woocommerce-MyAccount-navigation a:hover { background: var(--sand); color: var(--green); }
.woocommerce-MyAccount-content { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.woocommerce-MyAccount-content .shop_table, .woocommerce-orders-table { width: 100%; border-collapse: collapse; }
.woocommerce-orders-table th, .woocommerce-orders-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; }
.woocommerce-form-login, .woocommerce-form-register { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.u-columns { display: grid; gap: 24px; }
@media (min-width: 900px) { .u-columns { grid-template-columns: 1fr 1fr; } }

.blockUI.blockOverlay { background: rgba(255,255,255,.6) !important; }

/* ==========================================================
   14. Contact / about / prose / blog
   ========================================================== */
.cart-layout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 992px) { .cart-layout { grid-template-columns: 1fr 360px; } }
.checkout-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.contact-info p { margin-bottom: 16px; }
.contact-intro { margin-bottom: 24px; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.empty-state { text-align: center; padding: 48px 16px; background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state p { color: var(--muted); font-size: 1.05rem; }
.empty-state .btn { margin: 4px; }
.search-inline { display: flex; gap: 8px; max-width: 480px; margin: 0 auto 16px; }

.about { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1fr; } }
.about__media img { border-radius: 24px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.stats div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.stats strong { display: block; font-size: 1.5rem; color: var(--gold); }
.stats span { font-size: .85rem; color: var(--muted); }

.prose h2 { margin-top: 1.4em; }
.prose h2:first-child, .prose .eyebrow + h2 { margin-top: 0; }
.prose ul, .prose ol { padding-inline-start: 20px; }
.prose li { margin-bottom: 6px; }
.prose img { border-radius: var(--radius); }
.prose blockquote { margin: 1.5em 0; padding: 16px 20px; background: var(--white); border-inline-start: 4px solid var(--gold); border-radius: var(--radius-sm); }

.post-grid { display: grid; gap: 24px; }
@media (min-width: 768px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-card__media img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.post-card__body { padding: 16px; }
.post-card__body h3 a { color: var(--text); }
.post-thumb img { border-radius: var(--radius); margin-bottom: 24px; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; font-weight: 700; }
.comments { margin-top: 40px; }
.comment-list { padding-inline-start: 20px; }

/* WordPress core alignment / captions */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption, .wp-block-image figcaption { font-size: .85rem; color: var(--muted); }

/* ==========================================================
   15. Footer
   ========================================================== */
.site-footer { background: var(--green); color: rgba(255,255,255,.75); padding-top: 48px; }
.site-footer__grid { display: grid; gap: 32px; padding-bottom: 40px; }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.site-footer h4 { color: var(--gold-2); font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: var(--gold-2); }
.site-footer__about { margin-top: 14px; font-size: .92rem; max-width: 340px; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 16px; font-size: .85rem; text-align: center; }

.social { display: flex; gap: 8px; margin-top: 14px; }
.social a {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.1); font-size: .8rem; font-weight: 700;
}
.social a:hover { background: var(--gold); color: var(--white); }

.whatsapp-float {
  position: fixed; bottom: 20px; left: 20px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; color: var(--white); box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.whatsapp-float:hover { color: var(--white); transform: scale(1.06); }

/* ==========================================================
   16. Utilities / a11y
   ========================================================== */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
  clip: auto; clip-path: none; width: auto; height: auto; z-index: 100000;
  top: 8px; right: 8px; padding: 10px 16px; background: var(--white); border-radius: var(--radius-sm);
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
