/*
Theme Name:   Qamarshop
Theme URI:    https://qamarshop.shop
Description:  Thème enfant Astra – Brand DNA Qamar Shop (arabe RTL, Readex Pro, palette officielle). Carte 9.
Author:       Qamar Shop
Template:     astra
Version:      1.4.6
Text Domain:  qamarshop
*/

/* ============================================
   QAMARSHOP — SYSTÈME TYPOGRAPHIQUE
   (repris intégralement de qamarshop-typographie_1.css,
   police chargée par functions.php, pas d'@import)
   ============================================ */

:root {
  --font: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;

  /* Palette officielle */
  --c-white:  #FFFFFF;
  --c-grey:   #EAEAEA;
  --c-navy:   #14203E;
  --c-black:  #000000;
  --c-orange: #FCA616;   /* bouton de commande COD uniquement */
  --c-green:  #1F8A4C;   /* badges « جديد » et « -X% » (décision Nizar 30/09) */
  --c-soft:   #F4F4F2;   /* fond des cartes produit, catégories, garanties */
  --c-muted:  #8A8A8A;

  /* Échelle mobile */
  --fs-h1:      24px;
  --fs-price:   26px;
  --fs-h2:      19px;
  --fs-price-s: 16px;
  --fs-button:  15px;
  --fs-card:    14px;
  --fs-body:    15px;
  --fs-label:   13px;
  --fs-micro:   12px;

  --q-radius:   8px;
  --q-max:      1200px;
}

@media (min-width: 768px) {
  :root {
    --fs-h1:    32px;
    --fs-price: 28px;
    --fs-h2:    20px;
  }
}

/* ---------- Base RTL ---------- */

html[lang="ar"] { direction: rtl; }

body,
body button,
body input,
body select,
body textarea {
  font-family: var(--font);
}

body {
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.75;          /* l'arabe a besoin d'air : jamais sous 1.7 */
  color: var(--c-black);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}

/* NE JAMAIS espacer l'arabe (casse les ligatures), jamais d'italique ni de majuscules forcées */
body, body * { letter-spacing: 0 !important; }
body em, body i, body cite { font-style: normal; }
body .button, body button, body h1, body h2, body h3, body h4 { text-transform: none; }

body h1, body h2, body h3, body h4, body h5, body h6 {
  font-family: var(--font);
  line-height: 1.35;
  font-style: normal;
}

a { color: var(--c-navy); }

/* ---------- Classes du système typo ---------- */

.h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.35; color: var(--c-navy); }
.h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.45; color: var(--c-black); }

.price { font-size: var(--fs-price); font-weight: 700; line-height: 1.3; color: var(--c-navy); }
.price--small { font-size: var(--fs-price-s); font-weight: 700; color: var(--c-navy); }
.price--old {
  font-size: var(--fs-label); font-weight: 400; color: var(--c-black);
  opacity: .45; text-decoration: line-through;
}

.btn {
  font-family: var(--font); font-size: var(--fs-button); font-weight: 600; line-height: 1;
  padding: 14px 24px; border: none; border-radius: 6px; cursor: pointer;
  background: var(--c-orange); color: var(--c-navy);
}
.btn--secondary { background: var(--c-navy); color: var(--c-white); }

.card-title { font-size: var(--fs-card); font-weight: 500; line-height: 1.55; color: var(--c-black); }
.label { font-size: var(--fs-label); font-weight: 500; color: var(--c-navy); }

.input {
  font-family: var(--font); font-size: var(--fs-body); font-weight: 400;
  padding: 12px 14px; border: 1px solid var(--c-grey); border-radius: 6px;
  background: var(--c-white); width: 100%;
}
.input:focus { outline: none; border-color: var(--c-orange); }

.micro { font-size: var(--fs-micro); font-weight: 400; line-height: 1.6; color: var(--c-black); opacity: .6; }
.latin { direction: ltr; unicode-bidi: isolate; }

.price, .price--small, .price--old { font-variant-numeric: lining-nums; }

