/* ==========================================================================
   RESPONSIVE STYLES (FLATSOME CHILD) - THUY AN NHUNG
   File: assets/css/media.css
   ========================================================================== */

/* --- 1. Man hinh duoi 1080px: Cho phep Topbar wrap linh hoat --- */
@media only screen and (max-width: 1080px) {
  .tan-topbar-inner {
    flex-wrap: wrap !important;
    gap: 8px 16px !important;
    height: auto !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  .tan-topbar-left,
  .tan-topbar-right {
    flex-wrap: wrap !important;
    gap: 8px 14px !important;
  }
}

/* --- 2. Man hinh duoi 991px: An tan-header-nav, bat menu mobile --- */
@media only screen and (max-width: 991px) {

  /* An hoan toan thanh menu ngang desktop */
  .tan-header-nav {
    display: none !important;
  }

  /* Bat nut hamburger menu mobile */
  .tan-mobile-toggle {
    display: inline-flex !important;
  }

  .tan-header-main-inner {
    flex-wrap: wrap;
    gap: 15px;
  }

  .tan-header-search-box {
    order: 3;
    max-width: 100%;
    width: 100%;
    display: none;
  }

  .tan-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .tan-policy-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tan-policy-sidebar {
    position: static;
    width: 100%;
  }

  .tan-policy-sidebar-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9edef;
    box-shadow: 0 4px 14px rgba(20, 45, 45, 0.05);
    overflow: hidden;
    padding: 0;
  }

  .tan-policy-nav-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
  }

  .tan-policy-nav-item {
    width: 100%;
  }

  .tan-policy-nav-link {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #333d40;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    background: transparent;
  }

  .tan-policy-nav-item:last-child .tan-policy-nav-link {
    border-bottom: none;
  }

  .tan-policy-nav-item.is-active .tan-policy-nav-link {
    background: #eaf7f6;
    color: #0e9494;
    font-weight: 700;
  }

  .tan-policy-nav-indicator {
    display: inline-block !important;
    width: 4px;
    height: 16px;
    background: #0e9494;
    border-radius: 2px;
    margin-right: 10px;
    flex-shrink: 0;
  }

  .tan-policy-nav-item:not(.is-active) .tan-policy-nav-indicator {
    display: none !important;
  }

  .tan-policy-content-card {
    padding: 24px 18px;
  }
}

