/* ------------------ تنظیمات پایه و متغیرهای رنگ ------------------ */
:root {
  --primary-color: #355e3b;
  --accent-color: #F4A259;
  --background-color:#F9F9F9;
  --section-bg: #E5ECEC;
  --text-color: #d49701;
  --link-color: #007B7B;
  --success-color: #5BBE7E;
  --danger-color: #D9534F;
  --product-bg: #355e3b; /* رنگ پس‌زمینه قالب اجناس */
}

/* راست‌چینی کل صفحه */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: "Vazir", sans-serif;
  direction: rtl;
  text-align: right;
}

/* هدر */
header, #header {
  background-color: var(--primary-color);
  color: white;
  direction: rtl;
  text-align: right;
}

/* دکمه اصلی */
.button, .btn-primary {
  background-color: var(--accent-color);
  color: white;
  border-radius: 8px;
  padding: 10px 20px;
  text-align: center;
  font-family: "Vazir", sans-serif;
}

.button:hover {
  background-color: #e89540;
}

/* لینک‌ها */
a {
  color: var(--link-color);
  text-decoration: none;
  direction: rtl;
}

a:hover {
  text-decoration: underline;
}

/* بخش‌ها */
.section {
  background-color: var(--section-bg);
  padding: 20px;
  border-radius: 12px;
  direction: rtl;
  text-align: right;
}

/* هشدارها */
.alert-success {
  background-color: var(--success-color);
  color: white;
  direction: rtl;
  text-align: right;
}

.alert-danger {
  background-color: var(--danger-color);
  color: white;
  direction: rtl;
  text-align: right;
}

/* ------------------ کانتینر کلی دو ستون عکس و اطلاعات محصول ------------------ */
.product-container {
  display: flex;
  flex-wrap: wrap;
  direction: rtl;
  text-align: right;
}

/* عکس محصول سمت راست */
.product-container > .col-md-6:first-child {
  order: 2 !important;
  width: 40% !important;
}

/* اطلاعات محصول سمت چپ */
.product-container > .col-md-6:last-child {
  order: 1 !important;
  width: 60% !important;
}

/* تب توضیحات محصول */
#product .tabs {
  order: 3;
  width: 170%;
  margin-top: 50px;
}

#product .tabs .tab-content {
  width: 100%;
  direction: rtl;
  text-align: right;
}

/* حالت موبایل */
@media (max-width: 768px) {
  .product-container > .col-md-6 {
    width: 100% !important;
    order: unset !important;
  }
}

/* رنگ لینک‌ها در هدر */
#header,
#header a,
.header-top,
.header-top a,
.header-nav,
.header-nav a {
  color: #000000 !important;
  direction: rtl;
}

/* رنگ هاور لینک‌ها در هدر */
#header a:hover,
.header-top a:hover,
.header-nav a:hover {
  color: #ff2e11 !important;
}

/* رنگ واحد پولی */
.currency-selector,
.currency-selector a,
.currency-selector span,
#_desktop_currency_selector,
#_desktop_currency_selector a {
  color: #000000 !important;
  direction: rtl;
}

/* ------------------ باکس محصول ------------------ */
.product-miniature {
  background-color: var(--product-bg);
  border: 2px solid #d49701;
  border-radius: 10px;
  padding: 15px;
  margin: 15px;
  box-shadow: 0 2px 10px rgba(255, 127, 31, 0.1);
  transition: all 0.3s ease-in-out;
  text-align: right;
  direction: rtl;
  word-break: break-word;
  font-family: "Vazir", sans-serif;
  color: var(--text-color);
}

.product-miniature:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 20px rgba(255, 127, 31, 0.3);
}

/* راست‌چینی کامل مشخصات محصول */
.product-information,
.product-details,
.product-container,
#product .product-information,
#product .product-details {
  direction: rtl;
  text-align: right;
}

/* راست‌چینی قیمت و دکمه‌ها */
.product-prices,
.product-actions {
  direction: rtl;
  text-align: right;
}

/* عنوان محصول */
h1.h1,
.product-title,
.product-name {
  direction: rtl;
  text-align: right;
  font-family: "Vazir", sans-serif;
  color: var(--text-color);
}

/* توضیحات کوتاه محصول */
.product-short-description,
.product-desc {
  direction: rtl;
  text-align: right;
  font-family: "Vazir", sans-serif;
  color: var(--text-color);
}

/* توضیحات طولانی در تب‌ها */
#tab-description,
#tab-additional_information {
  direction: rtl;
  text-align: right;
  font-family: "Vazir", sans-serif;
  color: var(--text-color);
}

/* عنوان شاخه‌ها و دسته‌بندی‌ها */
.category-name,
.breadcrumb,
.breadcrumb a {
  direction: rtl;
  text-align: right;
  font-family: "Vazir", sans-serif;
  color: var(--text-color);
}

/* لیست محصولات در شاخه‌ها */
.product-list,
.product-list .product-miniature {
  direction: rtl;
  text-align: right;
}

/* دکمه‌ها در بخش محصولات */
button,
input[type="button"],
input[type="submit"] {
  direction: rtl;
  text-align: center;
  font-family: "Vazir", sans-serif;
}

/* تنظیمات اضافی برای ورودی‌ها */
input, select, textarea {
  direction: rtl;
  text-align: right;
  font-family: "Vazir", sans-serif;
}

/* ------------------ فوتر ------------------ */
footer,
#footer,
.footer-container {
  background-color: var(--product-bg) !important;
  padding: 20px;
}

/* ترتیب ستون‌ها در دسکتاپ */
.footer-container .row {
  display: flex;
  flex-wrap: wrap;
  direction: ltr; /* ترتیب واقعی ستون‌ها */
}

/* کنترل جای ستون‌ها */
.footer-container .col-account { order: 1; text-align: right; }
.footer-container .col-store   { order: 2; text-align: right; }
.footer-container .col-other   { order: 3; text-align: right; }

/* متن ستون اطلاعات فروشگاه چپ‌چین */
.footer-container .col-store {
  direction: ltr;
  text-align: left;
}

/* حالت موبایل */
@media (max-width: 768px) {
  .footer-container .row {
    flex-direction: column;
    direction: rtl; /* برگرد به حالت عادی فارسی */
    align-items: center;
  }
  .footer-container .col-account,
  .footer-container .col-store,
  .footer-container .col-other {
    order: unset;
    text-align: center;
    direction: rtl;
  }
  
  /* رنگ لینک‌ها در هدر */
#header,
#header a,
.header-top,
.header-top a,
.header-nav,
.header-nav a {
  color: #ffffff !important;
}

/* لینک های فوتر */
#footer,
#footer a,
.footer-container,
.footer-container a {
    color: #ffffff !important;
}

#footer h3,
#footer h4,
#footer h5,
.footer-container h3,
.footer-container h4,
.footer-container h5 {
    color: #ffffff !important;
}

.footer-after,
.copyright,
.block-copyright,
#footer .copyright,
#footer .block-copyright {
    color: #ffffff !important;
}

/* رنگ لینک‌ها در هدر */
#header,
#header a,
.header-top,
.header-top a,
.header-nav,
.header-nav a {
  color: #ffffff !important;
}

}

#footer p,
#footer span,
#footer small,
.footer-container p,
.footer-container span,
.footer-container small {
    color: #ffffff !important;
}