/* ============================================
   WOOCOMMERCE — style « Nuxio » (décision Nizar 30/09)
   Prix simples en bleu nuit (plus d'orange sur les prix).
   L'orange reste UNIQUEMENT sur le bouton de commande COD.
   ============================================ */

body .woocommerce-Price-amount,
body .price .amount {
  color: var(--c-navy);
  font-weight: 700;
  font-variant-numeric: lining-nums;
}
body .woocommerce .price,
body ul.products li.product .price,
body .product .summary .price {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  background: none;
  padding: 0;
  line-height: 1.3;
  color: var(--c-navy);
}
body .price del,
body .price del .amount {
  color: var(--c-muted);
  font-weight: 400;
  font-size: .85em;
}
body .price ins { text-decoration: none; }

/* Boutons génériques = bleu nuit (l'orange est réservé au bouton de commande COD) */
body .button,
body .ast-button,
body button:not(.qcod-btn):not(.menu-toggle),
body input[type="submit"] {
  background: var(--c-navy);
  color: var(--c-white);
  border-color: var(--c-navy);
  border-radius: 6px;
  font-weight: 600;
  min-height: 44px;
}

/* Badges verts : « -X% » et « جديد » */
body .onsale,
body .q-badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  inset-inline-end: auto;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--c-green) !important;
  color: var(--c-white) !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
body.single-product .product .onsale { top: 12px; inset-inline-start: 12px; }
/* « -35% » se lit de gauche à droite, même en page arabe */
.q-badge--sale { direction: ltr; unicode-bidi: isolate; }
/* Badge « Promo ! » d'Astra sur les cartes : remplacé par notre badge vert -X% */
body ul.products .ast-onsale-card,
body ul.products li.product > .onsale { display: none !important; }

/* Grille produits : 2 colonnes mobile / 3 tablette / 4 desktop, cartes sur fond gris clair */
body ul.products {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 12px;
  margin: 0;
}
@media (min-width: 768px) {
  body ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 922px) {
  body ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
}
body ul.products::before,
body ul.products::after { display: none !important; }
body ul.products li.product {
  position: relative;
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  text-align: start;
}
body ul.products li.product .astra-shop-thumbnail-wrap,
body ul.products li.product > a:first-child { position: relative; display: block; }
body ul.products li.product img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  width: 100%;
  background: var(--c-soft);
  border-radius: 10px;
  margin-bottom: 10px;
  transition: opacity .2s;
}
body ul.products li.product a:hover img { opacity: .9; }
body ul.products li.product .woocommerce-loop-product__title {
  font-size: var(--fs-card) !important;
  font-weight: 500;
  line-height: 1.55;
  color: var(--c-black);
  padding: 0;
  margin-bottom: 4px;
}
body ul.products li.product .price .amount { font-size: 15px; }
body ul.products li.product .button,
body ul.products li.product .ast-woo-product-category { display: none !important; }

/* ============================================
   HEADER BLANC : menu · logo · WhatsApp
   ============================================ */

.q-container {
  width: 100%;
  max-width: var(--q-max);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 990px) { .q-container { padding: 0 32px; } }

.q-ico { width: 24px; height: 24px; display: block; flex: none; }

/* Header fixe au scroll : blanc partout, transparent sur la vidéo de l'accueil puis blanc dès qu'on défile */
.q-header {
  background: var(--c-white);
  color: var(--c-navy);
  border-bottom: 1px solid var(--c-grey);
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 100;
  transition: background-color .25s, border-color .25s, box-shadow .25s;
}
.q-logo-light-link { display: none; }

.q-header--overlay {
  position: fixed;
  inset-inline: 0;
  background: transparent;
  border-bottom-color: transparent;
  color: var(--c-white);
}
.q-header--overlay .q-logo-light-link { display: block; }
.q-header--overlay .q-logo-light-link img { display: block; height: 48px; width: auto; }
.q-header--overlay .custom-logo-link { display: none; }
.q-header--overlay .q-menu__btn,
.q-header--overlay .q-header__wa,
.q-header--overlay .q-nav__list a { color: var(--c-white); }

