/* استایل‌های فرانت‌اند */
.wcp-products-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
  grid-template-columns: repeat(4, 1fr) !important;
}

.wcp-product-item {
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 15px;
  transition: all 0.3s ease;
}

.wcp-product-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wcp-product-image {
  margin-bottom: 15px;
}

.wcp-product-image img {
  width: 100%;
  height: auto;
  border-radius: 3px;
}

.wcp-product-title {
  font-size: 18px;
  margin: 0 0 10px;
  font-weight: 600;
}

.wcp-product-excerpt {
  margin-bottom: 15px;
  color: #666;
}

.wcp-product-more {
  display: inline-block;
  padding: 8px 15px;
  background-color: #D13A4B;
  color: #fff !important;
  text-decoration: none;
  border-radius: 3px;
  transition: background-color 0.3s ease;
}



.wcp-product-more:hover {
  background-color: #9e2332;
}

/* پیکربندی محصول */
.wcp-product-configurator-wrapper {
  margin-top: 40px;
  border-top: 1px solid #eee;
  padding-top: 30px;
  text-align: center;
}

.wcp-product-configurator {
  margin-bottom: 30px;
  max-width: 500px;
  width: 100%;
  display: inline-block;
}

.wcp-product-configuration {
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 5px;
  background-color: #f9f9f9;
}

.wcp-feature-select {
  margin-bottom: 15px;
}

