/**
 * RojaGold Theme - Global Font Overrides
 * این فایل فونت Peyda رو با PeydaFaNumWeb جایگزین می‌کنه
 */

/* Global Body & Root */
body,
html {
  font-family: 'PeydaFaNumWeb', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* All Elements - Fallback */
* {
  font-family: inherit;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
}

/* Paragraphs & Text */
p, span, div, a, li, td, th, label, input, textarea, select, button {
  font-family: 'PeydaFaNumWeb', sans-serif;
}

/* WordPress Admin */
.block-editor-writing-flow,
.editor-styles-wrapper,
.block-editor-block-list__layout {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
}

/* Override Peyda References */
[style*="font-family: 'Peyda"] {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
}

/* WooCommerce */
.woocommerce,
.woocommerce-page {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
}

/* Blocks */
.wp-block {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
}

/* =====================================
   Page Title Override
   عنوان صفحه را مخفی می‌کنیم چون در hero نمایش داده می‌شود
   ===================================== */
.page .wp-block-post-title {
  display: none !important;
}

/* =====================================
   Hero Full Width & Gradient
   تمام صفحات داخلی باید hero full-width داشته باشند
   ===================================== */

/* About Page Hero - Full Width */
.about-hero {
  width: 100vw !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.about-hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(34, 34, 34, 0.95) 100%
  ) !important;
}

/* Contact Page Hero - Full Width */
.contact-hero {
  width: 100vw !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.contact-hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(34, 34, 34, 0.95) 100%
  ) !important;
}

/* Agency Request Hero - Full Width */
.agency-hero {
  width: 100vw !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.agency-hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(34, 34, 34, 0.95) 100%
  ) !important;
}

/* Branches Page Hero - Full Width */
.branches-hero {
  width: 100vw !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.branches-hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(34, 34, 34, 0.95) 100%
  ) !important;
}

/* Brands Page Hero - Full Width */
.brands-hero {
  width: 100vw !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.brands-hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(34, 34, 34, 0.95) 100%
  ) !important;
}

/* Company Profile Hero - Full Width */
.company-hero {
  width: 100vw !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.company-hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(34, 34, 34, 0.95) 100%
  ) !important;
}

/* Catalogs Page Hero - Full Width */
.catalogs-hero {
  width: 100vw !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.catalogs-hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(34, 34, 34, 0.9) 100%
  ) !important;
}

/* =====================================
   Cart Savings Badge
   ===================================== */
.rojagold-savings-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.wc-block-cart-item__total-price-and-sale-badge-wrapper
  .wc-block-components-sale-badge,
.wc-block-components-product-badge.wc-block-components-sale-badge {
  margin-top: 4px !important;
  border: 1px solid #86efac !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.78em !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  text-transform: none !important;
  white-space: normal !important;
  color: #166534 !important;
  background: #dcfce7 !important;
  text-align: center !important;
  max-width: 100% !important;
}

.wc-block-components-sale-badge .rojagold-savings-label {
  color: #166534 !important;
}

.wc-block-components-sale-badge .rojagold-savings-amount {
  color: #14532d !important;
}

.wc-block-cart-item__total-price-and-sale-badge-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  max-width: 100% !important;
}

.wc-block-cart-item__prices {
  min-width: 0 !important;
}

.wc-block-components-product-name {
  overflow-wrap: anywhere !important;
}

@media (max-width: 768px) {
  .wc-block-cart-item {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    column-gap: 10px !important;
  }

  .wc-block-cart-item__image {
    width: 72px !important;
  }

  .wc-block-cart-item__product {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .wc-block-cart-item__prices,
  .wc-block-cart-item__total-price-and-sale-badge-wrapper {
    width: 100% !important;
    min-width: 0 !important;
  }

  .wc-block-components-product-badge.wc-block-components-sale-badge {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
    margin-inline-start: 0 !important;
  }

  .wc-block-components-formatted-money-amount {
    word-break: break-word !important;
  }

  .wc-block-cart-item__wrap,
  .wc-block-cart-item__product {
    overflow-x: hidden !important;
  }
}

/* =====================================
   Order Received (Thank You) Page
   ===================================== */
body.woocommerce-order-received .woocommerce-order {
  max-width: 1100px;
  margin: 24px auto 56px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

main.wp-block-woocommerce-checkout-order-received-block,
body.woocommerce-order-received main.wp-block-group {
  width: min(100% - 24px, 1100px) !important;
  margin: 18px auto 56px !important;
}

.wc-block-order-confirmation-status,
.wc-block-order-confirmation-summary,
.wc-block-order-confirmation-totals-wrapper,
.wc-block-order-confirmation-shipping-wrapper,
.wc-block-order-confirmation-billing-wrapper {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 16px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
  margin-bottom: 14px !important;
}

.wc-block-order-confirmation-status h1 {
  margin: 0 0 8px !important;
  color: #065f46 !important;
}

.wc-block-order-confirmation-status p {
  margin: 0 !important;
  color: #065f46 !important;
  font-weight: 600 !important;
}

.wc-block-order-confirmation-summary-list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.wc-block-order-confirmation-summary-list-item {
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  border-radius: 10px !important;
  padding: 10px !important;
}

.wc-block-order-confirmation-totals__table {
  width: 100% !important;
  border-collapse: collapse !important;
}

.wc-block-order-confirmation-totals__table th,
.wc-block-order-confirmation-totals__table td {
  border-bottom: 1px solid #edf2f7 !important;
  padding: 10px 8px !important;
}

@media (max-width: 768px) {
  .wc-block-order-confirmation-summary-list {
    grid-template-columns: 1fr 1fr !important;
  }
}

body.woocommerce-order-received .woocommerce,
body.woocommerce-page.woocommerce-order-received .woocommerce {
  width: min(100% - 24px, 1100px);
  margin: 20px auto 56px;
}

body.woocommerce-order-received .woocommerce-order,
body.woocommerce-page.woocommerce-order-received .woocommerce-order {
  width: 100%;
  box-sizing: border-box;
}

body.woocommerce-order-received .woocommerce-order > p:first-child,
body.woocommerce-order-received .woocommerce-notice--success,
body.woocommerce-order-received .woocommerce-thankyou-order-received {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-weight: 600;
}

body.woocommerce-order-received .woocommerce-thankyou-order-failed,
body.woocommerce-order-received .woocommerce-notice--error {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-weight: 600;
}

body.woocommerce-order-received ul.woocommerce-error {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  list-style: none;
}

body.woocommerce-order-received .woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

body.woocommerce-order-received .woocommerce-order-overview li {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

body.woocommerce-order-received .woocommerce-order-overview li strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
}

body.woocommerce-order-received .woocommerce-order-details,
body.woocommerce-order-received .woocommerce-customer-details {
  margin-top: 20px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

body.woocommerce-order-received .woocommerce-table--order-details {
  width: 100%;
  border-collapse: collapse;
}

body.woocommerce-order-received .woocommerce-table--order-details th,
body.woocommerce-order-received .woocommerce-table--order-details td {
  padding: 10px 8px;
  border-bottom: 1px solid #eef2f7;
}

body.woocommerce-order-received .woocommerce-order-details__title,
body.woocommerce-order-received .woocommerce-column__title {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

@media (max-width: 768px) {
  body.woocommerce-order-received .woocommerce-order {
    margin: 12px 12px 30px;
    padding: 14px;
    border-radius: 12px;
  }

  body.woocommerce-order-received .woocommerce-order-overview {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}
