/*
Theme Name: YAQEEN BIRDS PRO
Theme URI: https://yaqeenbirds.com/
Author: YAQEEN BIRDS
Description: الثيم المعتمد لمتجر YAQEEN BIRDS لبيع مستلزمات الطيور والحيوانات في بلدية سطيف.
Version: 2.2.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: yaqeen-birds-pro
*/

:root {
  --yq-primary-blue: #0284c7;
  --yq-primary-navy: #0f2942;
  --yq-accent-orange: #f59e0b;
  --yq-accent-orange-hover: #d97706;
  --yq-bg-light: #eef7ff;
  --yq-card-border: #e2e8f0;
  --yq-footer-bg: #0d3b4c;
  --yq-font-main: 'Cairo', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--yq-font-main);
  background-color: #ffffff;
  color: var(--yq-primary-navy);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

.yq-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   1. الهيدر وشريط البحث (Header & Search)
   ============================================================ */
.yq-header {
  background: #ffffff;
  border-bottom: 1px solid var(--yq-card-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

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

.yq-logo-text {
  font-size: 24px;
  font-weight: 900;
  color: var(--yq-primary-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.yq-nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.yq-nav-menu a {
  text-decoration: none;
  color: var(--yq-primary-navy);
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s;
}

.yq-nav-menu a:hover,
.yq-nav-menu .active a {
  color: var(--yq-accent-orange);
}

.yq-search-box {
  flex: 1;
  max-width: 380px;
  position: relative;
}

.yq-search-box input {
  width: 100%;
  height: 42px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0 42px 0 16px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
}

.yq-search-box input:focus {
  border-color: var(--yq-primary-blue);
  background: #ffffff;
}

.yq-search-box .yq-search-icon {
  position: absolute;
  right: 14px;
  top: 11px;
  color: #94a3b8;
}

.yq-header-btns {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yq-btn-login {
  background: var(--yq-primary-blue);
  color: #ffffff !important;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
}

.yq-cart-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yq-primary-blue);
  position: relative;
  text-decoration: none;
}

.yq-cart-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  background: var(--yq-accent-orange);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   2. البانر الرئيسي (Hero Section)
   ============================================================ */
.yq-hero {
  background: linear-gradient(135deg, #eef7ff 0%, #ffffff 100%);
  padding: 44px 0 24px;
}

.yq-hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.yq-hero-text {
  flex: 1;
  max-width: 580px;
}

.yq-hero-title {
  font-size: 44px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--yq-primary-navy);
  margin: 0 0 16px;
}

.yq-hero-sub {
  font-size: 18px;
  color: #334155;
  margin: 0 0 24px;
  font-weight: 600;
}

.yq-hero-cta {
  background: var(--yq-accent-orange);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  padding: 12px 36px;
  border-radius: 9999px;
  display: inline-block;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s, background 0.2s;
}

.yq-hero-cta:hover {
  transform: translateY(-2px);
  background: var(--yq-accent-orange-hover);
}

.yq-hero-img-box {
  flex: 1;
  display: flex;
  justify-content: center;
}

.yq-hero-img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  filter: drop-shadow(0 10px 25px rgba(2, 132, 199, 0.15));
}

/* ============================================================
   3. قسم الفئات الرئيسية (Categories)
   ============================================================ */
.yq-categories-sec {
  padding: 40px 0 20px;
}

.yq-sec-title {
  font-size: 30px;
  font-weight: 900;
  color: var(--yq-primary-navy);
  margin: 0 0 32px;
  text-align: center;
}

.yq-sec-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--yq-accent-orange);
  border-radius: 4px;
  margin: 10px auto 0 auto;
}

.yq-cat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.yq-cat-card {
  border-radius: 18px;
  padding: 18px 12px 14px;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
}