/* --- 3. Man hinh Mobile (max-width: 600px): An gio lam viec va mail --- */
@media only screen and (max-width: 600px) {

  /* An gio lam viec va email tren topbar theo yeu cau */
  .tan-topbar-hours,
  .tan-topbar-email,
  .tan-topbar-left .tan-topbar-item:nth-child(2),
  .tan-topbar-right a[href^="mailto:"] {
    display: none !important;
  }

  .tan-topbar-inner {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }

  .tan-topbar-left,
  .tan-topbar-right {
    gap: 8px !important;
    font-size: 11.5px !important;
  }

  .tan-logo-brand {
    font-size: 18px !important;
  }

  .tan-btn-zalo-pill span {
    display: none !important;
  }

  .tan-btn-zalo-pill {
    padding: 9px !important;
    border-radius: 50% !important;
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .tan-footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .tan-floating-stack {
    bottom: 15px;
    right: 15px;
  }

  .tan-float-btn {
    width: 40px;
    height: 40px;
  }

  .tan-policy-banner-title {
    font-size: 22px;
  }

  .tan-policy-section {
    padding: 22px 0 45px;
  }

  .tan-policy-content-card {
    padding: 20px 16px;
    border-radius: 10px;
  }

  .tan-policy-article-title {
    font-size: 19px;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .tan-policy-article-body {
    font-size: 14px;
    line-height: 1.65;
  }

  .tan-policy-article-body h2,
  .tan-policy-article-body h3 {
    font-size: 16.5px;
    margin: 20px 0 10px;
  }

  .tan-policy-article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
  }

  .tan-policy-article-body img {
    max-width: 100% !important;
    height: auto !important;
  }
}

@media(max-width: 480px) {
  .tan-header-logo {
    max-width: 140px;
  }

  .tan-header-actions,
  .tan-header-logo-wrap {
    gap: 8px;
  }

  .tan-container {
    padding: 0 15px;
  }

  .tan-action-circle-btn,
  .tan-mobile-toggle {
    width: 35px;
    height: 35px;
  }
}

/* Homepage Responsive */
@media(max-width: 992px) {
  .tan-hero-grid {
    grid-template-columns: 1fr;
  }

  .tan-hero-sidebar {
    display: none;
  }

  .tan-hero-banner {
    padding: 35px 25px;
  }

  .tan-hero-title {
    font-size: 24px;
  }

  .tan-values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .tan-animal-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .tan-featured-cats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tan-product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .tan-product-slider {
    margin: 0 -7px;
  }

  .tan-product-slider:not(.flickity-enabled) .tan-product-card {
    flex: 0 0 calc(33.333% - 14px) !important;
  }

  .tan-product-slider .flickity-slider>.tan-product-card,
  .tan-product-slider .tan-product-card {
    width: calc(33.333% - 14px) !important;
    max-width: calc(33.333% - 14px) !important;
    flex: 0 0 calc(33.333% - 14px) !important;
    margin: 0 7px !important;
  }

  .tan-b2b-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 18px;
  }

  .tan-blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .tan-store-card-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 600px) {
  .tan-values-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tan-animal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tan-featured-cats-grid {
    grid-template-columns: 1fr;
  }

  .tan-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tan-product-slider {
    margin: 0 -5px;
  }

  .tan-product-slider:not(.flickity-enabled) .tan-product-card {
    flex: 0 0 calc(50% - 10px) !important;
  }

  .tan-product-slider .flickity-slider>.tan-product-card,
  .tan-product-slider .tan-product-card {
    width: calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    flex: 0 0 calc(50% - 10px) !important;
    margin: 0 5px !important;
  }

  .tan-product-info {
    padding: 10px;
  }

  .tan-product-name {
    font-size: 12.5px;
    height: 34px;
  }

  .tan-flash-card .tan-product-price-box,
  .tan-product-price-box {
    min-height: 46px;
  }

  .tan-blog-grid {
    grid-template-columns: 1fr;
  }

  .tan-flash-sale-box {
    padding: 16px 12px 20px;
    border-radius: 12px;
  }

  .tan-flash-sale-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .tan-flash-sale-title-wrap {
    flex-wrap: wrap;
  }
}

@media(max-width: 480px) {
  .tan-hero-banner {
    padding: 25px 18px;
    min-height: 320px;
  }

  .tan-hero-title {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 10px;
  }

  .tan-hero-desc {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .tan-slider-dots {
    left: 18px;
    bottom: 14px;
  }

  .tan-flash-sale-title {
    font-size: 18px;
  }

  .tan-flash-card .tan-product-name {
    font-size: 12px;
    height: 32px;
  }

  .tan-flash-card .tan-product-price-box,
  .tan-product-price-box {
    min-height: 42px;
  }

  .tan-product-slider {
    margin: 0 -4px;
  }

  .tan-product-slider:not(.flickity-enabled) .tan-product-card {
    flex: 0 0 calc(50% - 8px) !important;
  }

  .tan-product-slider .flickity-slider>.tan-product-card,
  .tan-product-slider .tan-product-card {
    width: calc(50% - 8px) !important;
    max-width: calc(50% - 8px) !important;
    flex: 0 0 calc(50% - 8px) !important;
    margin: 0 4px !important;
  }

  .tan-btn-add-to-cart {
    font-size: 11px;
    padding: 7px 4px;
  }

  .tan-btn-add-to-cart svg {
    width: 12px;
    height: 12px;
  }
}

@media(max-width: 375px) {
  .tan-product-slider:not(.flickity-enabled) .tan-product-card {
    flex: 0 0 calc(100% - 8px) !important;
  }

  .tan-product-slider .flickity-slider>.tan-product-card,
  .tan-product-slider .tan-product-card {
    width: calc(100% - 8px) !important;
    max-width: calc(100% - 8px) !important;
    flex: 0 0 calc(100% - 8px) !important;
    margin: 0 4px !important;
  }
}