/**
 * Product details page — mobile layout (product_details.php)
 */

@media only screen and (max-width: 991px) {
  #ProductSection-product-template.product-template__container,
  #ProductSection-product-template .product-single,
  #ProductSection-product-template .product-single > .row {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  #ProductSection-product-template .product-single > .row > [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
    flex: 0 0 100%;
    max-width: 100%;
  }

  #ProductSection-product-template .product-details-img {
    margin-bottom: 1rem;
    padding-left: 0;
    padding-right: 0;
  }

  #ProductSection-product-template .product-gallery-wrap {
    width: 100%;
    max-width: 100%;
  }

  #ProductSection-product-template .zoompro-wrap,
  #ProductSection-product-template .zoompro-span {
    width: 100% !important;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

@media only screen and (max-width: 767px) {
  #page-content #MainContent {
    overflow-x: hidden;
  }

  #ProductSection-product-template {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    box-sizing: border-box;
  }

  .bredcrumbWrap .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Theme title has padding-right:60px for nav arrows — remove on mobile */
  #ProductSection-product-template h1.product-single__title,
  #ProductSection-product-template .product-single__title {
    padding-right: 0 !important;
    font-size: 1.2rem !important;
    line-height: 1.35;
    word-break: break-word;
  }

  #ProductSection-product-template .product-single__meta {
    width: 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  #ProductSection-product-template .rating {
    margin-bottom: 0.5rem;
    line-height: 1;
  }

  #ProductSection-product-template .rating .fa-stack {
    font-size: 0.85em;
  }

  /* Price row: stack MRP and sale instead of inline overflow */
  #ProductSection-product-template .product-single__price,
  #ProductSection-product-template .pd-price-hero {
    display: flex !important;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    width: 100%;
    max-width: 100%;
    margin-right: 0;
  }

  #ProductSection-product-template .product-single__price .product-price__price,
  #ProductSection-product-template .pd-sale-lg {
    font-size: 1.5rem !important;
    padding-left: 0;
  }

  #ProductSection-product-template .pd-mrp-lg {
    font-size: 0.95rem !important;
  }

  #ProductSection-product-template .pd-product-note {
    font-size: 0.85rem;
    word-break: break-word;
  }

  #ProductSection-product-template .pd-purchase-box {
    padding: 0.85rem;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
  }

  #ProductSection-product-template .pd-qty-block {
    width: 100%;
  }

  #ProductSection-product-template .pd-qty-control {
    max-width: 100%;
  }

  #ProductSection-product-template .pd-wholesale-card {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  #ProductSection-product-template .qty-wholesale-tiers,
  #ProductSection-product-template .qty-wholesale-tiers .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #ProductSection-product-template .pd-wholesale-table {
    width: 100%;
    min-width: 260px;
  }

  #ProductSection-product-template .pd-meta-card {
    padding: 0.85rem;
    margin-top: 0.75rem;
  }

  /* Tabs */
  #ProductSection-product-template .tabs-listing,
  .product-single-1 .tabs-listing {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .product-single-1 .tabs-listing .product-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .product-single-1 .tabs-listing .product-tabs::-webkit-scrollbar {
    display: none;
  }

  .product-single-1 .tabs-listing .product-tabs li {
    flex: 0 0 auto;
    float: none;
  }

  .product-single-1 .tabs-listing .product-tabs a {
    padding: 12px 14px !important;
    font-size: 11px;
    white-space: nowrap;
  }

  .product-single-1 .tab-container {
    padding: 0.75rem 0;
    overflow-x: hidden;
  }

  .product-single-1 .tab-container .product-description,
  .product-single-1 .tab-container #shopify-product-reviews {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .product-single-1 .tab-container iframe {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    min-height: 200px;
    aspect-ratio: 16 / 9;
  }

  /* Related products */
  #page-content .section .container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
    overflow: hidden;
  }

  #page-content .productSlider.grid-products {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  #page-content .productSlider.grid-products .slick-list {
    overflow: hidden;
    margin: 0;
  }

  #page-content .productSlider.grid-products .slick-track {
    display: flex;
    align-items: stretch;
  }

  #page-content .productSlider.grid-products .item {
    width: 100% !important;
    max-width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
  }

  #page-content .productSlider.grid-products .item .product-image img,
  #page-content .grid-products .item .product-image img {
    height: auto !important;
    max-height: 220px;
    width: 100%;
    object-fit: contain;
  }

  #page-content .productSlider.grid-products .product-name h6,
  #page-content .productSlider.grid-products .pname {
    font-size: 0.9rem;
    line-height: 1.3;
    word-break: break-word;
  }

  #page-content .productSlider.grid-products .btn {
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }
}

@media only screen and (max-width: 479px) {
  #ProductSection-product-template .pd-action-btn {
    min-height: 48px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }

  #ProductSection-product-template .pd-action-btn__icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  #ProductSection-product-template .pd-action-btn--wishlist .pd-action-btn__label {
    text-align: center;
  }

  #ProductSection-product-template .pd-sale-lg {
    font-size: 1.35rem !important;
  }

  .product-single-1 .tabs-listing .product-tabs a {
    padding: 10px 10px !important;
    font-size: 10px;
  }
}
