/* ==========================================================================
   DROPII AFFILIATE - RESPONSIVE & MOBILE-FIRST BREAKPOINTS
   Mobile: < 768px | Tablet: 768px - 1023px | Desktop: >= 1024px
   ========================================================================== */

/* Mobile Enhancements (< 768px) */
@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
  }

  .nav-desktop,
  .btn-partner-nav,
  .desktop-floating-contact {
    display: none !important;
  }

  .btn-hamburger {
    display: flex;
  }

  .mobile-bottom-nav {
    display: block;
  }

  .hero-square-slider .banner-slide {
    aspect-ratio: 1 / 1;
  }

  .hero-vertical-banner {
    height: 120px;
    min-height: 120px;
  }

  .banner-arrow {
    display: none; /* Swipe is primary on mobile */
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .product-body {
    padding: 8px 10px;
  }

  .product-name {
    font-size: 0.825rem;
    min-height: 2.2em;
  }

  .product-price-sale {
    font-size: 0.925rem;
  }

  .btn-detail {
    font-size: 0.7rem;
    padding: 6px 2px;
  }

  .btn-buy-affiliate {
    font-size: 0.725rem;
    padding: 6px 4px;
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end; /* Bottom sheet experience on mobile */
  }

  .modal-content-box {
    max-height: 88vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .product-modal-grid {
    padding: 18px 16px;
    gap: 16px;
  }

  .modal-sticky-footer {
    padding: 12px 16px;
  }

  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast-item {
    min-width: unset;
    max-width: 100%;
  }

  /* Video Slider Mobile */
  .video-slide-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .video-card .video-title {
    font-size: 0.825rem;
    min-height: 2.3em;
  }

  .video-card .video-desc {
    display: none;
  }

  .video-card .video-body {
    padding: 8px 10px;
  }

  .video-play-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .video-popup-overlay {
    align-items: center; /* keep video modal centered even on mobile */
    padding: 12px;
  }

  .video-modal-dialog {
    border-radius: var(--radius-md);
  }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .forms-dual-container {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .product-modal-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .hero-square-slider .banner-slide {
    aspect-ratio: 1 / 1;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

/* Desktop (>= 1024px) */
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .hero-square-slider .banner-slide {
    aspect-ratio: 1 / 1;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .section-wrapper {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

/* Extra Large Desktop (>= 1280px) */
@media (min-width: 1280px) {
  .product-grid.grid-5-col {
    grid-template-columns: repeat(5, 1fr);
  }
}
