/* ==========================================================================
   Sri Thrimurthy Traders — Responsive Styles
   MicroMill-inspired breakpoints
   1200+ | 992–1199 | 768–991 | 576–767 | 0–575 | 320
   ========================================================================== */

/* --------------------------------------------------------------------------
   Large Desktop — 1200px+
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
  .container,
  .wrap {
    padding-inline: 20px;
  }

  .mm-product-grid,
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Desktop — 992px to 1199px (3-column product grid)
   -------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1199px) {
  :root {
    --header-main-h: 82px;
  }

  .mm-logo img {
    height: 46px;
  }

  .mm-logo__text strong {
    font-size: 16px;
  }

  .mm-search__cat {
    max-width: 120px;
    font-size: 11px;
  }

  .mm-header__cta .mm-quote-btn span:last-child {
    display: none;
  }

  .mm-header__cta .mm-quote-btn {
    padding: 10px 12px;
  }

  .mm-main-nav a {
    padding: 0 14px;
    font-size: 12px;
  }

  .mm-product-grid,
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .benefit-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .brand-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .gallery-item--featured {
    grid-row: span 1;
    min-height: 200px;
  }

  .gallery-item:last-child {
    display: none;
  }

  .mm-footer__main {
    grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
    gap: 28px;
  }

  .hero__inner {
    min-height: 420px;
  }

  .product-detail__grid {
    gap: 32px;
  }
}

/* --------------------------------------------------------------------------
   Tablet — 768px to 991px
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 991px) {
  :root {
    --header-main-h: 72px;
    --nav-h: 0px;
    --site-header-h: var(--header-main-h);
  }

  html {
    scroll-padding-top: calc(var(--site-header-h) + 8px);
  }

  /* Topbar */
  .mm-topbar__left {
    display: none;
  }

  .mm-topbar__inner {
    justify-content: center;
  }

  .mm-topbar__right {
    gap: 16px;
    font-size: 11px;
  }

  /* Header */
  .mm-burger {
    display: flex;
    order: unset;
  }

  .mm-header__main {
    gap: 14px;
    flex-wrap: wrap;
    padding-block: 10px;
    min-height: auto;
  }

  .mm-logo img {
    height: 42px;
  }

  .mm-logo__text small {
    display: none;
  }

  .mm-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }

  .mm-header__cta {
    margin-left: auto;
  }

  .mm-call-btn span:last-child {
    display: none;
  }

  .mm-call-btn,
  .mm-wa-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .mm-wa-btn span:last-child {
    display: none;
  }

  /* Hide desktop nav — use mobile drawer */
  .mm-nav-wrap {
    display: none;
  }

  /* Product grid — 3 columns on tablet */
  .mm-product-grid,
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-strip__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefit-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .application-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .about-preview__grid,
  .about-page__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .brand-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item--featured {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 220px;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }

  .contact-info {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: block;
    padding: 24px 20px;
  }

  .contact-info h2,
  .contact-info > p:first-of-type {
    grid-column: auto;
  }

  .mm-footer__main {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__copy {
    padding: 32px 0 12px;
  }

  .hero__visual {
    height: auto;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  .hero-showcase__item--main {
    grid-row: span 2;
  }

  .product-detail__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .product-detail__gallery {
    position: static;
  }

  /* Floating Call + WhatsApp — bottom-right on all screens */
  .mobile-actions {
    display: none;
  }

  .float-contact-stack {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }

  .float-contact-stack__call,
  .float-contact-stack__wa {
    width: 48px;
    height: 48px;
  }

  .float-contact-stack__call img {
    width: 38px;
    height: 38px;
  }

  .float-contact-stack__wa .icon-wa {
    width: 24px;
    height: 24px;
  }

  .mm-footer {
    padding-bottom: 24px;
  }
}

/* --------------------------------------------------------------------------
   Mobile — 576px to 767px (2-column product grid)
   -------------------------------------------------------------------------- */
@media (min-width: 576px) and (max-width: 767px) {
  :root {
    --header-main-h: 68px;
    --nav-h: 0px;
    --site-header-h: var(--header-main-h);
  }

  .mm-topbar__left {
    display: none;
  }

  .mm-topbar__right {
    width: 100%;
    justify-content: space-between;
    font-size: 10px;
    gap: 10px;
  }

  .mm-burger {
    display: flex;
  }

  .mm-header__main {
    gap: 12px;
    padding-block: 8px;
    min-height: auto;
  }

  .mm-logo img {
    height: 40px;
  }

  .mm-logo__text strong {
    font-size: 15px;
  }

  .mm-logo__text small {
    display: none;
  }

  .mm-search {
    flex: 1 1 100%;
    max-width: none;
    order: 3;
  }

  .mm-search__cat {
    display: none;
  }

  .mm-header__cta .mm-quote-btn {
    display: none;
  }

  .mm-call-btn span:last-child {
    display: none;
  }

  .mm-call-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .mm-wa-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .mm-wa-btn span:last-child {
    display: none;
  }

  .mm-nav-wrap {
    display: none;
  }

  .mm-product-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .mm-product__bottom {
    padding: 12px 10px 14px;
  }

  .mm-product__title {
    font-size: 13px;
  }

  .mm-product__spec {
    display: none;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .trust-strip__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .section {
    padding: 48px 0;
  }

  .section--compact {
    padding: 22px 0 42px;
  }

  .benefit-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .application-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .application-card span {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .brand-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .brand-grid .brand-card:nth-child(n + 7) {
    display: none;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item--featured {
    grid-column: span 2;
    min-height: 180px;
  }

  .contact-info {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }

  .contact-info {
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .form {
    padding: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .mm-footer__main {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 36px 15px 28px;
  }

  .mm-footer__copy-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero__inner {
    display: block;
    min-height: auto;
  }

  .hero__copy {
    padding: 28px 0 8px;
  }

  .hero h1 {
    font-size: clamp(34px, 9vw, 46px);
    letter-spacing: -1px;
  }

  .hero__visual {
    max-width: 100%;
    margin: 16px auto 0;
    justify-self: center;
  }

  .hero-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
    gap: 10px;
  }

  .hero-showcase__item--main {
    grid-row: span 1;
    min-height: 160px;
  }

  .hero-showcase__item {
    min-height: 110px;
    padding: 10px 8px 8px;
  }

  .hero-showcase__item img {
    max-height: 120px;
  }

  .hero-showcase__item--main img {
    max-height: 140px;
  }

  .product-detail__grid {
    grid-template-columns: 1fr;
  }

  .product-detail__gallery {
    position: static;
  }

  .product-detail__actions {
    flex-direction: column;
  }

  .product-detail__actions .btn {
    width: 100%;
  }

  .mm-page-title {
    min-height: 160px;
    padding: 28px 0;
  }

  .mm-shop-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .mm-footer {
    padding-bottom: 24px;
  }
}

/* --------------------------------------------------------------------------
   Small Mobile — 0 to 575px (2-column product grid)
   -------------------------------------------------------------------------- */
@media (max-width: 575px) {
  :root {
    --header-main-h: 64px;
    --topbar-h: 34px;
    --nav-h: 0px;
    --site-header-h: var(--header-main-h);
  }

  .container,
  .wrap {
    padding-inline: 12px;
  }

  .mm-topbar {
    font-size: 10px;
  }

  .mm-topbar__left {
    display: none;
  }

  .mm-topbar__inner {
    min-height: var(--topbar-h);
  }

  .mm-topbar__right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }

  .mm-burger {
    display: flex;
    width: 40px;
    height: 40px;
  }

  .mm-burger b {
    display: none;
  }

  .mm-header__main {
    gap: 10px;
    padding-block: 8px;
  }

  .mm-logo img {
    height: 36px;
  }

  .mm-logo__text strong {
    font-size: 14px;
  }

  .mm-logo__text small {
    display: none;
  }

  .mm-search {
    flex: 1 1 100%;
    order: 3;
  }

  .mm-search__cat {
    display: none;
  }

  .mm-search__row button {
    padding: 0 14px;
    font-size: 12px;
  }

  .mm-header__cta .mm-quote-btn {
    display: none;
  }

  .mm-call-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .mm-wa-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .mm-wa-btn span:last-child {
    display: none;
  }

  .mm-nav-wrap {
    display: none;
  }

  .mm-product-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .mm-product__image img,
  .mm-product__hover-img img {
    padding: 8px;
  }

  .mm-product__bottom {
    padding: 10px 8px 12px;
  }

  .mm-product__cat {
    font-size: 10px;
  }

  .mm-product__title {
    font-size: 12px;
    min-height: 32px;
  }

  .mm-product__spec {
    display: none;
  }

  .mm-product__price {
    font-size: 13px;
  }

  /* Always show action buttons on touch devices without hover */
  .mm-product__actions {
    opacity: 1;
    transform: none;
    position: static;
  }

  .mm-product__btn {
    min-height: 34px;
    font-size: 10px;
  }

  .mm-page-title {
    min-height: 140px;
    padding: 24px 0;
  }

  .mm-page-title h1 {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .mm-cat-pills a {
    min-width: 100px;
    padding: 8px 12px;
  }

  .mm-cat-pills__name {
    font-size: 12px;
  }

  .mm-shop-content {
    padding: 20px 12px 40px;
  }

  .mm-shop-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .mm-shop-tools {
    width: 100%;
    justify-content: space-between;
  }

  .hero__copy {
    padding-top: 24px;
  }

  .kicker {
    font-size: 11px;
  }

  .hero h1 {
    font-size: clamp(30px, 10vw, 38px);
    letter-spacing: -0.8px;
  }

  .lead {
    font-size: 13px;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .hero__actions .btn:first-child {
    grid-column: 1 / -1;
  }

  .btn {
    min-height: 42px;
  }

  .hero__visual {
    max-width: 100%;
    margin-top: 12px;
  }

  .hero-showcase {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
  }

  .hero-showcase__item {
    min-height: 96px;
  }

  .hero-showcase__item--main {
    grid-column: 1 / -1;
    min-height: 150px;
  }

  .hero-showcase__item img {
    max-height: 90px;
  }

  .hero-showcase__item--main img {
    max-height: 120px;
  }

  .trust-strip {
    padding: 14px 0;
  }

  .trust-strip__grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .trust-item {
    padding: 10px;
    gap: 8px;
  }

  .trust-item__icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .trust-item b {
    font-size: 11px;
  }

  .trust-item small {
    font-size: 9px;
  }

  .section {
    padding: 40px 0;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }

  .category-card__image img {
    width: 64px;
    height: 56px;
  }

  .category-card h3 {
    font-size: 12px;
  }

  .category-card p {
    display: none;
  }

  .benefit-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .benefit-card {
    padding: 16px 14px;
  }

  .benefit-card h3 {
    font-size: 12px;
  }

  .application-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brand-grid .brand-card:nth-child(n + 5) {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats b {
    font-size: 16px;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item {
    min-height: 120px;
  }

  .gallery-item--featured {
    grid-column: span 2;
    min-height: 150px;
  }

  .contact-info {
    padding: 18px;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form {
    padding: 15px;
  }

  .alert {
    margin: 12px 15px 0;
  }

  .mm-footer__main {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 12px 24px;
  }

  .mm-footer__col:nth-child(2),
  .mm-footer__col:nth-child(3) {
    display: none;
  }

  .mm-footer__copy-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .mm-footer__copy-inner nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .product-detail__main img {
    min-height: 240px;
    padding: 14px;
  }

  .product-detail__actions .btn {
    width: 100%;
  }

  .spec-table > div {
    grid-template-columns: 1fr;
  }

  .spec-table span {
    padding-bottom: 4px;
  }

  .page-hero h1 {
    font-size: 26px;
  }

  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .float-contact-stack {
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .mm-footer {
    padding-bottom: 24px;
  }

  .showcase-scroll .mm-product {
    flex: 0 0 min(240px, 82vw);
  }
}

/* --------------------------------------------------------------------------
   Extra Small — 320px (no horizontal overflow)
   -------------------------------------------------------------------------- */
@media (max-width: 320px) {
  .container,
  .wrap {
    padding-inline: 8px;
  }

  .mm-topbar__right {
    font-size: 9px;
    gap: 6px;
  }

  .mm-logo__text strong {
    font-size: 12px;
  }

  .mm-logo img {
    height: 32px;
  }

  .mm-search__row input {
    padding: 0 10px;
    font-size: 12px;
  }

  .mm-search__row button {
    padding: 0 10px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero-showcase {
    padding: 10px;
    gap: 8px;
  }

  .hero-showcase__item figcaption {
    font-size: 10px;
  }

  .trust-strip__grid {
    grid-template-columns: 1fr;
  }

  .mm-product-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .mm-product__title {
    font-size: 11px;
  }

  .mm-product__btn {
    font-size: 9px;
    min-height: 32px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .application-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brand-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero__actions {
    grid-template-columns: 1fr;
  }

  .float-contact-stack__call,
  .float-contact-stack__wa {
    width: 46px;
    height: 46px;
  }

  .mm-cat-pills a {
    min-width: 88px;
    padding: 7px 10px;
  }

  .pagination a {
    min-width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

/* --------------------------------------------------------------------------
   Horizontal Overflow Prevention
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  body {
    overflow-x: clip;
  }

  .website-wrapper,
  .mm-header,
  .mm-header__main,
  .mm-search,
  .hero,
  .hero__visual,
  .about-preview__media,
  .product-detail__main,
  .mm-shop-content,
  .mm-footer__main {
    max-width: 100%;
    min-width: 0;
  }

  .showcase-scroll,
  .product-detail__thumbs,
  .pagination,
  .mm-cat-pills {
    max-width: 100%;
  }

  img,
  video,
  iframe,
  table {
    max-width: 100%;
  }

  .search-suggestions,
  .mm-search__form,
  .mm-search__row {
    max-width: 100%;
  }

  .mm-footer__copy-inner,
  .mm-shop-head,
  .mm-shop-tools {
    min-width: 0;
  }

  .lightbox {
    width: min(900px, calc(100vw - 16px));
  }

  .mobile-drawer__panel {
    width: min(320px, 92vw);
  }
}

/* Home CTA responsive */
@media (max-width: 768px) {
  .home-cta__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 28px 24px;
    text-align: center;
  }

  .home-cta__actions {
    min-width: 0;
    width: 100%;
  }
}

/* MicroMill homepage responsive */
@media (max-width: 991px) {
  .mm-hero-slide__inner {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
  }

  .mm-hero-slide__desc {
    margin-left: auto;
    margin-right: auto;
  }

  .mm-hero-slide__actions {
    justify-content: center;
  }

  .mm-hero-slide__media img {
    max-height: 280px;
  }

  .mm-category-tiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .mm-landing-grid {
    grid-template-columns: 1fr;
  }

  .mm-about-block__grid {
    grid-template-columns: 1fr;
  }

  .mm-offer-strip__inner {
    flex-direction: column;
    text-align: center;
  }

  .mm-offer-strip__actions {
    width: 100%;
    max-width: 280px;
  }

  .mm-collections--bottom {
    padding: 40px 0;
  }

  .mm-product-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

@media (max-width: 640px) {
  .mm-category-tiles {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mm-landing-card {
    grid-template-columns: 1fr;
  }

  .mm-landing-card__image img {
    height: 160px;
  }

  .mm-cat-section__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
   Touch devices — show product actions without hover
   -------------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
  .mm-product__actions {
    opacity: 1;
    transform: none;
    position: static;
  }

  .mm-product__hover-img {
    display: none;
  }

  .mm-browse-cat:hover .mm-browse-cat__dropdown {
    opacity: 0;
    visibility: hidden;
  }

  .mm-browse-cat__toggle[aria-expanded="true"] + .mm-browse-cat__dropdown {
    opacity: 1;
    visibility: visible;
  }
}

/* --------------------------------------------------------------------------
   Reduced Motion — responsive transitions
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .mobile-drawer__panel,
  .mobile-drawer__backdrop {
    transition: none !important;
  }

  .mm-product__actions {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   Mobile Professional Polish — header grid, spacing, no overflow
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  html {
    scroll-padding-top: 128px;
  }

  /* Mobile header: logo left | Call/WhatsApp | menu (☰) right */
  .mm-header__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "logo cta burger"
      "search search search";
    gap: 10px 8px;
    align-items: center;
    min-height: auto;
    padding-block: 10px;
  }

  .mm-burger {
    grid-area: burger;
    order: unset;
    justify-self: end;
  }

  .mm-logo {
    grid-area: logo;
    justify-self: start;
    min-width: 0;
    max-width: 100%;
    flex: 1;
  }

  .mm-logo img {
    height: 38px;
    width: auto;
    flex-shrink: 0;
  }

  .mm-logo__text {
    display: block;
    min-width: 0;
    flex: 1;
  }

  .mm-logo__text strong {
    display: block;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
    font-size: clamp(10px, 2.85vw, 15px);
    line-height: 1.15;
  }

  .mm-logo__text small {
    display: none;
  }

  .mm-header__cta {
    grid-area: cta;
    margin-left: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
  }

  .mm-search {
    grid-area: search;
    order: unset;
    flex: unset;
    width: 100%;
    max-width: none;
  }

  .mm-call-btn__full {
    display: none;
  }

  .mm-call-btn__short {
    display: none;
  }

  .mm-call-btn,
  .mm-wa-btn {
    width: 40px;
    height: 40px;
    min-height: 40px;
    min-width: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    gap: 0;
  }

  .mm-call-btn {
    background: transparent;
    box-shadow: none;
  }

  .mm-call-btn:hover {
    background: transparent;
    opacity: 0.9;
  }

  .mm-call-btn__icon .mm-call-btn__img {
    width: 40px;
    height: 40px;
  }

  .mm-wa-btn span:last-child {
    display: none;
  }

  /* Locked floating buttons — IndiaMART / popular site style */
  .float-contact-stack {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }

  .float-contact-stack__call,
  .float-contact-stack__wa {
    width: 50px;
    height: 50px;
  }

  .float-contact-stack__call img {
    width: 38px;
    height: 38px;
  }

  .float-contact-stack__wa .icon-wa {
    width: 24px;
    height: 24px;
  }

  .mm-footer {
    padding-bottom: 24px;
  }

  /* Hero — image first, full-width CTAs */
  .mm-hero-slide__inner {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 20px;
    text-align: center;
    padding-right: 20px;
  }

  .mm-hero-slide__media {
    order: -1;
  }

  .mm-hero-slide__desc {
    margin-left: auto;
    margin-right: auto;
  }

  .mm-hero-slide__actions {
    justify-content: center;
    width: 100%;
  }

  .mm-hero-slide__actions .btn {
    min-width: min(160px, 46vw);
  }

  .mm-hero-slide__media img {
    max-height: min(260px, 42vh);
  }

  .mm-offer-strip__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .mm-offer-strip__actions {
    width: 100%;
    max-width: none;
  }

  .mm-offer-strip__actions .btn {
    width: 100%;
  }

  .mm-product-tabs {
    margin-inline: -4px;
    padding-inline: 4px;
    scrollbar-width: none;
  }

  .mm-product-tabs::-webkit-scrollbar {
    display: none;
  }

  .mm-product-tabs__btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .mm-footer__contact p,
  .contact-info p,
  .contact-info a {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* Prevent iOS zoom on input focus */
  .form input,
  .form select,
  .form textarea,
  .mm-search__row input[type="search"],
  .mm-search__form--mobile input {
    font-size: 16px;
  }

  .product-detail__info h1 {
    font-size: clamp(22px, 5.5vw, 30px);
  }

  .product-detail__thumbs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .product-detail__thumbs::-webkit-scrollbar {
    display: none;
  }

  /* Quote / contact form — full-width stack (fixes cramped 2-column on phone) */
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .contact-info {
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 24px 18px;
  }

  .contact-info h2 {
    font-size: clamp(18px, 4.8vw, 22px);
    line-height: 1.3;
  }

  .contact-info > p {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .contact-info a,
  .contact-info p {
    font-size: 13px;
    margin: 10px 0;
  }

  .form-wrap,
  .form {
    min-width: 0;
  }

  .form {
    padding: 20px 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form input,
  .form select,
  .form textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .form select {
    appearance: auto;
    -webkit-appearance: menulist;
  }

  .alert {
    margin: 12px 16px 0;
  }

  .contact {
    padding: 20px 0 28px;
  }

  .mm-enquiry-section .contact-panel {
    border-radius: 8px;
  }
}

@media (min-width: 992px) {
  .mm-call-btn {
    background: var(--g);
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 8px 14px;
    border-radius: var(--r);
  }

  .mm-call-btn:hover {
    background: var(--gd);
    opacity: 1;
  }

  .mm-call-btn__icon .mm-call-btn__img {
    width: 22px;
    height: 22px;
    border: none;
    box-shadow: none;
    background: transparent;
  }
}

@media (max-width: 640px) {
  .mm-topbar a.mm-topbar__link:not(.mm-topbar__phone):not(.mm-topbar__wa) {
    display: none;
  }

  .mm-topbar__right {
    justify-content: center;
    gap: 14px;
  }

  .mm-hero-slide {
    padding-top: 24px;
  }

  .mm-hero-slide__title {
    font-size: clamp(20px, 5.5vw, 28px);
  }

  .mm-hero-slide__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mm-hero-slide__actions .btn {
    width: 100%;
    min-width: 0;
  }

  .mm-cat-section__head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .mm-cat-section__more {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .mobile-drawer__panel {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 575px) {
  html {
    scroll-padding-top: 118px;
  }

  .float-contact-stack {
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .float-contact-stack__call,
  .float-contact-stack__wa {
    width: 48px;
    height: 48px;
  }

  .mm-product-tabs__btn {
    padding: 10px 14px;
    font-size: 12px;
  }

  .mm-category-tile__title {
    padding: 12px 8px;
    font-size: 12px;
  }

  .mm-category-tile__image {
    padding: 14px;
  }

  .section-cta .btn {
    width: 100%;
    max-width: 320px;
  }

  .mm-collections__header {
    padding-inline: 4px;
  }
}

@media (max-width: 400px) {
  .mm-logo img {
    height: 34px;
  }

  .mm-logo__text strong {
    font-size: 11px;
  }

  .mm-call-btn,
  .mm-wa-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .mm-call-btn__short {
    display: none;
  }

  .mm-search__row button {
    padding: 0 12px;
    min-width: 52px;
  }

  .mm-topbar__phone {
    font-size: 10px;
  }

  .float-contact-stack {
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .float-contact-stack__call,
  .float-contact-stack__wa {
    width: 46px;
    height: 46px;
  }

  .float-contact-stack__call img {
    width: 36px;
    height: 36px;
  }
}
