/* Shared phone typography, spacing and controls. Desktop styles stay in their components. */
@media (max-width: 767px) {
  :root {
    --site-body-size: 14px;
    --mobile-heading-size: 22px;
    --caia-header-height: 108px;
  }

  body {
    font-size: var(--site-body-size);
  }
  .home-page,
  .news-page,
  body.single-product {
    --home-description-size: 14px;
  }
  body.caia-header-layout
    .site-container
    :is(
      .site-inner,
      .home-page,
      .single-product-page,
      .single-blog-page,
      .before_footer,
      .site-footer
    )
    :is(p, li, td, th, label) {
    font-size: var(--site-body-size);
  }
  body.caia-header-layout
    .site-container
    :is(.site-inner, .home-page, .before_footer)
    :is(
      button:not(.slick-dots button, .slick-arrow, .home-hero__arrow),
      .button,
      input[type="submit"]
    ) {
    font-size: 14px;
  }

  /* Keep text fields readable and prevent focus from enlarging the phone viewport. */
  body.caia-header-layout .site-container :is(input, select, textarea) {
    max-width: 100%;
    font-size: 16px !important;
  }
  body.caia-header-layout .site-container :is(input, textarea)::placeholder {
    font-size: 14px !important;
  }
  body.caia-header-layout #responsive-menu .mobile-menu a {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
  }

  .home-stats {
    padding: 40px 0;
  }
  .home-stats .home-stats__heading {
    margin-bottom: 20px;
    font-size: var(--mobile-heading-size);
  }
  .home-stats .home-stats__grid {
    padding: 20px 0;
    border-radius: 0;
    row-gap: 20px;
  }
  .home-stats .home-stats__item {
    padding: 4px 10px;
  }
  .home-stats__icon {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
  }
  .home-stats__icon > i {
    font-size: 32px;
  }
  .home-stats .home-stats__number {
    font-size: 28px;
  }
  .home-stats .home-stats__label {
    font-size: 14px;
  }

  .home-commitment {
    padding: 40px 0;
  }
  .home-commitment .home-commitment__quote {
    padding-right: 64px;
  }
  .home-commitment .home-commitment__subtitle {
    font-size: 16px;
  }
  .home-commitment .home-commitment__title {
    font-size: var(--mobile-heading-size);
  }
  .home-commitment .home-commitment__mark {
    font-size: 64px;
  }

  .home-categories,
  .home-products,
  .home-news,
  .home-reviews {
    padding: 28px 0;
  }
  .home-categories > .wrap,
  .home-products > .wrap,
  .home-news > .wrap,
  .home-reviews > .wrap {
    width: calc(100% - 32px);
  }
  .home-categories .home-categories__heading,
  .home-products .home-products__heading,
  .home-news .home-news__heading,
  .home-reviews .home-reviews__heading,
  .product-search-page__header h1,
  .contact-page__details > h2 {
    font-size: var(--mobile-heading-size);
    line-height: 1.4;
  }
  .home-page .home-section-heading__ornament,
  .single-product .home-section-heading__ornament,
  .contact-page__ornament {
    width: 140px;
    height: 28px;
    margin-bottom: 12px;
  }
  .home-categories__header,
  .home-products__header,
  .home-news__header {
    margin-bottom: 20px;
  }
  .home-page .home-products__header .home-products__button {
    min-height: 36px;
    padding: 6px 16px;
    font-size: 14px;
  }
  .home-categories .home-categories__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .home-categories .home-categories__link {
    gap: 12px;
    min-height: 180px;
    padding: 16px 12px 16px 20px;
  }
  .home-categories__content {
    gap: 16px;
  }
  .home-categories__media {
    height: 140px;
  }
  .home-categories__name,
  .home-categories__more {
    font-size: 14px;
    line-height: 1.45;
  }
  .home-products__grid {
    gap: 20px 12px;
  }
  .home-products__tabs {
    gap: 8px;
    margin-bottom: 20px;
  }
  .home-products .home-products__tab {
    padding: 5px 12px;
    font-size: 14px;
  }
  .home-products .home-products__title {
    font-size: 14px;
  }
  .home-products .home-products__title {
    line-height: 1.5;
  }
  .home-products__card {
    border-radius: 0;
  }
  .home-products__body {
    gap: 8px;
    padding: 10px 10px 12px;
  }
  .home-products .home-products__price {
    font-size: 14px;
  }
  .home-news__body {
    padding: 14px 16px 16px;
  }
  .home-news .home-news__title {
    font-size: 16px;
  }
  .home-news .home-news__date {
    font-size: 12px;
  }
  .home-news .home-news__excerpt {
    font-size: 14px;
  }
  .home-reviews__layout {
    gap: 22px;
  }
  .home-reviews__image-frame {
    padding: 0;
  }
  .home-reviews__bubble {
    padding: 18px;
  }
  .home-reviews .home-reviews__quote,
  .home-reviews .home-reviews__name,
  .home-reviews .home-reviews__detail {
    font-size: 14px;
  }

  .page-banner {
    padding: 28px 16px;
  }
  .page-banner h1 {
    margin-bottom: 10px;
    font-size: 26px;
  }
  .page-banner__breadcrumb,
  .breadcrumb a,
  .breadcrumb span {
    font-size: 13px;
  }
  .news-page .news-page__category {
    min-height: 36px;
    padding: 5px 14px;
    font-size: 14px;
  }
  .news-page__categories {
    margin-bottom: 24px;
  }

  .catalog-page {
    gap: 20px;
    padding: 24px 0 32px;
  }
  .catalog-filters {
    padding: 12px 14px;
  }
  .catalog-filters > summary {
    min-height: 24px;
    font-size: 14px;
  }
  .catalog-filters[open] > summary {
    margin-bottom: 18px;
  }
  .catalog-filter-group {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  .catalog-filter-group > label,
  .catalog-filter-group > legend {
    margin-bottom: 10px;
    font-size: 14px;
  }
  .catalog-filter-options {
    gap: 4px;
  }
  .catalog-filter-option {
    min-height: 36px;
    font-size: 14px;
  }
  .catalog-filter-actions button {
    min-height: 44px;
  }
  .catalog-toolbar {
    margin-bottom: 20px;
  }
  .catalog-toolbar #catalog-orderby {
    min-height: 44px;
    font-size: 14px !important; /* beats the generic 16px mobile field rule */
  }
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }
  .catalog-results.home-products {
    padding: 0;
  }
  .catalog-results .home-products__title {
    font-size: 14px;
  }

  body.single-product .single-product-page {
    padding: 20px 0 32px;
  }
  .single-product .product-overview {
    gap: 20px;
    margin-bottom: 28px;
  }
  body.single-product .woocommerce div.product .product_title {
    margin-bottom: 14px;
    font-size: 22px;
    line-height: 1.4;
  }
  .single-product .product-detail__categories {
    margin-bottom: 16px;
    font-size: 14px;
  }
  .single-product .woocommerce-product-gallery {
    --product-main-height: clamp(280px, 90vw, 360px);
    --product-thumb-height: 52px;
  }
  body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__image img {
    object-fit: contain;
  }
  body.single-product .woocommerce div.product div.images .flex-control-thumbs {
    gap: 8px;
    grid-auto-columns: calc((100% - 24px) / 4);
    margin-top: 10px;
  }
  .single-product .woocommerce-product-details__short-description,
  .single-product .product-accordion__content,
  .single-product .product-detail__attributes table,
  .single-product .product-specifications__table {
    font-size: 14px;
    line-height: 1.7;
  }
  .single-product .summary table th,
  .single-product .summary table td {
    padding: 10px 6px;
    overflow-wrap: anywhere;
  }
  .single-product .product-contact-area {
    padding-top: 16px;
  }
  .single-product .product-contact__button {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
  }
  .single-product .product-accordion {
    margin-bottom: 24px;
  }
  .single-product .product-accordion > summary {
    padding: 14px 42px 14px 16px;
    font-size: 17px;
  }
  .single-product .product-accordion > summary::after {
    right: 18px;
    top: 22px;
  }
  .single-product .product-accordion__content {
    padding: 18px 14px;
  }
  .single-product .product-commitments,
  .single-product .product-related {
    padding: 24px 0;
  }
  .product-commitments__grid {
    gap: 12px;
  }
  .product-commitments__grid .widget {
    padding: 16px 12px;
  }
  .product-commitments__grid .widget-wrap {
    gap: 12px;
  }
  .product-commitments__grid img {
    width: 64px;
    height: 64px !important;
  }
  .single-product .product-commitments__grid .widget-title {
    font-size: 14px;
  }

  .single-blog-header {
    padding-bottom: 12px;
  }
  .single-blog-header h1 {
    font-size: 22px;
    line-height: 1.4;
  }
  .single-blog-meta {
    font-size: 12px;
  }
  .single-blog-content {
    font-size: 14px;
  }
  .single-blog-content h2,
  body.page .entry-content h2 {
    margin: 24px 0 12px;
    font-size: 21px;
    line-height: 1.4;
  }
  .single-blog-content h3,
  body.page .entry-content h3 {
    margin: 20px 0 10px;
    font-size: 18px;
  }
  .single-blog-content h4,
  body.page .entry-content h4 {
    font-size: 16px;
  }
  body.page .entry-title,
  .article-category-archive__header h1 {
    font-size: 22px;
    line-height: 1.4;
  }
  .article-category-archive .home-featured-posts__card :is(h2, h2 a) {
    font-size: 17px;
  }
  .single-blog-content :is(img, iframe, video),
  body.page .entry-content :is(img, iframe, video) {
    max-width: 100%;
  }
  .single-blog-content table,
  body.page .entry-content table {
    max-width: 100%;
  }
  .single-blog-content td,
  .single-blog-content th {
    padding: 10px 8px;
  }

  .faq-page {
    padding: 28px 0 36px;
    font-size: 14px;
  }
  .faq-page__intro {
    margin-bottom: 24px;
  }
  .faq-group {
    margin-bottom: 28px;
  }
  .faq-group h2 {
    margin-bottom: 12px;
    font-size: 20px;
  }
  .faq-item > summary {
    min-height: 44px;
    padding: 14px 8px 14px 24px;
    font-size: 14px;
  }
  .faq-item > summary::before {
    top: 23px;
  }
  .faq-item[open] > summary::before {
    top: 26px;
  }
  .faq-item__answer {
    margin-bottom: 14px;
    padding: 16px;
  }

  .contact-page {
    padding: 28px 0 36px;
  }
  .contact-page > .contact-page__layout {
    width: 100%;
    gap: 24px;
  }
  .contact-page__intro {
    margin: 16px 0 24px;
  }
  .contact-page__info-list {
    gap: 12px;
  }
  .contact-page__info-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .contact-page__info-item > i {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .contact-page__info-item h3 {
    font-size: 15px;
  }
  .contact-page__info-item p,
  .contact-page__info-item a {
    font-size: 14px;
  }
  .contact-page__map {
    padding: 16px;
  }
  .contact-page__map h2 {
    margin-bottom: 14px;
    font-size: 20px;
  }
  .contact-page__map-frame,
  .contact-page__map iframe {
    height: 280px;
    min-height: 280px;
  }

  .nhantuvan {
    padding: 28px 0;
  }
  .nhantuvan .wrap {
    width: calc(100% - 32px);
    gap: 20px;
  }
  .nhantuvan .widget_text .widgettitle,
  .nhantuvan .textwidget :is(h1, h2, h3) {
    margin-bottom: 14px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
  }
  .nhantuvan .textwidget p {
    font-size: 14px;
    line-height: 1.65;
  }
  .nhantuvan .fluentform .ff-el-group {
    margin-bottom: 14px;
  }
  .nhantuvan .fluentform .ff-el-form-control {
    min-height: 44px;
    padding: 9px 14px;
  }
  .nhantuvan .fluentform .ff-el-is-error .text-danger {
    font-size: 13px !important;
  }
  .nhantuvan .ff-btn-submit {
    min-height: 44px;
  }

  .before_footer.section,
  .site-footer {
    font-size: 14px;
  }
  .before_footer.section {
    padding: 28px 0 24px;
  }
  .before_footer .wrap-section {
    gap: 24px;
  }
  .before_footer .footer-brand {
    margin-bottom: 18px;
  }
  .before_footer .footer-brand img {
    width: 72px;
    height: 72px;
  }
  .before_footer .footer-info {
    gap: 10px;
  }
  .before_footer .footer-links {
    gap: 8px 20px;
  }
  .before_footer .footer-links a {
    min-height: 36px;
    padding: 5px 0;
  }
  .before_footer .footer-contact-button {
    min-height: 44px;
    min-width: 0;
    margin-top: 18px;
    font-size: 14px;
  }
  .before_footer .footer-social {
    gap: 10px;
  }
  .site-footer {
    padding-bottom: 20px;
  }
  .site-footer > .wrap {
    padding-top: 18px;
  }
  .site-footer .footer-bottom {
    font-size: 13px;
  }
}

@media (max-width: 359px) {
  .nhantuvan .widget_text .widgettitle,
  .nhantuvan .textwidget :is(h1, h2, h3) {
    font-size: 21px;
  }
  .single-blog-header h1 {
    font-size: 22px;
  }
}