.yq-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.yq-cat-blue { background: #0284c7; }
.yq-cat-orange { background: #f59e0b; }
.yq-cat-light { background: #e0f2fe; color: #0369a1; }
.yq-cat-cyan { background: #06b6d4; }
.yq-cat-white { background: #f8fafc; color: #334155; border: 1px solid #cbd5e1; }

.yq-cat-icon {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 8px;
}

.yq-cat-label {
  font-size: 15px;
  font-weight: 700;
}

/* ============================================================
   4. شبكة وبطاقات المنتجات (الرئيسية + صفحات الفئات والمتجر)
   ============================================================ */
.yq-products-sec {
  background: #f8fbfe;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 50px 0 60px;
  margin: 30px 0;
}

.yq-prod-grid,
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 22px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.yq-prod-card,
.woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 18px !important;
  padding: 16px !important;
  box-shadow: 0 6px 20px rgba(15, 41, 66, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.yq-prod-card:hover,
.woocommerce ul.products li.product:hover {
  transform: translateY(-5px) !important;
  border-color: #bae6fd !important;
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.14) !important;
}

.yq-prod-thumb {
  height: 240px;
  background: #ffffff;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
}

.yq-prod-thumb img,
.woocommerce ul.products li.product a img {
  max-height: 220px !important;
  width: 100% !important;
  object-fit: contain !important;
  transition: transform 0.3s ease !important;
  border-radius: 12px;
}

.yq-prod-card:hover .yq-prod-thumb img,
.woocommerce ul.products li.product:hover a img {
  transform: scale(1.06) !important;
}

.yq-badge-sale,
.woocommerce span.onsale {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.4 !important;
  z-index: 2 !important;
}

.yq-prod-rating {
  color: #f59e0b;
  font-size: 13px;
  margin-bottom: 4px;
}

.yq-prod-name,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #0f2942 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  height: 42px !important;
  overflow: hidden !important;
}

.yq-prod-price,
.woocommerce ul.products li.product .price {
  font-size: 19px !important;
  font-weight: 900 !important;
  color: #0284c7 !important;
  margin-bottom: 14px !important;
  margin-top: auto !important;
  display: block !important;
}

.yq-btn-buy,
.woocommerce ul.products li.product .button {
  background: #f59e0b !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  padding: 12px 0 !important;
  border-radius: 10px !important;
  text-align: center !important;
  display: block !important;
  width: 100% !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.28) !important;
  transition: all 0.2s ease !important;
}

.yq-btn-buy:hover,
.woocommerce ul.products li.product .button:hover {
  background: #d97706 !important;
  transform: translateY(-2px) !important;
}

/* ============================================================
   5. معرض صور صفحة المنتج المفرد (Single Product Gallery)
   ============================================================ */
.woocommerce-product-gallery .flex-control-thumbs {
  display: flex !important;
  gap: 10px !important;
  margin-top: 14px !important;
  padding: 0 !important;
  list-style: none !important;
}

.woocommerce-product-gallery .flex-control-thumbs li {
  width: 65px !important;
  height: 65px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  border: 1px solid #e2e8f0 !important;
  cursor: pointer !important;
}

.woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
.woocommerce-product-gallery .flex-control-thumbs li:hover {
  border: 2px solid #22c55e !important;
  border-radius: 10px !important;
}

/* ============================================================
   6. آراء العملاء، شريط الثقة، والتذييل (Reviews & Footer)
   ============================================================ */
.yq-reviews-sec {
  background: #f8fafc;
  padding: 40px 0;
}

.yq-rev-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.yq-rev-card {
  background: #ffffff;
  border: 1px solid var(--yq-card-border);
  border-radius: 16px;
  padding: 20px;
  font-size: 13.5px;
  line-height: 1.6;
}

.yq-trust-bar {
  background: #0284c7;
  color: #ffffff;
  padding: 16px 0;
}

.yq-trust-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-weight: 700;
  font-size: 14px;
}

.yq-footer {
  background: var(--yq-footer-bg);
  color: #cbd5e1;
  padding: 40px 0 20px;
  font-size: 13.5px;
}

.yq-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.yq-footer h4 {
  color: #ffffff;
  font-size: 16px;
  margin: 0 0 14px;
}

.yq-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.yq-footer ul li {
  margin-bottom: 8px;
}

.yq-footer ul a {
  color: #94a3b8;
  text-decoration: none;
}

.yq-footer-bottom {
  text-align: center;
  padding-top: 18px;
  font-size: 12px;
  color: #64748b;
}

/* ============================================================
   7. صفحة إتمام الطلب الاحترافية (Checkout)
   ============================================================ */
.woocommerce-checkout {
  max-width: 1200px !important;
  margin: 30px auto !important;
  padding: 0 16px !important;
}

form.checkout {
  display: grid !important;
  grid-template-columns: 1.2fr 0.9fr !important;
  gap: 30px !important;
  align-items: flex-start !important;
}

#customer_details {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 24px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

#customer_details h3 {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #0f2942 !important;
  margin: 0 0 18px !important;
  border-bottom: 2px solid #eef7ff !important;
  padding-bottom: 10px !important;
}

.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout select {
  height: 46px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 0 14px !important;
  font-family: inherit !important;
  font-size: 14px !important;
  background-color: #f8fafc !important;
  width: 100% !important;
  outline: none !important;
  transition: border-color 0.2s, background 0.2s !important;
}

.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus {
  border-color: #0284c7 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.woocommerce-checkout label {
  font-weight: 700 !important;
  font-size: 13.5px !important;
  color: #1e293b !important;
  margin-bottom: 6px !important;
  display: block !important;
}

#order_review_heading {
  display: none !important;
}

