/* ============================================================
   RESPONSIVE.CSS — Tahir Islam Furniture
   Breakpoints:
     xl  : 1280px  (large desktops  — base styles in styles.css)
     lg  : 1023px  (laptops / small desktops)
     md  : 767px   (tablets)
     sm  : 479px   (mobile phones)
   ============================================================ */

/* ===== GLOBAL ===== */
.container {
  width: 100%;
  padding: 0 20px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   ≤ 1023px  — Laptops / small desktops
   ============================================================ */
@media (max-width: 1023px) {

  /* ── Header ── */
  .header-since {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 80px;
    right: 0;
    width: 280px;
    height: calc(100vh - 80px);
    background: var(--white);
    flex-direction: column;
    padding: 40px 32px;
    gap: 24px;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
    animation: slideIn 0.3s ease;
  }

  /* ── Hero ── */
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content {
    text-align: center;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-sub {
    margin: 0 auto 32px;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-visual {
    max-width: 560px;
    margin: 0 auto;
  }

  .hero-floating {
    bottom: 10px;
    left: 10px;
  }

  /* ── Features ── */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ── Products (homepage grid) ── */
  .products-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 220px;
  }

  .products-grid .product-card:nth-child(1) {
    grid-column: span 6;
    grid-row: span 1;
  }

  .products-grid .product-card:nth-child(2) { grid-column: span 3; }
  .products-grid .product-card:nth-child(3) { grid-column: span 3; }
  .products-grid .product-card:nth-child(4) { grid-column: span 3; }
  .products-grid .product-card:nth-child(5) { grid-column: span 3; }
  .products-grid .product-card:nth-child(6) { grid-column: span 6; }

  /* ── Reviews ── */
  .review-card {
    min-width: calc(50% - 16px);
  }

  /* ── Heritage ── */
  .heritage .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .heritage-image {
    max-width: 480px;
    margin: 0 auto;
  }

  /* ── Footer ── */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }

  /* ── Contact ── */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    justify-content: center;
  }

  .contact-form {
    max-width: 100%;
  }

  /* ── Products Page – featured cards ── */
  .featured-products {
    padding: 0 1.5rem;
    gap: 1.5rem;
  }

  .product-card {         /* products page card */
    flex: 1 1 100%;
  }

  /* ── Section titles (products page) ── */
  .section-title,
  .offers-title {
    font-size: 2.2rem;
    padding-left: 24px;
  }

  /* ── Category navbar ── */
  .category-navbar {
    margin-left: 20px;
    flex-wrap: wrap;
  }
}


/* ============================================================
   ≤ 767px  — Tablets & large phones
   ============================================================ */
