@media (min-width: 1200px) {}

@media (max-width: 1199px) {
  #search {
    right: 15px;
  }

  #container {
    padding: 20px 15px;
  }

  .box-dt {
    max-width: 95%;
  }

  .box-tintuc {
    max-width: 95%;
  }

  .box-product-list {
    gap: 15px;
  }

  .box-product {
    width: calc((100% - 30px) / 3);
  }
}

@media (min-width: 993px) and (max-width: 1199px) {}

@media (max-width: 992px) {

  .left-pro-detail,
  .right-pro-detail {
    width: 100%;
  }

  body {
    overflow-x: visible;
  }

  .album-list,
  .video-list {
    gap: 15px;
  }

  .box-album,
  .box-video {
    width: calc((100% - 30px) / 3);
  }

  .box-product-list {
    gap: 15px;
  }

  .box-product {
    width: calc((100% - 30px) / 3);
  }

  .product-detail_slick {
    margin-right: -15px;
  }

  .product-detail_slick .slick-slide {
    margin-right: 15px;
  }

  #header,
  .banner-ab,
  #menu,
  .right {
    display: none;
  }

  #banner .center {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .banner {
    padding: 0;
  }

  #menu-mobile {
    display: block;
  }

  #smenu a {
    font-family: RM;
    color: #fff;
    font-size: 16px;
    margin-left: 5px;
  }

  .left {
    width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 991px) {}

@media (max-width: 768px) {
  .news-total-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 10px;
  }

  .boxs-news {
    width: calc((100% - 10px) / 2);
  }

  .album-list,
  .video-list {
    gap: 10px;
  }

  .box-album,
  .box-video {
    width: calc((100% - 10px) / 2);
  }

  .product-detail_slick {
    margin-right: -10px;
  }

  .product-detail_slick .slick-slide {
    margin-right: 10px;
  }

  .box-product-list {
    gap: 10px;
  }

  .box-product {
    width: calc((100% - 10px) / 2);
  }

  .product-detail-left,
  .product-detail-right {
    width: 100%;
  }

  .product-detail-image-container {
    flex-direction: column-reverse;
  }

  .product-detail-left>span {
    transform: translateY(-50%);
    top: 50%;
  }

  .product-detail-prev {
    left: -6px;
  }

  .product-detail-next {
    right: -6px;
    bottom: unset;
  }


  .btn-zalo,
  .btn-phone,
  #messages-facebook,
  .control-product {
    display: none;
  }

  .fix-toolbar {
    display: block;
  }

  .content iframe {
    width: 100% !important;
    height: 45vh;
  }

  .content img {
    height: inherit !important;
  }

  .progress-wrap {
    bottom: 100px;
  }

  #footer {
    padding-bottom: 78px;
  }

  .footer-top {
    padding-bottom: 0;
  }

  .footer-1,
  .footer-2,
  .footer-3 {
    width: 100%;
    float: none;
    margin: 0 0 20px 0;
  }

  .copyright,
  .statistic {
    width: 100%;
  }

  .statistic span {
    margin: 0 5px;
  }

  .ft-b .center>div {
    width: 100%;
  }

  .top-contact .article-contact {
    width: 100%;
    margin-bottom: 20px;
  }

  .form-contact {
    width: 100%;
    padding: 20px 15px;
  }

  #top .center>div {
    width: 100%;
  }

  #top #breadcrumb {
    margin-bottom: 0;
  }

  .pic-hot-news,
  .desc-hot-news {
    width: 100%;
  }

  .desc-hot-news {
    padding: 15px;
  }

  .box-hot-news {
    margin-bottom: 25px;
  }

  .bottom-left {
    width: 100%;
    margin-bottom: 20px;
  }

  .bottom-right:not(.onApp) {
    width: 100%;
  }

  .tintuc-l {
    width: 100%;
    margin-bottom: 20px;
  }

  .tintuc-r {
    width: 100%;
  }

  .left-pro-detail {
    float: none;
    width: 100%;
    margin: 0 0 20px;
  }

  .right-pro-detail {
    float: none;
    width: 100%;
  }

  .grid-thuvienanh {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 22vh);
  }

  .box-thuvienanh .box-thuvienanh-content {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
  }

  .item-address-contact {
    width: 100% !important;
  }
}

