/* ============================================
   RESPONSIVE CSS - FerramentasMax
   Breakpoints: 320px, 480px, 576px, 768px, 1024px, 1440px
   ============================================ */

/* === TABLET AND BELOW (< 1024px) === */
@media (max-width: 1023px) {
  :root {
    --container-padding: 1.5rem;
    --spacing-xxl: 4rem;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: var(--spacing-xl) 0;
  }

  /* Product Page */
  .product-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .gallery-section {
    position: static;
  }

  .period-buttons {
    grid-template-columns: 1fr 1fr;
  }
}

/* === TABLET AND BELOW (< 768px) === */
@media (max-width: 767px) {
  :root {
    --container-padding: 1rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
  }

  /* Header Mobile */
  .header {
    padding: var(--spacing-sm) 0;
  }

  .menu-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px var(--spacing-lg) var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    gap: 0;
  }

  .nav.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .nav-link {
    color: var(--text-dark);
    display: block;
    padding: var(--spacing-md) var(--spacing-sm);
    border-bottom: 1px solid var(--gray-light);
  }

  .nav-link::after {
    display: none;
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  /* Cards */
  .card-img {
    height: 200px;
  }

  .category-card {
    height: 240px;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* Section */
  .section {
    padding: var(--spacing-lg) 0;
  }

  /* Hero (homepage) */
  .hero {
    min-height: 500px !important;
  }

  .hero-content h1 {
    font-size: 2rem !important;
  }

  .hero-content p {
    font-size: 1rem !important;
  }

  /* Buttons */
  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .btn-large {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
  }

  /* Swiper Carousel */
  .swiper-slide .card {
    max-width: 100%;
  }

  /* Catalog Page */
  .catalog-main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    margin-bottom: var(--spacing-lg);
  }

  .search-bar input {
    padding-right: 90px;
    font-size: 0.95rem;
    padding-left: var(--spacing-md);
  }

  .search-bar button {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .catalog-toolbar {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: flex-start;
  }

  /* Product Page */
  .product-page {
    padding-top: 80px;
  }

  .product-info-section h1 {
    font-size: 2rem;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

  .period-buttons {
    grid-template-columns: 1fr;
  }
}

/* === DESKTOP HERO (>= 768px) === */
@media (min-width: 768px) {
  .hero {
    padding-top: 0;
    padding-bottom: 0;
  }

  .swiper-slide .card {
    max-width: 400px;
  }
}

@media (min-width: 576px) {
  .swiper-slide .card {
    max-width: 400px;
  }
}

/* === MOBILE SMALL (< 480px) === */
@media (max-width: 479px) {
  :root {
    --container-padding: 0.875rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  .nav {
    width: 100%;
  }

  .category-card {
    height: 220px;
  }

  .card-img {
    height: 180px;
  }
}

/* === LARGE DESKTOP (>= 1440px) === */
@media (min-width: 1440px) {
  :root {
    --container-padding: 3rem;
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .category-card {
    height: 320px;
  }
}

/* === PRINT STYLES === */
@media print {

  .header,
  .footer,
  .menu-toggle,
  .btn {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    padding: 1rem 0;
  }
}