/*
 * Single product page (WooCommerce + native demo preview)
 * Enqueued only on the pages that need it (see mshop_enqueue_conditional_styles()
 * in functions.php) to keep the CSS payload smaller on the rest of the site.
 * Loads after main.css, so it can safely build on the shared base styles.
 */

/* Product detail pages — native preview and WooCommerce */
.mshop-demo-product-page,
.mshop-woocommerce-product-page {
  padding-top: 28px;
}

.mshop-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #9a9fac;
  font-size: 11px;
  line-height: 1.8;
}

.mshop-breadcrumbs a {
  color: #6e7585;
  transition: color 0.2s ease;
}

.mshop-breadcrumbs a:hover {
  color: var(--mshop-accent);
}

.mshop-breadcrumbs > span[aria-hidden="true"] {
  color: #c2c5cd;
}

.mshop-single-product {
  min-width: 0;
}

.mshop-single-product__top {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 20px;
  align-items: stretch;
}

.mshop-single-product__gallery,
.mshop-single-product__summary {
  min-width: 0;
  border: 1px solid #e7e9ef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 13px 35px rgba(25, 33, 51, 0.035);
}

.mshop-single-product__gallery {
  position: relative;
  padding: 22px;
}

.mshop-product-main-image {
  position: relative;
  display: grid;
  min-height: 490px;
  overflow: hidden;
  place-items: center;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 38%, #fff 0, #f7f8fa 58%, #eef0f4 100%);
}

.mshop-product-main-image::after {
  position: absolute;
  bottom: 28px;
  width: 48%;
  height: 17px;
  border-radius: 50%;
  background: rgba(26, 35, 52, 0.12);
  filter: blur(11px);
  content: "";
}

.mshop-product-main-image img {
  position: relative;
  z-index: 2;
  width: min(83%, 590px);
  height: 430px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.mshop-product-image-orb {
  position: absolute;
  z-index: 1;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.14), rgba(225, 29, 72, 0) 68%);
}

.mshop-product-main-image .mshop-discount-badge {
  top: 18px;
  right: 18px;
  min-width: 52px;
  height: 31px;
  font-size: 11px;
}

.mshop-product-gallery-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid #edf0f4;
  border-radius: 13px;
  background: #fbfcfd;
}

.mshop-product-gallery-note__icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #fff0f3;
  color: var(--mshop-accent);
}

.mshop-product-gallery-note__icon .mshop-icon {
  width: 18px;
  height: 18px;
}

.mshop-product-gallery-note span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.mshop-product-gallery-note strong {
  color: #323949;
  font-size: 11px;
  font-weight: 850;
}

.mshop-product-gallery-note small {
  margin-top: 2px;
  color: #9a9fac;
  font-size: 9px;
}

.mshop-single-product__summary {
  padding: 30px 31px 25px;
}

.mshop-single-product__category,
.mshop-single-product__category a {
  color: #a0a5b1;
  font-size: 11px;
  font-weight: 750;
}

.mshop-single-product__category a:hover {
  color: var(--mshop-accent);
}

.mshop-single-product__summary h1,
.mshop-single-product__summary .product_title {
  margin: 9px 0 10px;
  color: #202838;
  font-size: clamp(24px, 2.25vw, 34px);
  font-weight: 950;
  letter-spacing: -0.6px;
  line-height: 1.6;
}

.mshop-single-product__rating,
.mshop-single-product__summary .woocommerce-product-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: #8b91a0;
  font-size: 10px;
}

.mshop-single-product__rating .mshop-rating,
.mshop-single-product__summary .star-rating {
  color: #e7a822;
}

.mshop-product-sku {
  color: #afb3bd;
  font-size: 9px;
}

.mshop-single-product__lead,
.mshop-single-product__summary .woocommerce-product-details__short-description {
  margin: 22px 0 0;
  color: #697181;
  font-size: 13px;
  line-height: 2.15;
}

.mshop-single-product__price-box {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding: 17px 0 18px;
  border-top: 1px solid #eef0f3;
  border-bottom: 1px solid #eef0f3;
}

.mshop-single-product__prices,
.mshop-single-product__summary p.price,
.mshop-single-product__summary span.price {
  display: flex;
  min-width: 0;
  flex-direction: column;
  color: #202838;
  line-height: 1.65;
}