.q-header--overlay.is-solid {
  background: var(--c-white);
  border-bottom-color: var(--c-grey);
  box-shadow: 0 4px 16px rgba(20, 32, 62, .06);
  color: var(--c-navy);
}
.q-header--overlay.is-solid .q-logo-light-link { display: none; }
.q-header--overlay.is-solid .custom-logo-link { display: block; }
.q-header--overlay.is-solid .q-menu__btn,
.q-header--overlay.is-solid .q-header__wa { color: var(--c-navy); }
.q-header--overlay.is-solid .q-nav__list a { color: var(--c-black); }

/* Le hero passe sous le header transparent : on garde le texte sous la barre */
.home .q-hero__inner { padding-top: 104px; }
@media (max-width: 782px) { .admin-bar .q-header--overlay { top: 0; } }
.q-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}
.q-header__logo { justify-self: center; }
.q-header__logo img,
.q-header__logo .custom-logo {
  display: block;
  height: 48px;              /* ≥ 40px : en dessous le sac du logo disparaît */
  width: auto;
  max-width: none;
}
.q-header__name { color: var(--c-navy); font-size: 19px; font-weight: 700; text-decoration: none; }
.q-header__end { justify-self: end; display: flex; align-items: center; }
.q-header__wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--c-navy);
}
.q-header__wa:hover, .q-header__wa:focus { color: var(--c-navy); opacity: .75; }
.q-header__wa .q-ico { width: 26px; height: 26px; }

/* Menu mobile (burger, sans JavaScript) */
.q-menu { justify-self: start; position: static; }
.q-menu__btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--c-navy);
}
.q-menu__btn::-webkit-details-marker { display: none; }
.q-menu__panel {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-grey);
  box-shadow: 0 12px 24px rgba(20, 32, 62, .08);
}
.q-menu__list { list-style: none; margin: 0; padding: 8px 16px 16px; }
.q-menu__list a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-grey);
  color: var(--c-black);
  font-weight: 500;
  text-decoration: none;
}

/* Menu desktop */
.q-nav { display: none; }
@media (min-width: 922px) {
  .q-menu { display: none; }
  .q-header__inner { grid-template-columns: auto 1fr auto; min-height: 76px; }
  .q-header__logo { justify-self: start; }
  .q-nav { display: block; justify-self: center; }
  .q-nav__list { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
  .q-nav__list a { color: var(--c-black); font-size: 14px; font-weight: 500; text-decoration: none; padding: 10px 0; }
  .q-nav__list a:hover { color: var(--c-navy); text-decoration: underline; text-underline-offset: 6px; }
}

/* ============================================
   GARANTIES EN ICÔNES (bas de page, avant le footer)
   ============================================ */

.q-trust { background: var(--c-soft); margin-top: 40px; }
.q-trust__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  list-style: none;
  margin: 0 auto;
  padding-top: 24px;
  padding-bottom: 24px;
}
@media (min-width: 768px) { .q-trust__list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.q-trust__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-black);
}
.q-trust__item .q-ico { width: 30px; height: 30px; color: var(--c-navy); }

/* ============================================
   FOOTER NOIR
   ============================================ */

.q-footer {
  background: var(--c-black);
  color: var(--c-white);
  padding: 28px 0 20px;
  font-size: var(--fs-micro);
}
.q-footer a { color: var(--c-white); text-decoration: none; }
.q-footer a:hover { text-decoration: underline; }
.q-footer__inner { display: grid; gap: 14px; justify-items: center; text-align: center; }
.q-footer__logo img { height: 44px; width: auto; display: block; }
.q-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; list-style: none; margin: 0; padding: 0; }
.q-footer__links a { display: inline-block; padding: 10px 0; }
.q-footer__wa { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; }
.q-footer__wa .q-ico { width: 22px; height: 22px; }
.q-footer__domain { font-size: 13px; }
.q-footer__copy { opacity: .6; }

/* ============================================
   ACCUEIL : catégories · hero · produits · étapes · FAQ
   ============================================ */

.q-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: var(--fs-button);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
/* Bouton du hero : blanc (l'orange est réservé au bouton de commande) */
.q-btn--light { background: var(--c-white); color: var(--c-navy); }
.q-btn--light:hover, .q-btn--light:focus { background: var(--c-grey); color: var(--c-navy); }