@media (max-width: 767px) {

  /* ── Global container ── */
  .container {
    padding: 0 16px;
  }

  /* ── Header ── */
  .header .container {
    height: 68px;
  }

  .nav-links {
    top: 68px;
    height: calc(100vh - 68px);
  }

  .logo img {
    width: 48px;
    height: 48px;
  }

  /* ── Hero ── */
  .hero {
    min-height: auto;
    padding: 100px 0 60px;
  }

  .hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-floating {
    left: 50%;
    bottom: -16px;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  /* ── Sections ── */
  .features {
    padding: 70px 0;
  }

  .products {
    padding: 70px 0;
  }

  .reviews {
    padding: 70px 0;
  }

  .heritage {
    padding: 70px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-title {
    font-size: 2rem;
    padding-left: 0;
  }

  .offers-title {
    font-size: 2rem;
    padding-left: 16px;
  }

  /* ── Features ── */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    padding: 28px 20px;
  }

  /* ── Homepage products grid ── */
  .products-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
    gap: 16px;
  }

  .products-grid .product-card:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* Always show overlay on mobile (no hover) */
  .product-overlay {
    opacity: 1;
  }

  /* ── Reviews ── */
  .reviews-track {
    gap: 16px;
  }

  .review-card {
    min-width: 100%;
  }

  .review-info {
    padding: 20px;
  }

  .review-quote {
    font-size: 0.9rem;
  }

  .carousel-controls {
    gap: 12px;
    margin-top: 32px;
  }

  .carousel-btn {
    width: 44px;
    height: 44px;
  }

  .carousel-btn svg {
    width: 20px;
    height: 20px;
  }

  .carousel-dots {
    min-width: 80px;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
  }

  .carousel-dot.active {
    width: 24px;
  }

  /* ── Heritage ── */
  .heritage h2 {
    font-size: 2rem;
  }

  .heritage-stats {
    flex-direction: column;
    gap: 20px;
  }

  /* ── Footer ── */
  .footer {
    padding: 60px 0 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 20px 0;
  }

  .footer-bottom-links {
    gap: 16px;
  }

  .newsletter-form {
    flex-direction: column;
    gap: 8px;
  }

  .newsletter-form input {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
  }

  .newsletter-form button {
    border-radius: var(--radius-sm);
    text-align: center;
  }

  /* ── Contact ── */
  .contact-section {
    padding: 80px 0 40px;
  }

  .contact-info {
    text-align: center;
    max-width: 100%;
  }

  .contact-form {
    max-width: 100% !important;
    padding: 24px 16px;
  }

  /* ── Products page ── */
  .product-banner {
    height: 50vh;
    font-size: 1.1rem;
  }

  .featured-products {
    flex-direction: column;
    padding: 0 1rem;
    gap: 1.5rem;
  }

  /* products.html product-card (featured) */
  .featured-products .product-card {
    flex-direction: column;
    flex: 1 1 100%;
    gap: 1rem;
  }

  .featured-products .product-card img {
    width: 100%;
    height: 220px;
  }

  .section-title {
    padding-left: 16px;
  }

  .category-navbar {
    margin-left: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .cat-row {
    padding: 1rem 1rem 2rem;
    gap: 1.2rem;
  }

  .cat-card {
    flex: 1 1 calc(50% - 1rem);
    max-width: none;
  }

  .cat-card img {
    height: 180px;
  }

  /* ── WhatsApp button ── */
  .whatsapp-button {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    font-size: 24px;
  }

  .whatsapp-button svg {
    width: 26px;
    height: 26px;
  }
}


/* ============================================================
   ≤ 479px  — Small phones
   ============================================================ */
@media (max-width: 479px) {

  /* ── Container ── */
  .container {
    padding: 0 14px;
  }

  /* ── Hero ── */
  .hero {
    padding: 90px 0 50px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-badge {
    font-size: 0.72rem;
    padding: 6px 14px;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .hero-floating {
    padding: 14px 18px;
  }

  .hero-floating .number {
    font-size: 1.6rem;
  }

  /* ── Section headings ── */
  .section-title {
    font-size: 1.7rem;
  }

  .section-label {
    font-size: 0.72rem;
  }

  .section-subtitle {
    font-size: 0.92rem;
  }

  /* ── Features ── */
  .feature-card {
    padding: 24px 16px;
  }

  .feature-card h3 {
    font-size: 1.2rem;
  }

  /* ── Heritage ── */
  .heritage h2 {
    font-size: 1.7rem;
  }

  .heritage-stat .stat-number {
    font-size: 1.9rem;
  }

  /* ── Buttons ── */
  .btn-primary,
  .btn-secondary {
    padding: 14px 24px;
    font-size: 0.88rem;
  }

  /* ── Products grid (homepage) ── */
  .products-grid {
    grid-auto-rows: 200px;
  }

  /* ── Products page ── */
  .product-banner {
    height: 40vh;
    font-size: 1rem;
  }

  .offers-title {
    font-size: 1.6rem;
    padding-left: 14px;
    padding-top: 14px;
  }

  .featured-products {
    padding: 0 0.8rem;
  }

  .featured-products .product-card img {
    height: 180px;
  }

  .cat-card {
    flex: 1 1 100%;
  }

  .cat-card img {
    height: 200px;
  }

  /* ── Review card ── */
  .review-video {
    aspect-ratio: 16/9;
  }

  /* ── Contact ── */
  .contact-form {
    padding: 20px 16px;
    max-width: 100% !important;
  }

  .contact-form .form-row {
    margin-bottom: 12px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 10px 12px;
    font-size: 16px;
  }

  /* ── Footer ── */
  .footer-grid {
    gap: 24px;
  }

  .footer h4 {
    font-size: 1rem;
  }

  .footer-links a,
  .footer-contact li {
    font-size: 0.85rem;
  }

  /* ── Logo ── */
  .logo-text {
    font-size: 0.95rem;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

  /* ── Category navbar ── */
  .category-navbar {
    gap: 6px;
    padding: 14px 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-navbar::-webkit-scrollbar {
    display: none;
  }

  .category-navbar a {
    white-space: nowrap;
    flex-shrink: 0;
  }
}