@media (min-width: 481px) and (max-width: 767px) {}

@media (max-width: 576px) {
  .user-col label {
    width: 100%;
  }

  .user-col {
    flex-direction: column;
    margin-bottom: 0;
  }

  .attr-label-pro-detail-cart {
    flex-direction: column !important;
    align-items: start;
    justify-content: start;
    gap: 10px;
  }

  .cart-pro-detail {
    margin: 0;
  }

  .album-list,
  .video-list {
    gap: 5px;
  }

  .box-album,
  .box-video {
    width: calc((100% - 5px) / 2);
  }

  .product-detail_slick {
    margin-right: -5px;
  }

  .product-detail_slick .slick-slide {
    margin-right: 5px;
  }

  .box-product-list {
    gap: 5px;
  }

  .box-product {
    width: calc((100% - 5px) / 2);
  }
}

@media (max-width: 480px) {
  .time-news span:nth-child(1):after {
    display: none !important;
  }

  .time-news {
    flex-direction: column;
    align-items: start;
    margin: 5px 0 5px;
  }

  .time-news span:nth-child(2) {
    margin: 0;
    font-size: 12px;
    line-height: 1;
  }

  .info-news {
    margin: 3px 0 0;
  }
}

@media (max-width: 374px) {}

/* ==================== LINH QUÂN 095426W – LAYOUT CHUNG (D4) ==================== */
/* Menu chính ≥ 1311px: mỗi mục rộng theo khung Figma, nội dung căn giữa, các khung cách nhau 35px (tên dài hơn thì khung tự nới) */
@media (min-width: 1311px) {
  .nav-main-list {
    justify-content: flex-start;
    gap: 35px;
  }

  .nav-main-link {
    padding: 0 3px;
  }

  .nav-main-item:nth-child(1) .nav-main-link,
  .nav-main-item:nth-child(3) .nav-main-link {
    min-width: 126px;
  }

  .nav-main-item:nth-child(2) .nav-main-link {
    min-width: 139px;
  }

  .nav-main-item:nth-child(4) .nav-main-link {
    min-width: 178px;
  }

  .nav-main-item:nth-child(5) .nav-main-link {
    min-width: 192px;
  }

  .nav-main-item:nth-child(6) .nav-main-link,
  .nav-main-item:nth-child(7) .nav-main-link {
    min-width: 107px;
  }

  .nav-main-item:last-child {
    margin-left: auto;
  }
}

@media (max-width: 1310px) {
  .header-middle {
    flex-basis: 560px;
    margin: 0 20px;
  }

  .nav-main-link {
    gap: 6px;
    padding: 0 5px;
    font-size: 15px;
  }

  .footer-box {
    margin-left: 15px;
    margin-right: 15px;
  }

  .footer-brands {
    padding: 0 15px;
  }
}

@media (max-width: 1199px) {
  .topbar-link span {
    display: none;
  }

  .header-right {
    gap: 10px;
  }

  .btn-hotline {
    width: auto;
    padding: 0 14px;
  }

  .nav-main-link {
    font-size: 14px;
  }

  .nav-main-link svg,
  .nav-main-link img {
    width: 20px;
    height: 20px;
  }

  .footer-box {
    padding: 40px 30px;
  }

  .footer-info {
    flex-basis: 250px;
  }

  .footer-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 1023px) {
  .site-header {
    display: none;
  }

  body #menu-mobile {
    display: block;
  }

  .menu-bar-res {
    height: 64px;
    background-color: #fff;
  }

  .social-float {
    display: none;
  }

  /* Footer mobile: căn giữa tất cả */
  .site-footer {
    padding: 40px 0 30px;
    text-align: center;
  }

  .footer-brands {
    margin-bottom: 40px;
  }

  .footer-box {
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
  }

  .footer-info {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .btn-map {
    margin: 24px 0 0;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    padding-top: 30px;
  }

  .footer-list {
    padding-left: 0;
    list-style-position: inside;
  }

  .site-footer .copyright {
    padding: 0 15px;
    text-align: center;
  }
}