/* Accueil : sections empilées pleine largeur (le .ast-container d'Astra est en flex row) */
.home #content > .ast-container { display: block; max-width: none; padding: 0; }
.q-home { display: block; width: 100%; }

/* Catégories en ronds (affichées à partir de 3 catégories) */
.q-cats { background: var(--c-soft); }
.q-cats__list {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0 auto;
  padding-top: 16px;
  padding-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.q-cats__list::-webkit-scrollbar { display: none; }
@media (min-width: 922px) { .q-cats__list { justify-content: center; gap: 32px; } }
.q-cats__list li { flex: none; margin: 0; }
.q-cat { display: grid; justify-items: center; gap: 6px; width: 76px; text-decoration: none; color: var(--c-black); font-size: 12px; font-weight: 500; text-align: center; }
.q-cat__img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-grey);
  color: var(--c-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.q-cat__img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 922px) { .q-cat { width: 92px; } .q-cat__img { width: 84px; height: 84px; } }

/* Hero : grande photo (Personnaliser > Qamar Shop), sinon fond bleu nuit */
.q-hero {
  background-color: var(--c-navy);
  background-size: cover;
  background-position: center;
  color: var(--c-white);
  position: relative;
  display: flex;
  align-items: center;
  min-height: 420px;
}
.q-hero { overflow: hidden; }
.q-hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
@media (prefers-reduced-motion: reduce) { .q-hero__video { display: none; } }
.q-hero--photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,0) 28%), linear-gradient(90deg, rgba(0,0,0,.1), rgba(0,0,0,.6)); }
@media (max-width: 767px) { .q-hero--photo::before { background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,0) 30%), rgba(0,0,0,.45); } }
.q-hero__inner { position: relative; z-index: 2; padding-top: 48px; padding-bottom: 48px; text-align: center; }
body .q-hero__title {
  color: var(--c-white);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
}
.q-hero__sub { font-size: var(--fs-body); opacity: .9; margin: 0 auto 24px; max-width: 520px; }
@media (min-width: 768px) {
  .q-hero { min-height: 540px; }
  .q-hero__inner { text-align: start; }
  body .q-hero__title { font-size: 52px; }
  .q-hero__sub { margin-inline: 0; font-size: 17px; }
}

