/* ══════════════════════════════════════════
   SINGLE PRODUCT
══════════════════════════════════════════ */
.sp-breadcrumb {
  font-size: .8rem; color: var(--muted);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.sp-breadcrumb a { color: var(--primary); }
.sp-breadcrumb a:hover { text-decoration: underline; }
.sp-breadcrumb span { color: var(--muted); }

.sp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px; margin-bottom: 44px;
}

.sp-main-img-wrap {
  aspect-ratio: 1; border-radius: var(--radius);
  overflow: hidden; border: 1.5px solid var(--border);
  background: var(--light-bg);
  display: flex; align-items: center; justify-content: center;
}
.sp-main-img-wrap img { width:100%; height:100%; object-fit:contain; padding:16px; transition: transform .4s; }
.sp-main-img-wrap img:hover { transform: scale(1.04); }

.sp-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sp-thumb {
  width: 62px; height: 62px; object-fit: cover;
  border-radius: 8px; border: 2px solid var(--border);
  cursor: pointer; transition: border-color var(--transition);
}
.sp-thumb.active, .sp-thumb:hover { border-color: var(--primary); }

.sp-title { font-size: 1.4rem; font-weight: 900; color: var(--text); margin: 8px 0 14px; line-height: 1.4; }

.sp-short-desc {
  font-size: .88rem; color: var(--muted); line-height: 1.8;
  margin-bottom: 20px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.sp-price-wrap { margin-bottom: 12px; font-size: 1.4rem; font-weight: 900; color: var(--primary); }
.sp-price-wrap .woocommerce-Price-amount { color: var(--primary); }
.sp-price-wrap del  { color: var(--muted); font-size: .88rem; font-weight: 500; }
.sp-price-wrap ins  { text-decoration: none; }

.sp-stock {
  font-size: .82rem; font-weight: 700; margin-bottom: 18px;
  padding: 7px 14px; border-radius: 100px; display: inline-block;
}
.sp-stock.in-stock  { background: #e8f8ee; color: #1a8a3f; }
.sp-stock.out-stock { background: #fdecea; color: #c0392b; }

/* WooCommerce quantity + button */
.woocommerce .quantity { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; }
.woocommerce .quantity input {
  width: 56px; text-align: center;
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 8px; font-size: .9rem; outline: none;
  transition: border-color var(--transition);
}
.woocommerce .quantity input:focus { border-color: var(--secondary); }

.woocommerce form.cart .button,
.woocommerce form.cart button {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important; border: none !important;
  border-radius: 100px !important; padding: 12px 26px !important;
  font-family: var(--font) !important; font-size: .95rem !important;
  font-weight: 800 !important; cursor: pointer !important;
  transition: opacity var(--transition) !important;
}
.woocommerce form.cart .button:hover { opacity: .9 !important; }

.sp-attrs {
  margin-top: 24px; border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.sp-attrs-title {
  font-size: .85rem; font-weight: 800; color: var(--primary);
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--light-bg);
}

/* توضیحات کامل */
.sp-full-desc {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 40px;
}
.sp-desc-content { font-size: .9rem; line-height: 1.9; color: var(--text); }
.sp-desc-content h2, .sp-desc-content h3 { color: var(--primary); margin: 16px 0 8px; }

/* محصولات مرتبط */
.related.products > h2 {
  font-size: 1.05rem; font-weight: 900; color: var(--primary);
  margin-bottom: 18px; padding-bottom: 8px; border-bottom: 2px solid var(--border);
}
.related.products ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px,1fr));
  gap: 16px;
}
.related.products ul.products li.product {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
}
.related.products ul.products li.product:hover {
  border-color: var(--secondary); box-shadow: var(--shadow); transform: translateY(-3px);
}
.related.products ul.products li.product img { width:100%; aspect-ratio:4/3; object-fit:cover; }
.related.products ul.products li.product .woocommerce-loop-product__title {
  font-size:.88rem; font-weight:800; padding:12px 12px 4px; color:var(--text);
}
.related.products ul.products li.product .price {
  padding:0 12px 10px; font-weight:800; color:var(--primary); font-size:.88rem;
}
.related.products ul.products li.product .button {
  display:block; margin:0 12px 12px; text-align:center;
  background:var(--primary); color:#fff; border-radius:100px;
  padding:7px; font-size:.8rem; font-weight:700;
  transition:background var(--transition);
}
.related.products ul.products li.product .button:hover { background:var(--primary-dk); color:#fff; }

/* ══════════════════════════════════════════
   CART / CHECKOUT / ACCOUNT PAGES
══════════════════════════════════════════ */
.woo-page-wrap { max-width: 900px; margin: 0 auto; }

.woo-page-title {
  font-size: 1.4rem; font-weight: 900; color: var(--primary);
  margin-bottom: 26px; padding-bottom: 12px; border-bottom: 2px solid var(--border);
}

.woo-btn {
  display: inline-block; background: var(--primary); color: #fff;
  border-radius: 100px; padding: 11px 26px; font-weight: 700; font-size: .88rem;
  transition: background var(--transition);
}
.woo-btn:hover { background: var(--primary-dk); color: #fff; }

/* جدول سبد */
table.shop_table {
  width: 100%; border-collapse: collapse;
  border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
table.shop_table th {
  background: var(--light-bg); padding: 12px 16px;
  font-size: .82rem; font-weight: 800; color: var(--primary);
  border-bottom: 1.5px solid var(--border); text-align: right;
}
table.shop_table td {
  padding: 12px 16px; font-size: .86rem;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
table.shop_table tbody tr:last-child td { border-bottom: none; }
table.shop_table .product-thumbnail img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background: var(--primary) !important; color: #fff !important;
  border-radius: 100px !important; font-family: var(--font) !important;
  font-weight: 700 !important; padding: 10px 20px !important;
  font-size: .88rem !important; border: none !important;
  transition: background var(--transition) !important; cursor: pointer !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover { background: var(--primary-dk) !important; color: #fff !important; }
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #respond input#submit.alt {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

/* coupon */
.coupon { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.coupon input {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 9px 14px; font-size: .86rem; outline: none;
  transition: border-color var(--transition);
}
.coupon input:focus { border-color: var(--secondary); }

.actions {
  background: var(--light-bg); padding: 14px 16px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* cart totals */
.cart-collaterals { display: flex; justify-content: flex-end; margin-top: 28px; }
.cart_totals, .woocommerce .cart_totals {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 22px; min-width: 300px;
}
.cart_totals h2 { font-size: .95rem; font-weight: 900; color: var(--primary); margin-bottom: 14px; }
table.shop_table.shop_table_responsive.totals th { font-size: .82rem; color: var(--muted); font-weight: 600; }
.woocommerce-Price-amount { color: var(--primary) !important; font-weight: 800 !important; }
a.checkout-button.button.alt.wc-forward {
  width: 100%; text-align: center; display: block;
  margin-top: 14px; padding: 13px !important; font-size: .95rem !important;
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

/* checkout form */
.woocommerce form .form-row label { font-size: .85rem; font-weight: 700; color: var(--text); display: block; margin-bottom: 4px; }
.woocommerce form .form-row input,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: var(--font); font-size: .88rem; direction: rtl; outline: none;
  transition: border-color var(--transition);
}
.woocommerce form .form-row input:focus,
.woocommerce form .form-row select:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(64,193,199,.12); }

/* order received */
.woocommerce-order-received .woocommerce-thankyou-order-details {
  background: var(--light-bg); border-radius: var(--radius); padding: 20px;
}

/* ══════════════════════════════════════════
   PAGE / 404
══════════════════════════════════════════ */
.page-content { font-size: .9rem; line-height: 1.9; color: var(--text); }
.page-content h2 { color: var(--primary); margin: 18px 0 8px; }

/* ══════════════════════════════════════════
   SINGLE PRODUCT – RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .sp-grid { grid-template-columns: 1fr; gap: 22px; }
  .sp-title { font-size: 1.15rem; }
  .woo-page-wrap { padding: 0; }
  .cart-collaterals { flex-direction: column; }
  .cart_totals, .woocommerce .cart_totals { min-width: auto; width: 100%; }
  table.shop_table { font-size: .8rem; }
  table.shop_table th, table.shop_table td { padding: 9px 10px; }
}

/* ══════════════════════════════════════════
   THANK YOU PAGE
══════════════════════════════════════════ */
.thankyou-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 48px 36px;
  text-align: center;
  max-width: 620px;
  margin: 40px auto;
  box-shadow: var(--shadow);
}
.thankyou-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(0,124,145,.25);
}
.thankyou-title { font-size: 1.4rem; font-weight: 900; color: var(--text); margin-bottom: 8px; }
.thankyou-sub   { font-size: .9rem; color: var(--muted); margin-bottom: 28px; }

.order-details-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 28px;
  text-align: right;
}
.order-detail-item {
  background: var(--light-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
}
.detail-label { font-size: .75rem; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.detail-value { font-size: .9rem; font-weight: 800; color: var(--text); }

.thankyou-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 480px) {
  .thankyou-box { padding: 32px 20px; }
  .order-details-grid { grid-template-columns: 1fr; }
}