.mshop-single-product__prices del,
.mshop-single-product__summary p.price del {
  color: #aeb3bd;
  font-size: 10px;
}

.mshop-single-product__prices strong,
.mshop-single-product__summary p.price ins,
.mshop-single-product__summary p.price > .woocommerce-Price-amount,
.mshop-single-product__summary span.price ins,
.mshop-single-product__summary span.price > .woocommerce-Price-amount {
  color: #202838;
  font-size: 23px;
  font-weight: 950;
  text-decoration: none;
}

.mshop-single-product__prices small,
.mshop-single-product__summary .woocommerce-Price-currencySymbol {
  color: #727987;
  font-size: 10px;
  font-weight: 750;
}

.mshop-single-product__availability {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #15936a;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.mshop-single-product__availability i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25b682;
  box-shadow: 0 0 0 4px rgba(37, 182, 130, 0.11);
}

.mshop-single-product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.mshop-button--soft {
  border-color: #e6e8ee;
  background: #f5f6f8;
  color: #333b4b;
}

.mshop-button--soft:hover {
  background: #eceef3;
}

.mshop-single-product__summary .cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 15px;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  background: #fbfcfd;
}

.mshop-single-product__summary .cart .quantity {
  margin: 0 !important;
}

.mshop-single-product__summary .cart .quantity .qty {
  width: 58px;
  min-height: 45px;
  padding: 7px;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.mshop-single-product__summary .variations {
  width: 100%;
  margin: 0 0 12px;
  border: 0;
}

.mshop-single-product__summary .variations td,
.mshop-single-product__summary .variations th {
  padding: 6px 0;
  border: 0;
  background: transparent;
  text-align: right;
}

.mshop-single-product__summary .variations label {
  color: #626a7a;
  font-size: 10px;
  font-weight: 800;
}

.mshop-single-product__summary .reset_variations {
  margin-right: 8px;
  color: #9a9fac;
  font-size: 9px;
}

.mshop-single-product__summary .single_add_to_cart_button {
  min-height: 45px;
  flex: 1 1 190px;
  border: 0;
  border-radius: 11px;
  background: var(--mshop-accent) !important;
  color: #fff !important;
  font-size: 12px;
  font-weight: 900;
}

.mshop-single-product__summary .single_add_to_cart_button:hover {
  background: var(--mshop-accent-dark) !important;
}

.mshop-single-product__summary .product_meta {
  margin-top: 18px;
  color: #9298a5;
  font-size: 10px;
  line-height: 2;
}

.mshop-single-product__summary .product_meta a {
  color: #656d7d;
}

.mshop-product-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 22px;
}

.mshop-product-trust-grid > div {
  display: flex;
  min-width: 0;
  padding: 11px 9px;
  flex-direction: column;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  background: #fcfcfd;
}

.mshop-product-trust-grid span {
  display: grid;
  width: 27px;
  height: 27px;
  margin-bottom: 7px;
  place-items: center;
  border-radius: 8px;
  background: #fff0f3;
  color: var(--mshop-accent);
}

.mshop-product-trust-grid .mshop-icon {
  width: 15px;
  height: 15px;
}

.mshop-product-trust-grid strong {
  overflow: hidden;
  color: #4b5363;
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mshop-product-trust-grid small {
  margin-top: 2px;
  overflow: hidden;
  color: #a0a5b0;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mshop-product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
  margin-top: 20px;
}

.mshop-product-description,
.mshop-product-support-card,
.mshop-product-specifications,
.mshop-single-product__below .woocommerce-tabs,
.mshop-single-product__below .upsells.products,
.mshop-single-product__below .related.products {
  border: 1px solid #e7e9ef;
  border-radius: 20px;
  background: #fff;
}

.mshop-product-description,
.mshop-product-specifications {
  padding: 26px 28px;
}

.mshop-product-detail-heading {
  margin-bottom: 14px;
}

.mshop-product-detail-heading > span {
  color: var(--mshop-accent);
  font-size: 10px;
  font-weight: 850;
}

.mshop-product-detail-heading h2 {
  margin: 4px 0 0;
  color: #252d3d;
  font-size: 22px;
  font-weight: 950;
}

.mshop-product-description__copy {
  color: #697181;
  font-size: 12px;
  line-height: 2.15;
}

.mshop-product-description__copy p {
  margin: 0;
}

.mshop-product-support-card {
  display: flex;
  padding: 25px 22px;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(145deg, #161d31, #273752);
  color: #fff;
}

.mshop-product-support-card__icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.12);
  color: #ff9daf;
}