.q-section { padding: 36px 0; }
@media (min-width: 768px) { .q-section { padding: 56px 0; } }
body .q-h2 { font-size: 22px; font-weight: 600; color: var(--c-black); margin: 0 0 18px; line-height: 1.35; }
@media (min-width: 768px) { body .q-h2 { font-size: 26px; } }
.q-h2--center { text-align: center; }
.q-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.q-head__link { font-size: 13px; color: var(--c-black); text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.q-empty { text-align: center; opacity: .7; }

/* 3 étapes : icônes, sans blocs gris */
.q-steps { border-top: 1px solid var(--c-grey); }
.q-steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
@media (min-width: 768px) { .q-steps__list { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.q-step { display: grid; justify-items: center; gap: 6px; text-align: center; margin: 0; }
.q-step__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-soft);
  color: var(--c-navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.q-step__icon .q-ico { width: 28px; height: 28px; }
.q-step__title { font-size: var(--fs-body); font-weight: 600; line-height: 1.4; color: var(--c-black); }
.q-step__text { font-size: 14px; color: #444; max-width: 260px; }

.q-faq { border-top: 1px solid var(--c-grey); }
.q-faq .q-container { max-width: 760px; }
.q-faq__item { border-bottom: 1px solid var(--c-grey); }
.q-faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 14px 0;
  font-size: var(--fs-body);
  font-weight: 500;
}
.q-faq__item summary::-webkit-details-marker { display: none; }
.q-faq__item summary::after { content: "+"; color: var(--c-navy); font-weight: 400; font-size: 22px; line-height: 1; }
.q-faq__item[open] summary::after { content: "−"; }
.q-faq__item p { margin: 0 0 16px; color: #444; }

/* Pas de scroll horizontal, jamais */
/* « clip » et pas « hidden » : hidden casse le header fixe (position: sticky) */
html, body { overflow-x: clip; }

/* ============================================
   ACCUEIL NUXIO : carrousels + onglets, bannières, bannière COD, footer en colonnes
   ============================================ */

/* Carrousels : 2 cartes visibles sur mobile, 3 tablette, 4 desktop, défilement horizontal */
body .q-rail ul.products {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 12px) / 2.15);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
body .q-rail ul.products::-webkit-scrollbar { display: none; }
body .q-rail ul.products li.product { scroll-snap-align: start; }
@media (min-width: 768px) { body .q-rail ul.products { grid-auto-columns: calc((100% - 40px) / 3); gap: 20px; } }
@media (min-width: 922px) { body .q-rail ul.products { grid-auto-columns: calc((100% - 60px) / 4); gap: 20px; } }
.q-rail + .q-rail { padding-top: 0; }

.q-rail__nav { display: flex; align-items: center; gap: 8px; }
.q-rail__arrow {
  display: none;
  width: 36px !important;
  height: 36px;
  min-height: 36px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid var(--c-grey) !important;
  background: var(--c-white) !important;
  color: var(--c-black) !important;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.q-rail__arrow:hover { border-color: var(--c-navy) !important; }
@media (min-width: 922px) { .q-rail__arrow { display: inline-flex; align-items: center; justify-content: center; } }

/* Onglets de catégories (pastilles) */
.q-tabs { display: flex; gap: 8px; margin: -4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.q-tabs::-webkit-scrollbar { display: none; }
body .q-tab {
  flex: none;
  min-height: 36px !important;
  padding: 6px 16px !important;
  border-radius: 999px !important;
  border: 1px solid var(--c-grey) !important;
  background: var(--c-white) !important;
  color: var(--c-black) !important;
  font-size: 13px;
  font-weight: 500 !important;
  cursor: pointer;
}
body .q-tab.is-active { background: var(--c-navy) !important; border-color: var(--c-navy) !important; color: var(--c-white) !important; }

/* Deux bannières côte à côte */
.q-banners { padding-top: 0; }
.q-banners__grid { display: grid; gap: 12px; }
@media (min-width: 768px) { .q-banners__grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.q-banner { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--c-soft); }
.q-banner__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.q-banner:hover .q-banner__img { transform: scale(1.04); }
.q-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,0) 55%); }
.q-banner__text { position: absolute; inset-inline: 20px; bottom: 20px; z-index: 1; display: grid; justify-items: start; gap: 10px; color: var(--c-white); }
.q-banner__title { font-size: 22px; font-weight: 700; line-height: 1.3; }
@media (min-width: 768px) { .q-banner__title { font-size: 28px; } }
.q-banner__btn { background: var(--c-white); color: var(--c-navy); font-weight: 600; font-size: 14px; border-radius: 6px; padding: 8px 18px; }

/* Grande bannière « الدفع عند الاستلام » */
.q-promo {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 380px;
  margin: 8px 0;
  background-color: var(--c-navy);
  background-size: cover;
  background-position: center;
  color: var(--c-white);
}
.q-promo--photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,32,62,.15), rgba(20,32,62,.85) 60%); }
@media (max-width: 767px) { .q-promo--photo::before { background: rgba(20,32,62,.7); } }
.q-promo__inner { position: relative; padding-top: 48px; padding-bottom: 48px; max-width: var(--q-max); }
.q-promo__inner > * { max-width: 460px; }
.q-promo__tag { display: inline-block; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.15); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px; }
body .q-promo__title { color: var(--c-white); font-size: 28px; font-weight: 700; line-height: 1.3; margin: 0 0 10px; }
@media (min-width: 768px) { .q-promo { min-height: 460px; } body .q-promo__title { font-size: 40px; } }
.q-promo__sub { opacity: .9; margin: 0 0 22px; }

