/* ===================== */
/* الصفحة الفردية للمنتج */
/* ===================== */

body.single-product {
  background-color: #000;
  color: #fff;
}

body.single-product .woocommerce div.product {
  background-color: #111;
  padding: 30px;
  border-radius: 10px;
}

/* Remove global * color override — only apply to text elements */
body.single-product .woocommerce div.product h1,
body.single-product .woocommerce div.product h2,
body.single-product .woocommerce div.product h3,
body.single-product .woocommerce div.product h4,
body.single-product .woocommerce div.product h5,
body.single-product .woocommerce div.product h6,
body.single-product .woocommerce div.product p,
body.single-product .woocommerce div.product li,
body.single-product .woocommerce div.product span,
body.single-product .woocommerce div.product label,
body.single-product .woocommerce div.product strong {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.single-product .woocommerce div.product .product_title {
  font-size: 32px;
  margin-bottom: 20px;
}

body.single-product .woocommerce div.product .price {
  color: #0f0 !important;
  font-size: 24px;
  margin-bottom: 15px;
}

body.single-product .woocommerce div.product .woocommerce-product-details__short-description {
  font-size: 16px;
  margin-bottom: 20px;
  color: #fff !important;
}

body.single-product .woocommerce div.product .woocommerce-tabs,
body.single-product .woocommerce div.product .woocommerce-tabs * {
  color: #fff !important;
  background: transparent !important;
}

/* زر Add to Cart الأساسي */
body.single-product .woocommerce div.product form.cart .single_add_to_cart_button {
  background-color: #0f0 !important;
  color: #000 !important;
  padding: 10px 20px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
}

body.single-product .woocommerce div.product form.cart .single_add_to_cart_button:hover {
  background-color: #0c0 !important;
}

body.single-product .woocommerce div.product .product_meta {
  color: #ccc !important;
  font-size: 14px;
}

body.single-product .woocommerce div.product div.images img {
  border-radius: 10px;
  max-width: 100%;
}

body.single-product .woocommerce div.product a {
  color: #0f0 !important;
  text-decoration: none;
}

/* ============================= */
/* Override نصوص صفحة المنتج الفردي */
/* ============================= */
body.single-product.dark-mode .woocommerce div.product h2,
body.single-product.dark-mode .woocommerce div.product h3,
body.single-product.dark-mode .woocommerce div.product h4,
body.single-product.dark-mode .woocommerce div.product h5,
body.single-product.dark-mode .woocommerce div.product h6,
body.single-product.dark-mode .woocommerce div.product p,
body.single-product.dark-mode .woocommerce div.product li,
body.single-product.dark-mode .woocommerce div.product span:not(.woocommerce-loop-product__title):not(.add_to_cart_button span) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* روابط المنتج الرئيسي */
body.single-product .woocommerce div.product a,
body.single-product .woocommerce div.product a:hover {
  color: #0f0 !important;
}

/* الوصف الكامل والتقييم */
body.single-product .woocommerce-Tabs-panel--description,
body.single-product .woocommerce-Reviews {
  color: #fff !important;
}

/* ============================= */
/* Related Products — استثناءات */
/* ============================= */

body.single-product .related h2 {
  color: #fff !important;
}

body.single-product .related ul.products li.product h2.woocommerce-loop-product__title a {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

body.single-product .related ul.products li.product .woocommerce-loop-product__price,
body.single-product .related ul.products li.product .woocommerce-loop-product__price *,
body.single-product .related ul.products li.product .price,
body.single-product .related ul.products li.product .price * {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  background: transparent !important;
}

/* زر “Add to Cart” في المنتجات المرتبطة */
body.single-product .related ul.products li.product a.button.add_to_cart_button,
body.single-product .related ul.products li.product a.button.product_type_simple.add_to_cart_button,
body.single-product .related ul.products li.product a.button.ajax_add_to_cart {
  color: #000 !important;
  background: transparent !important;
  border: 2px solid #000 !important;
  padding: 10px 20px !important;
  font-weight: bold !important;
  display: inline-block !important;
  text-align: center;
  box-shadow: none !important;
  text-transform: none !important;
  transition: none !important;
}

/* Hover للحفاظ على النص الأسود */
body.single-product .related ul.products li.product a.button.add_to_cart_button:hover,
body.single-product .related ul.products li.product a.button.product_type_simple.add_to_cart_button:hover,
body.single-product .related ul.products li.product a.button.ajax_add_to_cart:hover {
  color: #000 !important;
  border-color: #000 !important;
  background: #fff !important;
}

/* ============================= */
/* استثناء أزرار وروابط إضافية */
/* ============================= */
body.single-product .back-to-shop,
body.single-product .woocommerce-return-to-shop a,
body.single-product .social-links a {
  color: initial !important;
  background: initial !important;
}

/* ——————————————————————————————— */
/* إجبار Related “Add to Cart” نص أسود في Dark‑Mode */
/* ——————————————————————————————— */
body.single-product.dark-mode .related ul.products li.product a.button.add_to_cart_button,
body.single-product.dark-mode .related ul.products li.product a.button.product_type_simple.add_to_cart_button,
body.single-product.dark-mode .related ul.products li.product a.button.ajax_add_to_cart,
body.single-product.dark-mode .related ul.products li.product a.button.add_to_cart_button *,
body.single-product.dark-mode .related ul.products li.product a.button.product_type_simple.add_to_cart_button *,
body.single-product.dark-mode .related ul.products li.product a.button.ajax_add_to_cart * {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

/* ——————————————————————————————— */
/* Fix main single‐product “Add to cart” */
/* ——————————————————————————————— */
body.single-product .woocommerce div.product form.cart .single_add_to_cart_button {
  background-color: #000 !important;  /* Black background */
  color: #fff !important;             /* White text */
  border: 2px solid transparent !important;
  padding: 10px 20px !important;
  font-weight: bold !important;
  border-radius: 5px !important;
  text-transform: uppercase !important;
  transition: none !important;
}

body.single-product .woocommerce div.product form.cart .single_add_to_cart_button:hover {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;      /* White border on hover */
}

/* ——————————————————————————————— */
/* 1) Main Single‑Product “Add to cart” always white border */
/* ——————————————————————————————— */
body.single-product .woocommerce div.product form.cart .single_add_to_cart_button {
  background-color: #000 !important; /* black background */
  color: #fff !important;            /* white text */
  border: 2px solid #fff !important; /* always-visible white border */
  padding: 10px 20px !important;
  font-weight: bold !important;
  border-radius: 5px !important;
  text-transform: uppercase !important;
  transition: none !important;       /* no animation */
}

/* keep exactly the same on hover */
body.single-product .woocommerce div.product form.cart .single_add_to_cart_button:hover {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

/* ——————————————————————————————— */
/* 2) Quantity input box styling */
/* ——————————————————————————————— */
body.single-product .woocommerce div.product form.cart .quantity input.qty {
  background-color: transparent !important; /* match the black container behind it */
  color: #fff !important;                    /* white text */
  border: 2px solid #fff !important;         /* white border */
  width: 60px !important;                    /* adjust width as needed */
  padding: 6px 8px !important;
  font-size: 1rem !important;
  text-align: center !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
}

/* keep the same on focus */
body.single-product .woocommerce div.product form.cart .quantity input.qty:focus {
  outline: none !important;
  border-color: #fff !important;
}

body.single-product {
  padding-top: 70px !important;  /* ← set this to your nav’s exact height */
  box-sizing: border-box !important;
}
