/*
Theme Name: My Pham Child
Description: Child theme for Flatsome
Author: Your Name
Template: flatsome
Version: 1.0
*/

@media (max-width: 849px) {

  /* Bỏ max-width container trên mobile */
  .container,
  .container-width,
  .row {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Riêng nội dung tab mô tả sản phẩm */
  .single-product .woocommerce-tabs,
  .single-product .woocommerce-tabs .container,
  .single-product .tab-panels,
  .single-product .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  /* Hình ảnh trong mô tả full chiều ngang */
  .single-product .entry-content img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}
.box-text.text-center {
    padding-left: 2px!important;
    padding-right: 2px!important;
}


/* Mobile */
@media (max-width: 480px) {
    .text-box-content {
        padding: 16px;
        text-align: center; /* dễ đọc hơn trên mobile */
    }

    .text-box-content h3 {
        font-size: 20px;
        line-height: 1.3;
    }

    .text-box-content p {
        font-size: 14px;
        line-height: 1.6;
        margin-top: 8px;
    }
	.text-box-content {
  max-width: 90%;
}

}
/* FIX CHỮ TRÀN & QUÁ TO TRÊN MOBILE */
@media (max-width: 549px) {

  /* GỠ GIỚI HẠN CHA (QUAN TRỌNG NHẤT) */
  .ux-slider,
  .ux-slider-wrapper,
  .banner,
  .banner-inner,
  .banner-bg,
  .banner-layers,
  .slider-wrapper,
  .row,
  .row-inner {
    height: auto !important;
    min-height: unset !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* TEXT BOX */
  .text-box,
  .text-box-content,
  .text-box .text {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* KHUNG CHỮ */
  .text-box-content {
    text-align: center !important;
    max-width: 90% !important;
    margin: 0 auto !important;
    padding: 12px !important;
  }

  /* TIÊU ĐỀ */
  .text-box-content h2,
  .text-box-content h3 {
    font-size: 16px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* MÔ TẢ */
  .text-box-content p {
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin: 0 auto !important;
    white-space: normal !important;
  }
}

/* ===============================
   MOBILE
   =============================== */
@media (max-width: 849px) {
  .header-bottom .nav-dropdown {
    display: block;
    width: auto;
    padding: 16px;
    transform: none;
    left: auto;
  }

  .header-bottom .nav-dropdown > li {
    width: 100%;
  }
}


.ux-mfp-inline-content.ux-mfp-inline-content--video {
    /* width: auto; */
    max-width: 420px !important;
}



/* ===== FIX TEXT BANNER MOBILE ===== */
@media (max-width: 849px) {

  /* Tiêu đề lớn */
  .banner h1,
  .banner h2 {
    font-size: 20px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
    word-break: break-word;
  }

  /* Tiêu đề phụ */
  .banner h3,
  .banner .lead {
    font-size: 15px !important;
    line-height: 1.4 !important;
  }

  /* Đoạn mô tả */
  .banner p {
    font-size: 14px !important;
    line-height: 1.5 !important;
    max-width: 100% !important;
  }

  /* Nút bấm */
  .banner .button {
    font-size: 13px !important;
    padding: 8px 14px !important;
  }

  /* Giảm padding khung banner */
  .banner-inner {
    padding: 16px !important;
  }
}


.nav .nav-dropdown {
    background-color: #ffffff !important;
}
.nav-dropdown>li>a:hover {
    text-decoration: underline;
    color: #470707 !important;
}
.nav-dropdown>li>a {
    padding: 6px 0;
    color: #000000 !important;
}

/* Ép ảnh sản phẩm vuông tuyệt đối */
.product-small .box-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.product-small .box-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.col, .columns, .gallery-item {
    margin: 0;
    padding: 0 5px 5px!important;
}
.flickity-page-dots .dot {
  background-color: #000!important;
}

/* Khung bao video */
.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh; /* Full màn hình */
  overflow: hidden;
  background: #000;
}

/* Video full khung */
.video-wrapper .video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover; /* đổi thành contain nếu không muốn cắt */
  display: block;
}
/* =================================================
   MEGA MENU – KHÔNG TRÀN LỀ KHI ZOOM (FINAL)
   ================================================= */

/* 1. CHA KHÔNG GIỚI HẠN */
.header,
.header-wrapper,
.header-bottom,
.header-bottom .container,
.header-bottom .row,
.header-bottom .row-inner {
  overflow: visible !important;
}

/* 2. MENU BÁM VIEWPORT – KHÔNG FIX PX */
.header-bottom .has-dropdown {
  position: static !important;
}

.header-bottom .nav-dropdown {
  position: absolute !important;

  /* 🔥 CỐT LÕI CHỐNG TRÀN */
  inset: auto 20px auto 20px; /* trái – phải 20px */
  margin: 0 auto;

  max-width: 1200px; /* chỉ là giới hạn trên */
  width: auto;

  padding: 28px 32px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,.15);

  overflow: hidden;
  z-index: 9999;
}

/* 3. GIỮ MENU MỞ KHI RÊ */
.header-bottom .has-dropdown:hover > .nav-dropdown,
.header-bottom .nav-dropdown:hover {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* =================================================
   GRID SẢN PHẨM – 2 CỘT / DANH MỤC
   ================================================= */

/* 4. MỖI CỘT DANH MỤC */
.header-bottom .nav-dropdown-col {
  width: 33.333%;
}

/* 5. GRID BÊN TRONG DANH MỤC */
.header-bottom .nav-dropdown-col > ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* 6. CARD */
.header-bottom .nav-dropdown li.has-icon-left > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  background: #fff;
  border-radius: 18px;
  padding: 16px 14px;
  transition: background .25s ease;
}

.header-bottom .nav-dropdown li.has-icon-left > a:hover {
  background: #f6f7f9;
}

/* 7. ẢNH */
.header-bottom .nav-dropdown img.ux-menu-icon {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 8px;
}

/* 8. TEXT */
.header-bottom .nav-dropdown li.has-icon-left > a span {
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
}

/* =================================================
   MOBILE
   ================================================= */
@media (max-width: 849px) {
  .header-bottom .nav-dropdown {
    position: static !important;
    inset: auto;
    padding: 16px;
  }

  .header-bottom .nav-dropdown-col {
    width: 100%;
  }

  .header-bottom .nav-dropdown-col > ul {
    grid-template-columns: 1fr;
  }
}
/* ẢNH – ĐỒNG KÍCH THƯỚC */
/* ===============================
   FIX ẢNH MEGA MENU = CÙNG KÍCH THƯỚC
   =============================== */

/* Khung ảnh cố định */
.header-bottom .nav-dropdown li.has-icon-left > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ÉP TẤT CẢ ICON VỀ CÙNG SIZE */
.header-bottom .nav-dropdown img.ux-menu-icon {
  width: 93px !important;
  height: 93px !important;

  object-fit: contain;   /* KHÔNG MÉO */
  display: block;
  margin: 0 auto 8px;    /* căn giữa + cách chữ */

  max-width: none !important;
  max-height: none !important;
}
.nav:not(.nav-slide) .active>.children {
    left: auto;
    background: #ffffff!important;

}

.box-text {

    text-align: center;
}