/* Footer en colonnes */
.q-footer { padding: 44px 0 0; font-size: 13px; }
.q-footer__cols { display: grid; gap: 28px; }
@media (min-width: 768px) { .q-footer__cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; } }
.q-footer__brand p { opacity: .75; margin: 12px 0 0; max-width: 320px; line-height: 1.8; }
.q-footer__logo img { height: 48px; width: auto; display: block; }
body .q-footer__title { color: var(--c-white); font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.q-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.q-footer__list li { margin: 0; opacity: .85; }
.q-footer__list a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.q-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 36px;
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: 12px;
  opacity: .7;
}
/* ============================================
   CORRECTIFS 1.4.1 (retours Nizar 30/09)
   ============================================ */

/* Carrousels : Astra impose « .woocommerce ul.products.columns-4 { grid-template-columns: repeat(4,…) } »
   qui écrasait les premières cartes → on force la grille en colonnes automatiques */
body .q-rail ul.products,
body .q-rail .woocommerce ul.products,
body .q-rail ul.products[class*="columns-"] {
  grid-template-columns: none !important;
  grid-auto-flow: column !important;
  grid-auto-columns: calc((100% - 12px) / 2.15) !important;
}
@media (min-width: 768px) {
  body .q-rail ul.products,
  body .q-rail .woocommerce ul.products,
  body .q-rail ul.products[class*="columns-"] { grid-auto-columns: calc((100% - 40px) / 3) !important; }
}
@media (min-width: 922px) {
  body .q-rail ul.products,
  body .q-rail .woocommerce ul.products,
  body .q-rail ul.products[class*="columns-"] { grid-auto-columns: calc((100% - 60px) / 4) !important; }
}
/* Images des cartes toujours carrées, même taille */
body ul.products li.product img { aspect-ratio: 1 / 1; height: auto; object-fit: cover; }

/* Liste de tri (boutique) : la flèche à gauche en RTL, jamais sur le texte */
body .woocommerce-ordering select,
body select.orderby {
  background-position: left 12px center !important;
  padding-left: 36px !important;
  padding-right: 14px !important;
  text-align: right;
}
body .woocommerce-result-count { font-size: 13px; color: var(--c-muted); }

/* Bouton « retour en haut » : à droite, bleu nuit */
#ast-scroll-top {
  right: 20px !important;
  left: auto !important;
  background-color: var(--c-navy) !important;
  color: var(--c-white) !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Titre de la page boutique / catégories */
body.woocommerce .woocommerce-products-header__title,
body.woocommerce .page-title { font-size: 26px; font-weight: 700; color: var(--c-black); }
/* ============================================
   CORRECTIFS 1.4.2 (retours iPhone Nizar 30/09)
   ============================================ */

/* Vidéo du hero : jamais de bouton « play » ; bloquée → masquée (l'image du hero reste) */
.q-hero__video { pointer-events: none; }
.q-hero__video.is-blocked { display: none; }
.q-hero__video::-webkit-media-controls,
.q-hero__video::-webkit-media-controls-start-playback-button,
.q-hero__video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }

