/* =========================================================
   MONYQUE MOBILE POLISH V1
   Ajustes finais de mobile: header, produto e categorias.
   ========================================================= */

@media (max-width: 767px) {
  :root {
    --mq-mobile-gutter: 18px;
    --mq-mobile-radius: 14px;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  img,
  video,
  iframe,
  table,
  form,
  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }

  body {
    position: relative;
  }

  /* =====================================================
     HEADER MOBILE
     ===================================================== */

  body .site,
  body .site-header,
  body .storefront-primary-navigation,
  body .main-navigation,
  body .site-content,
  body .content-area,
  body .widget-area,
  body .col-full {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body .col-full {
    padding-left: var(--mq-mobile-gutter) !important;
    padding-right: var(--mq-mobile-gutter) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body header.site-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body .site-header .col-full,
  body .storefront-primary-navigation .col-full {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Tarja vermelha superior */
  body .liquida-topbar,
  body .monyque-topbar,
  body .mc-topbar,
  body [class*="topbar"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  body .liquida-topbar *,
  body .monyque-topbar *,
  body .mc-topbar * {
    max-width: 100%;
  }

  /* Bloco de benefícios do topo no mobile */
  body .liquida-benefits,
  body .monyque-benefits,
  body .mc-header-benefits,
  body [class*="header-benefit"],
  body [class*="benefits-bar"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: var(--mq-mobile-gutter) !important;
    padding-right: var(--mq-mobile-gutter) !important;
    overflow: hidden !important;
  }

  /* Linha logo / menu / carrinho */
  body .site-branding,
  body .site-search,
  body .site-header-cart,
  body .storefront-handheld-footer-bar,
  body .main-navigation {
    max-width: 100% !important;
  }

  body .site-branding {
    text-align: center !important;
  }

  body .site-branding img,
  body .site-branding .custom-logo {
    max-width: 180px !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body .site-search,
  body .woocommerce-product-search,
  body .search-form {
    width: 100% !important;
    max-width: 100% !important;
  }

  body .site-search input,
  body .woocommerce-product-search input,
  body .search-form input {
    width: 100% !important;
    max-width: 100% !important;
  }

  body .site-header-cart {
    right: auto !important;
    max-width: 100% !important;
  }

  /* =====================================================
     PRODUTO MOBILE
     ===================================================== */

  body.single-product .mc-product-page,
  body.single-product .mc-product-shell,
  body.single-product div.product,
  body.single-product .summary,
  body.single-product .mc-product-gallery-col,
  body.single-product .mc-product-info-col,
  body.single-product .mc-product-buybox-col,
  body.single-product .monyque-summary-buybox {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow-x: hidden !important;
  }

  body.single-product .mc-product-shell {
    padding-left: var(--mq-mobile-gutter) !important;
    padding-right: var(--mq-mobile-gutter) !important;
  }

  body.single-product .woocommerce-breadcrumb {
    padding-left: var(--mq-mobile-gutter) !important;
    padding-right: var(--mq-mobile-gutter) !important;
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }

  /* Galeria respeitando a largura */
  body.single-product .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single-product .woocommerce-product-gallery__wrapper,
  body.single-product .flex-viewport {
    max-width: 100% !important;
  }

  body.single-product .flex-control-thumbs {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 8px 0 2px !important;
    scrollbar-width: thin;
  }

  body.single-product .flex-control-thumbs li {
    flex: 0 0 54px !important;
    width: 54px !important;
    max-width: 54px !important;
  }

  /* Título, rating e preço centralizados */
  body.single-product .product_title,
  body.single-product .entry-title,
  body.single-product .woocommerce-product-rating,
  body.single-product .price,
  body.single-product .mc-product-price,
  body.single-product .monyque-product-price {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single-product .product_title,
  body.single-product .entry-title {
    line-height: 1.15 !important;
  }

  body.single-product .woocommerce-product-rating {
    justify-content: center !important;
  }

  /* Badges centralizadas */
  body.single-product .mc-product-badges,
  body.single-product .monyque-product-badges,
  body.single-product .mc-product-meta-row,
  body.single-product .monyque-product-meta-row {
    justify-content: center !important;
    text-align: center !important;
  }

  /* Cards de desconto alinhados na mesma base */
  body.single-product .mc-single-campaign-prices,
  body.single-product .monyque-single-campaign-prices {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: stretch !important;
    overflow: visible !important;
  }

  body.single-product .mc-single-campaign-prices > *,
  body.single-product .monyque-single-campaign-prices > * {
    min-width: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    overflow: visible !important;
  }

  body.single-product .mc-single-campaign-prices em,
  body.single-product .monyque-single-campaign-prices em {
    top: -12px !important;
  }

  /* Buybox / cor / tamanho / botão centralizados */
  body.single-product .monyque-summary-buybox,
  body.single-product .mc-product-buybox-col,
  body.single-product form.cart,
  body.single-product .variations_form,
  body.single-product .variations {
    text-align: center !important;
  }

  body.single-product .variations,
  body.single-product .variations tbody,
  body.single-product .variations tr,
  body.single-product .variations td,
  body.single-product .variations th {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  body.single-product .variations label,
  body.single-product .monyque-variation-label,
  body.single-product .mc-variation-label {
    display: block !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single-product .monyque-variation-pills,
  body.single-product .mc-variation-pills,
  body.single-product [class*="variation-pills"] {
    justify-content: center !important;
    text-align: center !important;
  }

  body.single-product .single_add_to_cart_button {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Blocos abaixo da compra centralizados */
  body.single-product .monyque-product-campaign-box,
  body.single-product .mc-product-quick-benefits,
  body.single-product .mc-trustbar,
  body.single-product .woocommerce-tabs,
  body.single-product .related,
  body.single-product .upsells,
  body.single-product .product_meta {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  body.single-product .monyque-product-campaign-box ul,
  body.single-product .woocommerce-tabs ul {
    display: inline-block !important;
    text-align: left !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single-product .mc-trustbar,
  body.single-product .mc-product-quick-benefits {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  body.single-product .mc-trustbar > *,
  body.single-product .mc-product-quick-benefits > * {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  body.single-product .woocommerce-tabs .panel,
  body.single-product .woocommerce-Tabs-panel,
  body.single-product .woocommerce-product-attributes {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.single-product .related h2,
  body.single-product .upsells h2,
  body.single-product .woocommerce-tabs h2 {
    text-align: center !important;
  }

  /* =====================================================
     CATEGORIAS / ARQUIVO MOBILE
     ===================================================== */

  body.archive.woocommerce .site-main,
  body.tax-product_cat .site-main,
  body.post-type-archive-product .site-main,
  body.archive.woocommerce .content-area,
  body.tax-product_cat .content-area,
  body.post-type-archive-product .content-area {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.archive.woocommerce .site-main,
  body.tax-product_cat .site-main,
  body.post-type-archive-product .site-main {
    padding-left: var(--mq-mobile-gutter) !important;
    padding-right: var(--mq-mobile-gutter) !important;
  }

  body.archive.woocommerce .woocommerce-breadcrumb,
  body.tax-product_cat .woocommerce-breadcrumb,
  body.post-type-archive-product .woocommerce-breadcrumb {
    width: 100% !important;
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }

  body.archive.woocommerce .page-title,
  body.tax-product_cat .page-title,
  body.post-type-archive-product .page-title,
  body.archive.woocommerce .woocommerce-products-header,
  body.tax-product_cat .woocommerce-products-header {
    width: 100% !important;
    max-width: 100% !important;
    text-align: left !important;
  }

  /* Botão de filtros */
  body.archive.woocommerce .monyque-filter-toggle,
  body.tax-product_cat .monyque-filter-toggle,
  body.post-type-archive-product .monyque-filter-toggle,
  body.archive.woocommerce [class*="filter-toggle"],
  body.tax-product_cat [class*="filter-toggle"],
  body.post-type-archive-product [class*="filter-toggle"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: var(--mq-mobile-radius) !important;
  }

  /* Painel de filtros */
  body.archive.woocommerce .widget-area,
  body.tax-product_cat .widget-area,
  body.post-type-archive-product .widget-area,
  body.archive.woocommerce .storefront-sorting,
  body.tax-product_cat .storefront-sorting,
  body.post-type-archive-product .storefront-sorting,
  body.archive.woocommerce [class*="filter"],
  body.tax-product_cat [class*="filter"] {
    max-width: 100% !important;
  }

  body.archive.woocommerce .widget,
  body.tax-product_cat .widget,
  body.post-type-archive-product .widget,
  body.archive.woocommerce aside,
  body.tax-product_cat aside {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.archive.woocommerce .widget li,
  body.tax-product_cat .widget li,
  body.post-type-archive-product .widget li {
    max-width: 100% !important;
  }

  body.archive.woocommerce ul.products,
  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
  }

  body.archive.woocommerce ul.products li.product,
  body.tax-product_cat ul.products li.product,
  body.post-type-archive-product ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Evita qualquer elemento da categoria vazar lateralmente */
  body.archive.woocommerce main *,
  body.tax-product_cat main *,
  body.post-type-archive-product main * {
    max-width: 100%;
  }

  /* Handheld footer bar não deve empurrar layout */
  body .storefront-handheld-footer-bar {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }
}

@media (max-width: 430px) {
  body.single-product .mc-single-campaign-prices,
  body.single-product .monyque-single-campaign-prices {
    gap: 6px !important;
  }

  body.single-product .mc-single-campaign-prices > *,
  body.single-product .monyque-single-campaign-prices > * {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}