#order_review {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 24px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

table.woocommerce-checkout-review-order-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-bottom: 20px !important;
}

table.woocommerce-checkout-review-order-table th,
table.woocommerce-checkout-review-order-table td {
  padding: 12px 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-size: 14px !important;
}

table.woocommerce-checkout-review-order-table .order-total {
  font-size: 18px !important;
  font-weight: 900 !important;
  color: #0284c7 !important;
}

#place_order {
  background-color: #f59e0b !important;
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  width: 100% !important;
  padding: 14px 0 !important;
  border-radius: 12px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35) !important;
  transition: background-color 0.2s, transform 0.2s !important;
}

#place_order:hover {
  background-color: #d97706 !important;
  transform: translateY(-2px) !important;
}

/* ============================================================
   8. التجاوب الكامل مع الهواتف (Mobile Responsive)
   ============================================================ */
@media (max-width: 768px) {
  body {
    padding-bottom: 65px;
  }

  .yq-header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 0;
  }

  .yq-nav, .yq-btn-login {
    display: none;
  }

  .yq-search-box {
    width: 100%;
    max-width: 100%;
    order: 3;
  }

  .yq-hero-grid {
    flex-direction: column-reverse;
    text-align: center;
  }

  .yq-hero-title {
    font-size: 26px;
  }

  .yq-cat-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 8px;
  }

  .yq-cat-card {
    flex: 0 0 100px;
    scroll-snap-align: start;
  }

  .yq-prod-grid,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .yq-prod-thumb {
    height: 175px !important;
  }

  .yq-prod-thumb img,
  .woocommerce ul.products li.product a img {
    max-height: 160px !important;
  }

  .yq-rev-grid,
  .yq-footer-grid,
  form.checkout {
    grid-template-columns: 1fr !important;
  }

  .yq-trust-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .yq-mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  }

  .yq-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
  }
}

@media (min-width: 769px) {
  .yq-mobile-bottom-bar {
    display: none;
  }
}
/* ============================================================
   القائمة المنسدلة للفروع عند تمرير الفأرة على بطاقات الفئات
   ============================================================ */
.yq-cat-wrapper {
  position: relative;
  z-index: 20;
}

.yq-cat-wrapper:hover {
  z-index: 50;
}

/* حاوية القائمة المخفية افتراضياً */
.yq-cat-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  margin-top: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 16px 35px rgba(15, 41, 66, 0.14);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99;
}

/* إظهار القائمة بسلاسة عند تمرير الفأرة */
.yq-cat-wrapper:hover .yq-cat-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* جسر غير مرئي لمنع اختفاء القائمة أثناء تحريك الفأرة للأسفل */
.yq-cat-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

/* سهم صغير يشير للأعلى */
.yq-dropdown-arrow {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
}

.yq-subcat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.yq-subcat-list li {
  margin-bottom: 2px;
}

.yq-subcat-list li:last-child {
  margin-bottom: 0;
}

.yq-subcat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  color: #0f2942;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.yq-subcat-list a .yq-sub-arrow {
  color: #94a3b8;
  font-size: 13px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.yq-subcat-list a:hover {
  background: #eef7ff;
  color: #0284c7;
}

.yq-subcat-list a:hover .yq-sub-arrow {
  color: #0284c7;
  transform: translateX(-3px);
}

/* في الهاتف: نكتفي بالتمرير الأفقي وتفتح الفروع داخل صفحة القسم */
@media (max-width: 768px) {
  .yq-cat-wrapper {
    flex: 0 0 105px;
    scroll-snap-align: start;
  }
  .yq-cat-dropdown {
    display: none !important;
  }
}
/* ============================================================
   تنسيق نموذج الطلب السريع داخل صفحة المنتج (Quick Order)
   ============================================================ */
.yq-quick-order-box {
  background: #f8fbfe;
  border: 2px solid #bae6fd;
  border-radius: 16px;
  padding: 18px;
  margin: 18px 0;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.08);
}

.yq-qo-header {
  font-size: 16px;
  font-weight: 900;
  color: #0f2942;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #e2e8f0;
}

.yq-qo-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.yq-qo-field {
  flex: 1;
  margin-bottom: 8px;
}

.yq-qo-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.yq-qo-field input,
.yq-qo-field select {
  width: 100%;
  height: 42px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13.5px;
  background: #ffffff;
  color: #0f2942;
  outline: none;
}

.yq-qo-field input:focus,
.yq-qo-field select:focus {
  border-color: #0284c7;
}

.yq-readonly-input {
  background: #eef7ff !important;
  font-weight: 800;
  color: #0284c7 !important;
  cursor: default;
}

.yq-qo-submit-btn {
  width: 100%;
  background: #f59e0b;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  padding: 13px 0;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
  transition: background 0.2s, transform 0.2s;
}