/* Menu : « الأقسام » avec sous-menu des catégories */
.q-caret { font-size: 11px; margin-inline-start: 4px; }
.q-nav .q-has-sub { position: relative; }
.q-nav .q-sub {
  position: absolute;
  top: 100%;
  inset-inline-start: -16px;
  min-width: 200px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--c-white);
  border: 1px solid var(--c-grey);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(20, 32, 62, .1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 10;
}
.q-nav .q-has-sub:hover .q-sub,
.q-nav .q-has-sub:focus-within .q-sub { opacity: 1; visibility: visible; transform: none; }
.q-nav .q-sub a { display: block; padding: 9px 18px !important; color: var(--c-black) !important; font-size: 14px; }
.q-nav .q-sub a:hover { background: var(--c-soft); text-decoration: none !important; }
/* Menu mobile : les catégories sous « الأقسام », en retrait */
.q-menu__list .q-sub { list-style: none; margin: 0; padding: 0 16px 0 0; }
.q-menu__list .q-sub a { font-size: 14px; font-weight: 400; color: #333; padding: 10px 0; }
.q-menu__list .q-caret { display: none; }
.q-menu__panel { max-height: calc(100vh - 80px); overflow-y: auto; }

/* Fil d'Ariane et catégorie au-dessus du titre : retirés */
.woocommerce-breadcrumb,
.ast-breadcrumbs-wrapper,
.ast-breadcrumbs,
body.single-product .single-product-category { display: none !important; }

/* Icône panier / « choisir les options » d'Astra sur les cartes produit : retirée */
body ul.products .ast-on-card-button:not(.ast-onsale-card),
body ul.products .ast-select-options-trigger,
body ul.products .ast-card-action-tooltip,
body ul.products .added_to_cart { display: none !important; }

/* ============================================
   PAGE MERCI (commande reçue)
   ============================================ */
body.woocommerce-order-received .entry-header,
body.woocommerce-order-received .ast-archive-description { text-align: center; }
body.woocommerce-order-received .entry-title { font-size: 26px; font-weight: 700; }
body.woocommerce-order-received .woocommerce-order {
  max-width: 640px;
  margin: 0 auto 40px;
}
body.woocommerce-order-received .woocommerce-thankyou-order-received {
  position: relative;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--c-black);
  background: var(--c-soft);
  border-radius: 16px;
  padding: 88px 20px 24px;
  margin: 0 0 16px;
}
body.woocommerce-order-received .woocommerce-thankyou-order-received::before {
  content: "✓";
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-green);
  color: var(--c-white);
  font-size: 28px;
  line-height: 52px;
  font-weight: 700;
}
body.woocommerce-order-received ul.woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
body.woocommerce-order-received ul.woocommerce-order-overview li {
  float: none;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--c-grey) !important;
  border-radius: 12px;
  font-size: 12px;
  color: var(--c-muted);
  text-transform: none;
}
body.woocommerce-order-received ul.woocommerce-order-overview li strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  color: var(--c-navy);
}
body.woocommerce-order-received .woocommerce-order > p:not([class]) {
  text-align: center;
  background: #EAF6EF;
  color: #145C33;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 500;
}
body.woocommerce-order-received .woocommerce-order-details,
body.woocommerce-order-received .woocommerce-customer-details {
  border: 1px solid var(--c-grey);
  border-radius: 16px;
  padding: 18px 18px 6px;
  margin: 0 0 16px;
}
body.woocommerce-order-received .woocommerce-order-details__title,
body.woocommerce-order-received .woocommerce-column__title { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
body.woocommerce-order-received table.shop_table {
  border: 0 !important;
  border-radius: 0;
  margin: 0;
}
body.woocommerce-order-received table.shop_table th,
body.woocommerce-order-received table.shop_table td {
  border: 0 !important;
  border-bottom: 1px solid var(--c-grey) !important;
  padding: 12px 0 !important;
  background: none !important;
  font-size: 14px;
}
body.woocommerce-order-received table.shop_table thead { display: none; }
body.woocommerce-order-received table.shop_table td:last-child,
body.woocommerce-order-received table.shop_table th + td { text-align: left; }
body.woocommerce-order-received table.shop_table tfoot tr:last-child th,
body.woocommerce-order-received table.shop_table tfoot tr:last-child td { border-bottom: 0 !important; }
body.woocommerce-order-received table.shop_table tfoot tr:nth-last-child(2) td { color: var(--c-navy); font-weight: 700; font-size: 16px; }
body.woocommerce-order-received .woocommerce-customer-details address { border: 0; padding: 0; font-style: normal; line-height: 1.9; }
/* Page merci : message de Nizar (titre + lignes) ; ancien message d'instructions masqué */
body.woocommerce-order-received .woocommerce-thankyou-order-received { font-size: 15px; font-weight: 400; line-height: 1.9; }
.q-thanks__title { display: block; font-size: 24px; font-weight: 700; color: var(--c-navy); margin-bottom: 6px; }
.q-thanks__line { display: block; }
body.woocommerce-order-received .woocommerce-order > p:not([class]) { display: none; }body.woocommerce-order-received ul.woocommerce-order-overview::before,
body.woocommerce-order-received ul.woocommerce-order-overview::after { display: none !important; content: none !important; }
