/**
 * RANVYX — Category layout (PC 2×2 ใหญ่ / มือถือ 1 คol. เล็ก)
 */
html body #categories .cat-card-inner {
  min-height: auto !important;
}

/* PC ≥1024px — 2×2 การ์ดใหญ่ (แบบในภาพ) */
@media (min-width: 1024px) {
  html body #categories #catGrid.cat-grid,
  html body #categories .cat-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  html body #categories .cat-card-inner {
    border-width: 1px !important;
  }

  html body #categories .cat-banner {
    height: 240px !important;
    min-height: 240px !important;
    max-height: 240px !important;
    flex: 0 0 240px !important;
  }

  html body #categories .cat-banner-img {
    height: 100% !important;
    width: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: none !important;
  }

  html body #categories .cat-card:hover .cat-banner-img {
    transform: scale(1.03) !important;
  }

  html body #categories .cat-footer--studio {
    min-height: 58px !important;
    padding: 0.65rem 0.85rem !important;
  }

  html body #categories .cat-footer--studio .cat-title {
    font-size: 0.92rem !important;
    font-weight: 800 !important;
  }

  html body #categories .cat-shop-btn {
    padding: 0.45rem 1rem !important;
    font-size: 0.78rem !important;
  }

  html body #categories .cat-card:hover .cat-card-inner {
    transform: translateY(-4px) !important;
  }
}

/* โน้ตบุ๊ก 768–1023px — 2 คol. ขนาดกลาง */
@media (min-width: 768px) and (max-width: 1023px) {
  html body #categories #catGrid.cat-grid,
  html body #categories .cat-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }

  html body #categories .cat-banner {
    height: 180px !important;
    min-height: 180px !important;
    max-height: 180px !important;
    flex: 0 0 180px !important;
  }

  html body #categories .cat-banner-img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    transform: none !important;
  }
}

/* มือถือ 480–767px */
@media (min-width: 480px) and (max-width: 767px) {
  html body #categories #catGrid.cat-grid,
  html body #categories .cat-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  html body #categories .cat-banner {
    height: 110px !important;
    min-height: 110px !important;
    max-height: 110px !important;
    flex: 0 0 110px !important;
  }

  html body #categories .cat-banner-img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    transform: none !important;
  }

  html body #categories .cat-footer--studio {
    min-height: 48px !important;
    padding: 0.45rem 0.6rem !important;
  }

  html body #categories .cat-footer--studio .cat-title {
    font-size: 0.78rem !important;
  }

  html body #categories .cat-shop-btn {
    padding: 0.32rem 0.65rem !important;
    font-size: 0.68rem !important;
  }
}

/* จอเล็ก <480px */
@media (max-width: 479px) {
  html body #categories #catGrid.cat-grid,
  html body #categories .cat-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  html body #categories .cat-banner {
    height: 95px !important;
    min-height: 95px !important;
    max-height: 95px !important;
    flex: 0 0 95px !important;
  }

  html body #categories .cat-footer--studio {
    min-height: 44px !important;
    padding: 0.38rem 0.5rem !important;
  }

  html body #categories .cat-footer--studio .cat-title {
    font-size: 0.72rem !important;
  }

  html body #categories .cat-shop-btn {
    padding: 0.28rem 0.55rem !important;
    font-size: 0.62rem !important;
  }
}
