/*
 * Shain Store v1.0.91 — desktop product page hierarchy.
 * The RTL grid places the purchase/information card on the right, gallery on the left,
 * the custom Persian/English title directly below the gallery, and content below both.
 */
@media (min-width: 761px) {
  html body.single-product div.product.pt-single-product {
    display: grid !important;
    direction: rtl !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "summary gallery"
      "summary title"
      "content content" !important;
    align-items: start !important;
    gap: 20px 28px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    box-sizing: border-box !important;
  }

  html body.single-product div.product.pt-single-product > .ss-product-gallery {
    grid-area: gallery !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    align-self: start !important;
  }

  html body.single-product div.product.pt-single-product > .ss-product-title-under-gallery {
    display: block !important;
    grid-area: title !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 2px 2px 8px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  html body.single-product div.product.pt-single-product > .summary.entry-summary {
    grid-area: summary !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: clamp(18px, 2.2vw, 28px) !important;
    border: 1px solid #e7eaf0 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(20, 25, 35, .045) !important;
    box-sizing: border-box !important;
  }

  /* The custom title under the gallery already includes the rating and review count. */
  html body.single-product div.product.pt-single-product > .summary.entry-summary > .product_title,
  html body.single-product div.product.pt-single-product > .summary.entry-summary > .woocommerce-product-rating {
    display: none !important;
  }

  html body.single-product .ss-product-title-under-gallery h1 {
    margin: 0 !important;
    color: #20232b !important;
    font-size: clamp(22px, 2vw, 29px) !important;
    font-weight: 900 !important;
    line-height: 1.55 !important;
    overflow-wrap: anywhere !important;
  }

  html body.single-product .ss-product-title-under-gallery .ss-product-english-title {
    margin: 3px 0 0 !important;
    color: #747b88 !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
    direction: ltr !important;
    text-align: right !important;
    overflow-wrap: anywhere !important;
  }

  html body.single-product .ss-product-title-under-gallery .ss-product-title-rating {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 9px !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid #eef0f4 !important;
  }

  html body.single-product .ss-product-title-under-gallery .ss-product-title-rating .star-rating {
    float: none !important;
    margin: 0 !important;
  }

  html body.single-product .ss-product-title-under-gallery .ss-product-title-rating a {
    color: #697180 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
  }

  html body.single-product div.product.pt-single-product > .ss-product-content-sections {
    grid-area: content !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-top: 10px !important;
    box-sizing: border-box !important;
  }

  html body.single-product .summary.entry-summary > .price {
    margin: 0 !important;
    color: #b5122a !important;
    font-size: clamp(22px, 2.1vw, 29px) !important;
    font-weight: 900 !important;
    line-height: 1.6 !important;
  }

  html body.single-product .summary.entry-summary > .price del {
    color: #858b96 !important;
    font-size: .7em !important;
    font-weight: 500 !important;
  }

  html body.single-product .summary.entry-summary > .price ins {
    color: #b5122a !important;
    background: transparent !important;
    text-decoration: none !important;
  }

  html body.single-product .summary.entry-summary .woocommerce-product-details__short-description {
    margin: 0 !important;
    color: #606875 !important;
    font-size: 13px !important;
    line-height: 1.9 !important;
  }

  html body.single-product .summary.entry-summary form.cart {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 13px !important;
    border: 1px solid #f0e5e7 !important;
    border-radius: 14px !important;
    background: #fffafb !important;
    box-sizing: border-box !important;
  }

  html body.single-product .summary.entry-summary form.cart .variations {
    width: 100% !important;
    margin: 0 0 10px !important;
    border: 0 !important;
  }

  html body.single-product .summary.entry-summary form.cart .variations th,
  html body.single-product .summary.entry-summary form.cart .variations td {
    padding: 6px 0 !important;
    vertical-align: middle !important;
  }

  html body.single-product .summary.entry-summary form.cart .variations label {
    color: #414753 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
  }

  html body.single-product .summary.entry-summary form.cart .variations select {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 42px !important;
    border: 1px solid #dfe3e9 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-sizing: border-box !important;
  }

  html body.single-product .summary.entry-summary form.cart .single_add_to_cart_button {
    min-height: 46px !important;
    border-radius: 11px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
  }

  html body.single-product .summary.entry-summary .ss-product-key-highlights {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html body.single-product .summary.entry-summary .ss-product-key-highlight {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    min-width: 0 !important;
    padding: 9px 10px !important;
    border: 1px solid #eceef2 !important;
    border-radius: 10px !important;
    background: #f8f9fb !important;
    box-sizing: border-box !important;
  }

  html body.single-product .summary.entry-summary .ss-product-key-highlight b {
    color: #7a818e !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  html body.single-product .summary.entry-summary .ss-product-key-highlight span {
    width: 100% !important;
    color: #292e38 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1.7 !important;
    overflow-wrap: anywhere !important;
  }

  html body.single-product .summary.entry-summary .ss-product-service-features {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 12px 7px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }

  html body.single-product .summary.entry-summary .ss-product-service-features > div {
    flex-direction: column !important;
    gap: 5px !important;
    font-size: 10px !important;
  }

  html body.single-product .summary.entry-summary .pt-product-tools {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    margin: 0 !important;
  }

  html.ss-dark-mode body.single-product div.product.pt-single-product > .summary.entry-summary {
    background: #20232b !important;
    border-color: #383d49 !important;
    box-shadow: none !important;
  }

  html.ss-dark-mode body.single-product .ss-product-title-under-gallery h1 {
    color: #eceef3 !important;
  }

  html.ss-dark-mode body.single-product .ss-product-title-under-gallery .ss-product-english-title,
  html.ss-dark-mode body.single-product .ss-product-title-under-gallery .ss-product-title-rating a {
    color: #c6cbd5 !important;
  }

  html.ss-dark-mode body.single-product .summary.entry-summary form.cart {
    background: #252933 !important;
    border-color: #414653 !important;
  }

  html.ss-dark-mode body.single-product .summary.entry-summary .ss-product-key-highlight {
    background: #292d37 !important;
    border-color: #414653 !important;
  }

  html.ss-dark-mode body.single-product .summary.entry-summary .ss-product-key-highlight b {
    color: #b8beca !important;
  }

  html.ss-dark-mode body.single-product .summary.entry-summary .ss-product-key-highlight span {
    color: #f1f2f6 !important;
  }
}

/* Keep the established single-column mobile flow untouched. */
@media (max-width: 760px) {
  html body.single-product div.product.pt-single-product {
    grid-template-areas: none !important;
  }

  html body.single-product div.product.pt-single-product > .ss-product-gallery,
  html body.single-product div.product.pt-single-product > .ss-product-title-under-gallery,
  html body.single-product div.product.pt-single-product > .summary.entry-summary,
  html body.single-product div.product.pt-single-product > .ss-product-content-sections {
    grid-area: auto !important;
  }

  html body.single-product div.product.pt-single-product > .summary.entry-summary {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html.ss-dark-mode body.single-product div.product.pt-single-product > .summary.entry-summary {
    background: transparent !important;
  }

  html body.single-product .summary.entry-summary .ss-product-key-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin: 10px 0 !important;
  }

  html body.single-product .summary.entry-summary .ss-product-key-highlight {
    padding: 7px 6px !important;
  }

  html body.single-product .summary.entry-summary .ss-product-key-highlight b {
    font-size: 9px !important;
  }

  html body.single-product .summary.entry-summary .ss-product-key-highlight span {
    font-size: 10px !important;
  }
}