.yq-qo-submit-btn:hover {
  background: #d97706;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .yq-qo-row {
    flex-direction: column;
    gap: 0;
  }
}
/* ============================================================
   القائمة المنسدلة للحيوانات الأليفة في الشريط العلوي (Header Dropdown)
   ============================================================ */
.yq-nav-menu li.yq-has-dropdown {
  position: relative;
}

.yq-nav-caret {
  font-size: 11px;
  margin-right: 3px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.yq-has-dropdown:hover .yq-nav-caret {
  transform: rotate(180deg);
}

.yq-nav-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 190px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 41, 66, 0.14);
  list-style: none;
  margin: 12px 0 0 0;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.22s ease;
  z-index: 999;
}

.yq-nav-dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.yq-has-dropdown:hover .yq-nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.yq-nav-dropdown li {
  margin-bottom: 2px;
}

.yq-nav-dropdown li:last-child {
  margin-bottom: 0;
}

.yq-nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #0f2942 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.yq-nav-dropdown a:hover {
  background: #eef7ff;
  color: #0284c7 !important;
}
/* ============================================================
   تنسيق صفحة المتجر الاحترافية (Shop Archive Layout)
   ============================================================ */

/* 1. توسيط الصفحة ومنع التصاق العنوان والبطاقات بحواف الشاشة */
.woocommerce-page .site-content,
.post-type-archive-product .site-content {
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 28px 20px 50px !important;
}

/* 2. عنوان المتجر (المتجر / اسم الفئة) */
.woocommerce-products-header {
  margin-bottom: 20px !important;
}

.woocommerce-products-header__title.page-title {
  font-size: 32px !important;
  font-weight: 900 !important;
  color: #0f2942 !important;
  margin: 0 0 8px !important;
  position: relative !important;
  display: inline-block !important;
}

.woocommerce-products-header__title.page-title::after {
  content: '';
  display: block;
  width: 55px;
  height: 4px;
  background: #f59e0b;
  border-radius: 4px;
  margin-top: 8px;
}

/* 3. شريط أدوات الفرز والنتائج */
.yq-shop-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 12px 18px !important;
  margin-bottom: 24px !important;
  box-shadow: 0 2px 10px rgba(15, 41, 66, 0.03) !important;
}

.woocommerce .woocommerce-result-count {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  float: none !important;
}

.woocommerce .woocommerce-ordering {
  margin: 0 !important;
  float: none !important;
}

.woocommerce .woocommerce-ordering select.orderby {
  height: 40px !important;
  padding: 0 14px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background-color: #f8fafc !important;
  color: #0f2942 !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
}

.woocommerce .woocommerce-ordering select.orderby:focus {
  border-color: #0284c7 !important;
  background-color: #ffffff !important;
}

/* 4. ضبط بطاقات المنتجات داخل المتجر بـ 4 أعمدة متساوية تماماً */
.woocommerce ul.products li.product {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  text-align: right !important;
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  text-decoration: none !important;
}

.woocommerce ul.products li.product a img {
  height: 220px !important;
  width: 100% !important;
  object-fit: contain !important;
  background: #ffffff !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 12px !important;
  padding: 8px !important;
  margin-bottom: 12px !important;
}

/* 5. ترقيم الصفحات السفلي (Pagination) */
.woocommerce nav.woocommerce-pagination {
  margin-top: 36px !important;
  text-align: center !important;
}

.woocommerce nav.woocommerce-pagination ul {
  border: none !important;
  display: inline-flex !important;
  gap: 8px !important;
}

.woocommerce nav.woocommerce-pagination ul li {
  border: none !important;
  float: none !important;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #0f2942 !important;
  font-weight: 800 !important;
  font-size: 14px !important;
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}

/* 6. التجاوب مع الهاتف في صفحة المتجر */
@media (max-width: 768px) {
  .woocommerce-page .site-content,
  .post-type-archive-product .site-content {
    padding: 16px 12px 70px !important;
  }
  .woocommerce-products-header__title.page-title {
    font-size: 24px !important;
  }
  .yq-shop-toolbar {
    padding: 10px 12px !important;
  }
  .woocommerce .woocommerce-ordering,
  .woocommerce .woocommerce-ordering select.orderby {
    width: 100% !important;
  }
  .woocommerce ul.products li.product a img {
    height: 160px !important;
  }
}
/* إزالة العنصر المخفي من WooCommerce الذي يحجز الخانة الأولى في الشبكة */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
ul.products::before,
ul.products::after {
  content: none !important;
  display: none !important;
}

/* فرض بدء المنتجات من العمود الأول وتثبيت 4 أعمدة متساوية */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
}

@media (max-width: 768px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}