@media (max-width: 575px) {
  .footer-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-brand {
    height: 80px;
  }
}

/* ==================== LINH QUÂN 095426W – TRANG CHỦ (D5) ==================== */
@media (max-width: 1199px) {
  .home-hero {
    gap: 12px;
  }

  .hero-banners {
    gap: 12px;
  }

  .promo-banner-content {
    top: 24px;
    left: 16px;
  }

  .promo-banner-title,
  .promo-banner-sub {
    font-size: 18px;
  }

  .btn-more {
    margin-top: 16px;
  }

  .home-bestbuy {
    gap: 16px;
  }

  .bestbuy-tab {
    font-size: 18px;
  }

  .category-item {
    padding-left: 12px;
  }

  .about-box {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 40px;
  }

  .about-box::before {
    inset: 20px;
  }

  .about-content {
    flex: none;
    padding: 0;
  }

  .order-card {
    flex: none;
    margin: 0;
  }
}

@media (max-width: 1023px) {
  body.index .site-main {
    padding: 15px 0 40px;
  }

  .home-hero {
    flex-direction: column;
  }

  .hero-slide,
  .hero-banners {
    flex: none;
  }

  /* 2 banner xếp 1 hàng, cách nhau 12px */
  .hero-banners {
    flex-direction: row;
  }

  .hero-banners .promo-banner {
    flex: 1;
    min-width: 0;
  }

  /* Mobile: nút chuyển luôn dễ chạm */
  .slider-nav {
    width: 34px;
    height: 34px;
    opacity: 1;
    visibility: visible;
  }

  .home-criteria,
  .home-featured,
  .home-category,
  .home-block,
  .home-banner,
  .home-promo,
  .home-about,
  .home-news {
    margin-top: 28px;
  }

  .title-badge {
    height: 54px;
    margin-left: 0;
    padding-left: 48px;
    font-size: 24px;
  }

  .featured-panel {
    padding: 24px 12px;
  }

  .home-bestbuy {
    flex-direction: column-reverse;
    padding: 12px;
  }

  /* 2 banner xếp dọc */
  .bestbuy-banners.is-active {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }

  .bestbuy-banner img {
    width: 100%;
    height: auto;
    aspect-ratio: 216 / 436;
    max-height: 436px;
  }

  .bestbuy-banners .bestbuy-banner {
    width: 100%;
    max-width: 216px;
  }

  .bestbuy-tabs {
    gap: 8px;
    margin: 0;
  }

  .bestbuy-tab {
    flex: 1;
    height: 48px;
    font-size: 15px;
  }

  .bestbuy-tab::before {
    inset: 0 10px;
  }

  .bestbuy-panel .slider-prev {
    left: -6px;
  }

  .bestbuy-panel .slider-next {
    right: -6px;
  }

  .category-box {
    padding: 15px 12px;
  }

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

  .home-block {
    padding: 20px 12px 15px;
  }

  .home-block .block-head {
    flex-wrap: wrap;
    gap: 12px 15px;
    padding: 0;
    margin-bottom: 20px;
  }

  .block-title {
    font-size: 24px;
    line-height: 30px;
  }

  .block-tabs {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
  }

  .block-tab {
    flex-shrink: 0;
    padding: 0 16px;
  }

  .home-block .block-panel>.slider-nav,
  .home-block>.slider-nav {
    top: 50%;
  }

  .about-box {
    padding: 30px 25px;
  }

  .about-box::before {
    inset: 12px;
  }

  .order-card {
    padding: 25px 18px;
  }

  .order-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .home-news .slider-nav {
    top: 50%;
  }

  .home-news {
    padding: 0 15px;
  }

  .news-head-title {
    margin: 0 0 24px;
    font-size: 24px;
    line-height: 30px;
  }
}