.mshop-product-support-card__icon .mshop-icon {
  width: 20px;
  height: 20px;
}

.mshop-product-support-card strong {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.8;
}

.mshop-product-support-card p {
  margin: 7px 0 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  line-height: 1.9;
}

.mshop-product-support-card > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.mshop-product-support-card > a:hover {
  color: #ffb2c0;
}

.mshop-product-support-card > a .mshop-icon {
  width: 16px;
  height: 16px;
}

.mshop-product-specifications {
  margin-top: 20px;
}

.mshop-specs-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #eef0f4;
  border-radius: 13px;
}

.mshop-specs-table > div {
  display: grid;
  grid-template-columns: minmax(100px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid #eef0f4;
}

.mshop-specs-table > div:nth-child(odd) {
  border-left: 1px solid #eef0f4;
}

.mshop-specs-table > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.mshop-specs-table dt {
  color: #949aa8;
  font-size: 10px;
}

.mshop-specs-table dd {
  margin: 0;
  color: #3f4758;
  font-size: 10px;
  font-weight: 750;
}

.mshop-related-products {
  padding: 62px 0 35px;
}

.mshop-products-grid--related .mshop-product-card__image {
  min-height: 220px;
}

.mshop-products-grid--related .mshop-product-card__image img {
  height: 190px;
}

.mshop-products-grid--related .mshop-product-card h3 {
  min-height: 45px;
}

/* WooCommerce's generated gallery and summary inherit the native layout. */
.mshop-single-product__gallery .woocommerce-product-gallery {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.mshop-single-product__gallery .woocommerce-product-gallery__wrapper {
  margin: 0;
}

.mshop-single-product__gallery .woocommerce-product-gallery__image {
  position: relative;
  display: grid;
  min-height: 490px;
  overflow: hidden;
  place-items: center;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 38%, #fff 0, #f7f8fa 58%, #eef0f4 100%);
}

.mshop-single-product__gallery .woocommerce-product-gallery__image::after {
  position: absolute;
  bottom: 28px;
  width: 48%;
  height: 17px;
  border-radius: 50%;
  background: rgba(26, 35, 52, 0.12);
  filter: blur(11px);
  content: "";
}

.mshop-single-product__gallery .woocommerce-product-gallery__image img {
  position: relative;
  z-index: 2;
  max-height: 430px;
  object-fit: contain;
  border-radius: 0;
  mix-blend-mode: multiply;
}

.mshop-single-product__gallery .flex-control-thumbs {
  display: flex;
  gap: 10px;
  margin: 14px 0 0 !important;
  padding: 0 0 2px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.mshop-single-product__gallery .flex-control-thumbs li {
  width: 64px !important;
  flex: 0 0 auto;
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid #e5e8ee;
  border-radius: 10px;
  background: #f8f9fb;
  scroll-snap-align: start;
}

.mshop-single-product__gallery .flex-control-thumbs li img {
  margin: 0;
  opacity: 0.62;
}

.mshop-single-product__gallery .flex-control-thumbs li img.flex-active,
.mshop-single-product__gallery .flex-control-thumbs li img:hover {
  opacity: 1;
}

.mshop-single-product__gallery .onsale {
  position: absolute;
  z-index: 4;
  top: 18px;
  right: 18px;
  min-width: 52px;
  height: 31px;
  margin: 0;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--mshop-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 31px;
}

.mshop-single-product__summary.summary {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}

.mshop-single-product__summary .woocommerce-product-rating {
  margin: 0;
}

.mshop-single-product__summary .woocommerce-product-rating .star-rating {
  float: none;
  margin: 0;
}

.mshop-single-product__summary .price {
  margin: 24px 0 0;
  padding: 17px 0 18px;
  border-top: 1px solid #eef0f3;
  border-bottom: 1px solid #eef0f3;
}

.mshop-single-product__below {
  margin-top: 20px;
}

.mshop-single-product__below .woocommerce-tabs,
.mshop-single-product__below .upsells.products,
.mshop-single-product__below .related.products {
  margin: 0 0 20px;
  padding: 25px 28px;
}

.mshop-single-product__below .woocommerce-tabs ul.tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 21px !important;
  padding: 0 0 13px !important;
  border-bottom: 1px solid #edf0f4;
}

.mshop-single-product__below .woocommerce-tabs ul.tabs::before,
.mshop-single-product__below .woocommerce-tabs ul.tabs::after {
  display: none !important;
}

.mshop-single-product__below .woocommerce-tabs ul.tabs li {
  margin: 0 !important;
  padding: 7px 13px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #8e94a2 !important;
  font-size: 11px;
}

.mshop-single-product__below .woocommerce-tabs ul.tabs li.active,
.mshop-single-product__below .woocommerce-tabs ul.tabs li:hover {
  background: #fff0f3 !important;
  color: var(--mshop-accent) !important;
}

.mshop-single-product__below .woocommerce-tabs .panel {
  margin: 0;
  color: #697181;
  font-size: 12px;
  line-height: 2.1;
}

.mshop-single-product__below .woocommerce-tabs .panel h2 {
  margin-top: 0;
  color: #2e3647;
  font-size: 18px;
}

/*
 * "مشخصات" tab (WooCommerce's "Additional information" tab, renamed via
 * mshop_rename_additional_information_tab() in functions.php) — the
 * product attributes table WooCommerce renders with zero styling of its
 * own. table-layout: fixed + percentage column widths keep it a proper
 * two-column table (label | value) at every viewport width, mobile
 * included, instead of the browser default of squeezing/overflowing an
 * unstyled table on a narrow screen.
 */
.mshop-single-product__below .woocommerce-product-attributes {
  width: 100%;
  margin: 0;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  border-collapse: collapse;
  table-layout: fixed;
  overflow: hidden;
}

.mshop-single-product__below .woocommerce-product-attributes-item__label,
.mshop-single-product__below .woocommerce-product-attributes-item__value {
  padding: 14px 18px;
  border-bottom: 1px solid #edf0f4;
  font-size: 12.5px;
  line-height: 1.9;
  text-align: right;
  vertical-align: top;
  word-break: break-word;
}

.mshop-single-product__below .woocommerce-product-attributes-item:last-child .woocommerce-product-attributes-item__label,
.mshop-single-product__below .woocommerce-product-attributes-item:last-child .woocommerce-product-attributes-item__value {
  border-bottom: 0;
}

.mshop-single-product__below .woocommerce-product-attributes-item:nth-child(even) {
  background: #fafafc;
}

.mshop-single-product__below .woocommerce-product-attributes-item__label {
  width: 36%;
  background: #f9fafb;
  color: #667085;
  font-weight: 800;
}

.mshop-single-product__below .woocommerce-product-attributes-item__value {
  width: 64%;
  color: #202838;
  font-weight: 600;
}

.mshop-single-product__below .woocommerce-product-attributes-item__value p {
  margin: 0;
}

/* WooCommerce product reviews (star rating + comment list + review form).
 * This deliberately restyles WooCommerce's own default markup/classes
 * instead of overriding its templates (reviews.php / review.php /
 * review-meta.php), matching the "hooks & CSS over template forks"
 * approach already used elsewhere in this file and in functions.php. */
.mshop-single-product__below .woocommerce-Reviews-title {
  margin: 0 0 18px;
  color: #2e3647;
  font-size: 18px;
  font-weight: 900;
}

.mshop-single-product__below .woocommerce-noreviews {
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px dashed #dfe2e8;
  border-radius: 12px;
  background: #fafafc;
  color: #667085;
  font-size: 12.5px;
}

.mshop-single-product__below ol.commentlist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.mshop-single-product__below ol.commentlist ol.children {
  margin: 14px 0 0;
  padding-inline-start: 32px;
  list-style: none;
}

.mshop-single-product__below ol.commentlist .comment_container {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
}

.mshop-single-product__below ol.commentlist .comment_container > img {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #edf0f4;
}

.mshop-single-product__below .comment-text {
  flex: 1;
  min-width: 0;
}

.mshop-single-product__below .comment-text .star-rating {
  margin: 0 0 8px;
  font-size: 13px;
}

.mshop-single-product__below .star-rating::before {
  color: #e3e6ec;
}

.mshop-single-product__below .star-rating span::before {
  color: #f7ab00;
}

.mshop-single-product__below .comment-text p.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}

.mshop-single-product__below .woocommerce-review__author {
  color: #202838;
  font-size: 13px;
  font-weight: 800;
}

.mshop-single-product__below .woocommerce-review__dash {
  color: #c2c7d1;
}

.mshop-single-product__below .woocommerce-review__published-date {
  color: #9298a5;
  font-size: 10.5px;
  font-style: normal;
}

.mshop-single-product__below .woocommerce-review__verified {
  color: #16a34a;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
}

.mshop-single-product__below .woocommerce-review__awaiting-approval {
  color: var(--mshop-accent);
  font-size: 11.5px;
  font-style: normal;
}

.mshop-single-product__below .comment-text .description p {
  margin: 0;
  color: #5f6676;
  font-size: 13px;
  line-height: 1.9;
}

.mshop-single-product__below .comment-text .description p:last-child {
  margin-bottom: 0;
}

.mshop-single-product__below nav.woocommerce-pagination {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.mshop-single-product__below nav.woocommerce-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mshop-single-product__below nav.woocommerce-pagination .page-numbers {
  display: grid;
  min-width: 38px;
  height: 38px;
  border: 1px solid #e8eaf0;
  border-radius: 10px;
  background: #fff;
  color: #4a5164;
  font-size: 12.5px;
  font-weight: 700;
  place-items: center;
}

.mshop-single-product__below nav.woocommerce-pagination a.page-numbers:hover {
  border-color: var(--mshop-accent);
  color: var(--mshop-accent);
}

.mshop-single-product__below nav.woocommerce-pagination .page-numbers.current {
  border-color: var(--mshop-accent);
  background: var(--mshop-accent);
  color: #fff;
}

/* Review / comment submission form. */
.mshop-single-product__below #review_form_wrapper {
  padding: 20px;
  border: 1px solid #edf0f4;
  border-radius: 16px;
  background: #fafafc;
}

.mshop-single-product__below #reply-title,
.mshop-single-product__below .comment-reply-title {
  display: block;
  margin: 0 0 16px;
  color: #202838;
  font-size: 16px;
  font-weight: 900;
}

.mshop-single-product__below .comment-form-rating,
.mshop-single-product__below .comment-form-comment,
.mshop-single-product__below .comment-form-author,
.mshop-single-product__below .comment-form-email {
  margin: 0 0 16px;
}

.mshop-single-product__below .comment-form-rating label,
.mshop-single-product__below .comment-form-comment label,
.mshop-single-product__below .comment-form-author label,
.mshop-single-product__below .comment-form-email label {
  display: block;
  margin-bottom: 7px;
  color: #343b4b;
  font-size: 12.5px;
  font-weight: 750;
}

.mshop-single-product__below .required {
  color: var(--mshop-accent);
  text-decoration: none;
}

.mshop-single-product__below .comment-form-rating select#rating,
.mshop-single-product__below .comment-form-comment textarea,
.mshop-single-product__below .comment-form-author input,
.mshop-single-product__below .comment-form-email input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid #dfe2e8;
  border-radius: 10px;
  background: #fff;
  color: #202838;
  font-size: 13px;
  transition: border-color 0.2s ease;
}

