/* Single Product V1 responsive */

@media (max-width: 1100px) {
  .rr-product__related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rr-product__services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .rr-product__main {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .rr-product__desc-grid { grid-template-columns: minmax(0, 1fr); }
  .rr-product__actions {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .rr-product__wish { grid-column: 1 / -1; }
  .rr-product__sticky { display: block; }
  .rr-product { padding-bottom: 96px; }
  .rr-product__buy,
  .rr-product__gallery {
    min-width: 0;
    max-width: 100%;
  }
  .rr-product__title { max-width: none; }
  body.single-product .woocommerce-notices-wrapper .woocommerce-message,
  body.single-product .woocommerce-notices-wrapper .woocommerce-info,
  body.single-product .woocommerce-notices-wrapper .woocommerce-error {
    flex-direction: column;
    align-items: flex-start;
  }
  body.single-product .woocommerce-message .button,
  .rr-product .woocommerce-message .button {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }
}

@media (max-width: 720px) {
  .rr-product__wrap {
    width: min(100% - 24px, var(--rr-product-max));
    max-width: 100%;
    box-sizing: border-box;
  }
  .rr-product__gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .rr-product__thumbs-col { order: 2; }
  .rr-product__stage { order: 1; max-width: 100%; }
  .rr-product__thumbs {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .rr-product__thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
  }
  .rr-product__thumbs-more { display: none; }
  .rr-product__main-img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
  .rr-product__breadcrumb {
    font-size: 12px;
    white-space: nowrap;
    overflow-x: auto;
    flex-wrap: nowrap;
    max-width: 100%;
  }
  .rr-product__title {
    font-size: clamp(22px, 7vw, 28px);
    word-break: break-word;
  }
  .rr-product__price,
  .rr-product__price-row {
    font-size: 24px;
  }
  .rr-product__features-grid { grid-template-columns: minmax(0, 1fr); }
  .rr-product__related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .rr-product__panels { padding: 20px 14px; }
  .rr-product__tabs {
    padding: 0 12px;
    gap: 0 14px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .rr-product__tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  /* Keep × always visible; hide side nav on narrow phones only via 430px */
  .rr-product__lightbox {
    padding: 64px 16px 24px;
  }
  .rr-product__lightbox-close {
    width: 48px;
    height: 48px;
    font-size: 30px;
  }

  /* Native Woo cart / Buy Now stack cleanly */
  .rr-product__cart form.cart {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .rr-product__cart form.variations_form .single_variation_wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .rr-product__cart .quantity {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
  }
  .rr-product__cart .quantity.rr-product__quantity--stepper {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }
  .rr-product__cart .quantity .qty,
  .rr-product__qty-btn {
    min-height: 48px;
  }
  .rr-product__highlight {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .rr-product__panel .comment-form #submit,
  .rr-product__panel .comment-form input[type="submit"] {
    width: 100%;
  }
  .rr-product__cart .single_add_to_cart_button,
  .rr-product__cart .button.alt,
  .rr-product__cart .button,
  .rr-product__cart a.button,
  .rr-product__cart [class*="buy-now"] {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    justify-content: center;
  }
  .rr-product__spec-table,
  .rr-product__desc-copy,
  .rr-product__panels {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .rr-product__cart form.variations_form select {
    max-width: 100%;
  }
  .rr-product__sticky-inner {
    gap: 10px;
  }
  .rr-product__atc--sticky {
    flex: 0 0 auto;
    min-width: 120px;
  }
}

@media (max-width: 430px) {
  .rr-product__wrap {
    width: min(100% - 20px, var(--rr-product-max));
  }
  .rr-product__meta-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .rr-product__related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rr-product__lightbox-nav { display: none; }
}

@media (max-width: 380px) {
  .rr-product__actions { grid-template-columns: minmax(0, 1fr); }
  .rr-product__qty { width: 100%; grid-template-columns: 1fr 1.2fr 1fr; }
  .rr-product__services { grid-template-columns: 1fr 1fr; gap: 10px; }
}

@media (max-width: 320px) {
  .rr-product__related-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.rr-product,
.rr-product__wrap,
.rr-product__main,
.rr-product__buy,
.rr-product__gallery {
  max-width: 100%;
  min-width: 0;
}