.wcp-feature-select label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.wcp-feature-dropdown {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.wcp-price-display {
  margin: 20px 0;
  padding: 10px;
  background-color: #f0f0f0;
  border-radius: 3px;
  font-size: 18px;
}

.wcp-price-label {
  font-weight: bold;
  margin-left: 10px;
}

.wcp-add-to-cart-button {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.wcp-add-to-cart-button:hover {
  background-color: #005177;
}

.wcp-add-to-cart-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* استایل‌های واکنش‌گرا */
@media (max-width: 768px) {
  .wcp-products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* پشتیبانی از RTL */
body.rtl .wcp-price-label {
  margin-right: 0;
  margin-left: 10px;
}

body.rtl .wcp-feature-select label,
body.rtl .wcp-product-title,
body.rtl .wcp-product-excerpt {
  text-align: right;
}

/* بهبود استایل‌های فرم پیکربندی */
.wcp-configuration-form {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.wcp-feature-select {
  margin-bottom: 20px;
}

.wcp-feature-select label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #444;
}

.wcp-feature-dropdown {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  font-size: 15px;
}

.wcp-price-display {
  margin: 25px 0;
  padding: 15px;
  background-color: #f0f0f0;
  border-radius: 4px;
  font-size: 20px;
  text-align: center;
}

.wcp-price-label {
  font-weight: bold;
  margin-left: 10px;
  color: #333;
}

.wcp-add-to-cart-button {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.wcp-add-to-cart-button:hover {
  background-color: #005177;
}

/* استایل برای حالت بارگذاری قیمت */
.wcp-price-value {
  display: inline-block;
  min-width: 100px;
}

/* اطمینان از اینکه پیکربندی محصول در قالب وردپرس به درستی نمایش داده شود */
.wcp-product-configurator-wrapper {
  clear: both;
  width: 100%;
}

.wcp-product-configuration h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #333;
}


/* استایل‌های جدول محصولات سفارشی در صفحه جزئیات سفارش */
.woocommerce-table--custom-products {
  margin-bottom: 30px;
}

.wcp-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wcp-feature-list li {
  margin-bottom: 5px;
}

/* استایل‌های ویژگی‌های محصول در پنل مدیریت */
.wcp-admin-features {
  margin-top: 10px;
  padding: 8px;
  background-color: #f8f8f8;
  border-radius: 3px;
  font-size: 12px;
}

.wcp-admin-feature {
  margin-bottom: 3px;
}

/* استایل‌های ستون محصولات سفارشی در صفحه "حساب من" */
.wcp-custom-product-count {
  display: inline-block;
  padding: 2px 6px;
  background-color: #0073aa;
  color: #fff;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
}

.wcp-no-custom-products {
  color: #999;
}


/* استایل‌های مودال آپلود تصویر */
.wcp-upload-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.wcp-upload-modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 80%;
  max-width: 600px;
  position: relative;
}

.wcp-upload-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.wcp-upload-modal-close:hover,
.wcp-upload-modal-close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.wcp-upload-description {
  margin-bottom: 20px;
  color: #666;
  line-height: 1.5;
}

.wcp-upload-field {
  margin-bottom: 20px;
}

.wcp-upload-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #444;
}

.wcp-upload-field input[type="file"] {
  display: block;
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.wcp-image-preview {
  margin-top: 10px;
  max-width: 100%;
  height: 150px;
  border: 1px dashed #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wcp-image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.wcp-upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.wcp-cancel-upload,
.wcp-confirm-upload {
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.wcp-cancel-upload {
  background-color: #f5f5f5;
  color: #333;
}

.wcp-confirm-upload {
  background-color: #0073aa;
  color: #fff;
}

.wcp-cancel-upload:hover {
  background-color: #e0e0e0;
}

.wcp-confirm-upload:hover {
  background-color: #005177;
}

.wcp-confirm-upload:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* استایل‌های تصاویر سفارش در پنل ادمین */
.wcp-order-images {
  margin-top: 15px;
}

.wcp-order-images-title {
  font-weight: bold;
  margin-bottom: 10px;
  color: #0073aa;
}

.wcp-order-images-container {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.wcp-order-image-item {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  width: calc(50% - 15px);
  box-sizing: border-box;
}

.wcp-order-image-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.wcp-order-image-preview {
  margin-bottom: 10px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wcp-order-image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.wcp-order-image-download {
  display: inline-block;
  padding: 5px 10px;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  font-size: 12px;
}

.wcp-order-image-download:hover {
  background-color: #005177;
}



/* استایل‌های دسته‌بندی‌ها */
.wcp-categories-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
}

.wcp-category-item {
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 15px;
  transition: all 0.3s ease;
}

.wcp-category-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wcp-category-image {
  margin-bottom: 15px;
  text-align: center;
}

.wcp-category-image img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: 3px;
}

.wcp-category-title {
  font-size: 18px;
  margin: 0 0 10px;
  text-align: center;
}

.wcp-category-excerpt {
  margin-bottom: 15px;
  color: #666;
}

.wcp-category-more {
  display: inline-block;
  padding: 8px 15px;
  background-color: #D13A4B;
  color: #fff !important;
  text-decoration: none;
  border-radius: 3px;
  transition: background-color 0.3s ease;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.wcp-category-more:hover {
  background-color: #005177;
}

/* استایل‌های صفحه دسته‌بندی */
.wcp-category-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 40px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 5px;
}

.wcp-category-header-content {
  flex: 1;
  padding-right: 30px;
}

.wcp-category-title {
  font-size: 28px;
  margin: 0 0 15px;
  color: #333;
}

.wcp-category-description {
  color: #666;
  line-height: 1.6;
}

.wcp-category-image {
  flex: 0 0 300px;
  text-align: center;
}

.wcp-category-image img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.wcp-products-title {
  font-size: 24px;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  color: #333;
}

.wcp-no-products {
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 5px;
  text-align: center;
  color: #666;
}

/* استایل‌های واکنش‌گرا برای صفحه دسته‌بندی */
@media (max-width: 768px) {
  .wcp-category-header {
    flex-direction: column;
  }

  .wcp-category-header-content {
    padding-right: 0;
    margin-bottom: 20px;
    order: 2;
  }

  .wcp-category-image {
    flex: 0 0 100%;
    margin-bottom: 20px;
    order: 1;
  }

  .wcp-categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .wcp-categories-grid,
  .wcp-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;

  }
}

/* پشتیبانی از RTL */
body.rtl .wcp-category-header-content {
  padding-right: 0;
  padding-left: 30px;
}

body.rtl .wcp-category-title,
body.rtl .wcp-category-excerpt,
body.rtl .wcp-products-title {
  text-align: right;
}


.MY-wcp-category-more {
  border: none;
  border-radius: 12px 30px 12px 30px;
}

.MY-wcp-category-more:hover {
  background-color: #750327;
}


.MY-wcp-category-item {
  margin: auto 10px;
  border: none;
  border-radius: 12px 40px 12px 40px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.MY-wcp-category-image img {
  border: none;
  border-radius: 5px 30px 5px 30px;
}