.mshop-single-product__below .comment-form-rating select#rating {
  max-width: 220px;
}

.mshop-single-product__below .comment-form-comment textarea {
  min-height: 130px;
  resize: vertical;
}

.mshop-single-product__below .comment-form-rating select#rating:focus,
.mshop-single-product__below .comment-form-comment textarea:focus,
.mshop-single-product__below .comment-form-author input:focus,
.mshop-single-product__below .comment-form-email input:focus {
  border-color: var(--mshop-accent);
  outline: none;
}

.mshop-single-product__below p.form-submit {
  margin: 0;
}

.mshop-single-product__below p.form-submit #submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
  border: 0;
  border-radius: 10px;
  background: var(--mshop-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mshop-single-product__below p.form-submit #submit:hover {
  background: var(--mshop-accent-dark);
}

.mshop-single-product__below .woocommerce-verification-required,
.mshop-single-product__below p.must-log-in,
.mshop-single-product__below .comment-notes,
.mshop-single-product__below .logged-in-as {
  margin: 0 0 14px;
  color: #667085;
  font-size: 12px;
}

.mshop-single-product__below .logged-in-as a {
  color: var(--mshop-accent);
}

/* Compare & wishlist toggles on the single product page (pill buttons, next to the trust grid). */
.mshop-single-product__compare {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.mshop-single-product__summary .mshop-compare-toggle,
.mshop-single-product__summary .mshop-wishlist-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid #e8eaf0;
  border-radius: 999px;
  background: #fff;
  color: #4a5164;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.mshop-single-product__summary .mshop-compare-toggle .mshop-icon,
.mshop-single-product__summary .mshop-wishlist-toggle .mshop-icon {
  width: 17px;
  height: 17px;
}

.mshop-single-product__summary .mshop-compare-toggle:hover,
.mshop-single-product__summary .mshop-wishlist-toggle:hover {
  border-color: var(--mshop-accent);
  color: var(--mshop-accent);
}

.mshop-single-product__summary .mshop-compare-toggle.is-active,
.mshop-single-product__summary .mshop-wishlist-toggle.is-active {
  border-color: var(--mshop-accent);
  background: var(--mshop-accent);
  color: #fff;
}

/* "بازدیدهای اخیر شما" section, below the related-products block. */
.mshop-recently-viewed {
  margin-top: 43px;
}

.mshop-single-product__below .related.products > h2,
.mshop-single-product__below .upsells.products > h2 {
  margin: 0 0 17px;
  color: #2b3343;
  font-size: 20px;
  font-weight: 950;
}

.mshop-single-product__below ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 !important;
  padding: 0;
}