@media (max-width: 575px) {
  .title-badge {
    padding-left: 32px;
    font-size: 22px;
  }

  .promo-banner-content {
    top: 12px;
    left: 10px;
  }

  .promo-banner-title,
  .promo-banner-sub {
    font-size: 13px;
    line-height: 16px;
  }

  .promo-banner-sub {
    margin-top: 4px;
  }

  .btn-more {
    width: auto;
    gap: 2px;
    height: 28px;
    margin-top: 8px;
    font-size: 12px;
  }

  .btn-more svg {
    width: 18px;
    height: 18px;
  }

  .home-promo .promo-banner-title,
  .home-promo .promo-banner-sub {
    font-size: 18px;
    line-height: 20px;
  }

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

  .category-item {
    height: 72px;
    gap: 6px;
    padding: 0 6px;
  }

  .category-item-image {
    width: 52px;
    height: 52px;
  }

  .product-card {
    min-height: 0;
    padding: 12px 6px 6px;
  }

  .product-card-name {
    font-size: 14px;
    line-height: 19px;
  }

  .product-card-button {
    height: 40px;
  }

  .about-box {
    padding: 24px 16px;
  }

  .about-box::before {
    inset: 8px;
  }

  .order-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  /* Chữ tối thiểu 16px tránh iOS phóng to */
  .order-field input,
  .order-field textarea {
    font-size: 16px;
  }

  .order-submit {
    margin-top: 0;
    font-size: 18px;
  }

  .news-card {
    padding: 16px 14px 20px;
  }

  .news-card-more {
    margin-top: 24px;
  }
}

/* ===================== TRANG CON (D6) ===================== */
@media (max-width: 1199px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {

  .product-page,
  .news-page.has-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-sidebar,
  .news-sidebar {
    position: relative;
    top: 0;
  }

  .product-sidebar-list {
    max-height: 320px;
    overflow-y: auto;
  }

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

  .product-detail-top,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 25px;
  }

  .product-detail-gallery {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .news-grid,
  .news-page.has-sidebar .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .product-detail-title,
  .news-detail-title {
    font-size: 22px;
    line-height: 30px;
  }

  .product-detail-price .price-new {
    font-size: 22px;
  }

  .contact-box {
    padding: 20px 16px;
  }

  .contact-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .input-contact .form-control {
    font-size: 16px;
  }

  .contact-map iframe {
    height: 300px;
  }
}

/* Chừa chỗ cho thanh gradient-bar mobile (hiện ≤ 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 66px;
  }
}

/* Lưới bài viết: dưới 480px mới 1 bài / hàng */
@media (max-width: 479px) {
  .news-grid,
  .news-page.has-sidebar .news-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==================== LINH QUÂN 095426W – Bài viết Nổi Bật cạnh slide ==================== */
@media (max-width: 1199px) {
  .home-hero {
    gap: 12px;
  }

  .hero-news {
    padding: 14px 0 16px 14px;
  }

  .hero-news-list {
    gap: 12px;
    margin-top: 28px;
    padding-right: 14px;
  }

  .hero-news-image {
    flex-basis: 120px;
    height: 70px;
  }

  .hero-news-info {
    padding-top: 0;
    gap: 2px;
  }

  .hero-news-name {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 1023px) {
  .hero-news {
    flex: none;
  }

  .hero-news-list {
    flex: none;
    max-height: 320px;
  }

  .hero-news-name {
    -webkit-line-clamp: 3;
  }
}

@media (max-width: 575px) {
  .hero-news-title {
    font-size: 18px;
  }

  .hero-news-image {
    flex-basis: 110px;
    height: 64px;
  }
}