.mshop-single-product__below ul.products::before,
.mshop-single-product__below ul.products::after {
  display: none !important;
}

.mshop-single-product__below ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  padding: 13px !important;
  border: 1px solid #e8eaf0;
  border-radius: 15px;
  background: #fff;
}

.mshop-single-product__below ul.products li.product a img {
  margin: 0 0 9px;
  border-radius: 10px;
  background: #f6f7f9;
}

.mshop-single-product__below ul.products li.product .woocommerce-loop-product__title {
  min-height: 42px;
  padding: 0;
  color: #343b4b;
  font-size: 11px;
  line-height: 1.8;
}

.mshop-single-product__below ul.products li.product .price {
  margin: 7px 0 0;
  padding: 0;
  border: 0;
  font-size: 11px;
}

@media (max-width: 900px) {
  .mshop-single-product__top {
    grid-template-columns: 1fr;
  }

  .mshop-product-main-image,
  .mshop-single-product__gallery .woocommerce-product-gallery__image {
    min-height: 430px;
  }

  .mshop-product-main-image img,
  .mshop-single-product__gallery .woocommerce-product-gallery__image img {
    height: 370px;
    max-height: 370px;
  }

  .mshop-product-detail-grid {
    grid-template-columns: 1fr;
  }

  .mshop-product-support-card {
    min-height: 200px;
  }

  .mshop-single-product__below ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .mshop-demo-product-page,
  .mshop-woocommerce-product-page {
    padding-top: 18px;
  }

  .mshop-breadcrumbs {
    margin-bottom: 13px;
    font-size: 9px;
  }

  .mshop-single-product__gallery {
    padding: 12px;
    border-radius: 18px;
  }

  .mshop-single-product__summary {
    padding: 21px 18px 18px;
    border-radius: 18px;
  }

  .mshop-product-main-image,
  .mshop-single-product__gallery .woocommerce-product-gallery__image {
    min-height: 330px;
    border-radius: 13px;
  }

  .mshop-product-main-image img,
  .mshop-single-product__gallery .woocommerce-product-gallery__image img {
    width: 86%;
    height: 285px;
    max-height: 285px;
  }

  .mshop-product-main-image .mshop-discount-badge,
  .mshop-single-product__gallery .onsale {
    top: 11px;
    right: 11px;
  }

  .mshop-single-product__summary h1,
  .mshop-single-product__summary .product_title {
    font-size: 22px;
  }

  .mshop-single-product__lead,
  .mshop-single-product__summary .woocommerce-product-details__short-description {
    font-size: 11px;
  }

  .mshop-single-product__price-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .mshop-single-product__actions .mshop-button {
    width: 100%;
  }

  .mshop-product-trust-grid {
    grid-template-columns: 1fr;
  }

  .mshop-product-trust-grid > div {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    padding: 9px 10px;
  }

  .mshop-product-trust-grid span {
    grid-row: 1 / -1;
    margin: 0;
  }

  .mshop-product-description,
  .mshop-product-specifications,
  .mshop-single-product__below .woocommerce-tabs,
  .mshop-single-product__below .upsells.products,
  .mshop-single-product__below .related.products {
    padding: 20px 16px;
    border-radius: 17px;
  }

  .mshop-product-detail-heading h2 {
    font-size: 19px;
  }

  /* "مشخصات" table stays a real 2-column table on mobile too (see the
   * unconditional .woocommerce-product-attributes rules above) — this only
   * shrinks the padding/font so both columns comfortably fit a phone
   * screen without the table needing to scroll horizontally. */
  .mshop-single-product__below .woocommerce-product-attributes-item__label,
  .mshop-single-product__below .woocommerce-product-attributes-item__value {
    padding: 10px 12px;
    font-size: 11.5px;
    line-height: 1.8;
  }

  .mshop-single-product__below .woocommerce-product-attributes-item__label {
    width: 40%;
  }

  .mshop-single-product__below .woocommerce-product-attributes-item__value {
    width: 60%;
  }

  .mshop-specs-table {
    grid-template-columns: 1fr;
  }

  .mshop-specs-table > div,
  .mshop-specs-table > div:nth-child(odd),
  .mshop-specs-table > div:nth-last-child(-n + 2) {
    grid-template-columns: 0.72fr 1.28fr;
    border-left: 0;
    border-bottom: 1px solid #eef0f4;
  }

  .mshop-specs-table > div:last-child {
    border-bottom: 0;
  }

  .mshop-related-products {
    padding-top: 43px;
  }

  .mshop-products-grid--related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mshop-products-grid--related .mshop-product-card__image {
    min-height: 170px;
  }

  .mshop-products-grid--related .mshop-product-card__image img {
    height: 150px;
  }

  .mshop-single-product__below ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mshop-single-product__below .woocommerce-tabs ul.tabs {
    overflow-x: auto;
    white-space: nowrap;
  }

  .mshop-single-product__compare {
    flex-direction: column;
  }

  .mshop-single-product__summary .mshop-compare-toggle,
  .mshop-single-product__summary .mshop-wishlist-toggle {
    width: 100%;
    justify-content: center;
  }

  .mshop-single-product__below ol.commentlist .comment_container {
    padding: 12px 14px;
  }

  .mshop-single-product__below ol.commentlist .comment_container > img {
    width: 36px;
    height: 36px;
  }

  .mshop-single-product__below ol.commentlist ol.children {
    padding-inline-start: 16px;
  }

  .mshop-single-product__below #review_form_wrapper {
    padding: 16px;
  }
}

/*
 * "توضیحات" (description) tab only — see
 * woocommerce/single-product/tabs/description.php. Collapsed to a fixed
 * height with a bottom fade mask; assets/js/main.js's
 * initDescriptionReadMore() reveals the toggle button only when the content
 * actually overflows this height, and flips [data-expanded] on click. The
 * "مشخصات" (additional information) and "دیدگاه‌ها" (reviews) tabs are
 * untouched WooCommerce stock templates — this rule only ever matches
 * .mshop-description, which only this one tab's template prints.
 */
.mshop-description__content {
  position: relative;
  overflow: hidden;
  max-height: 280px;
}

.mshop-description[data-expanded="true"] .mshop-description__content {
  max-height: none;
}

.mshop-description__content::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 70px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}

.mshop-description[data-expanded="true"] .mshop-description__content::after {
  display: none;
}

.mshop-description__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 18px;
  border: 1.5px solid var(--mshop-accent);
  border-radius: 10px;
  background: #fff;
  color: var(--mshop-accent);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mshop-description__toggle:hover {
  background: var(--mshop-accent);
  color: #fff;
}

.mshop-description__toggle-icon {
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
}

.mshop-description[data-expanded="true"] .mshop-description__toggle-icon {
  transform: rotate(90deg);
}

