﻿/* Ladivelle Accents :: frontend\css\responsive.css */
/* ============================================================
   Ladivelle Accents LLC - Responsive Rules
   Mobile-first adjustments across all breakpoints.
   ============================================================ */

/* ---------- Tablet (≤ 1024px) ---------- */
@media (max-width: 1024px) {
  :root {
    --container-pad: 1.5rem;
  }
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--sp-5);
  }
  .cart-layout {
    grid-template-columns: 1fr 320px;
    gap: var(--sp-5);
  }
  .product-detail {
    gap: var(--sp-6);
  }
  .product-detail-media {
    border-radius: var(--radius);
  }
}

/* ---------- Small tablet / large phone (≤ 820px) ---------- */
@media (max-width: 820px) {
  :root {
    --header-h: 64px;
  }

  /* Header: collapse nav into drawer */
  .nav-main {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--clr-surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-3) var(--container-pad) var(--sp-5);
    border-bottom: 1px solid var(--clr-border);
    box-shadow: var(--shadow);
    z-index: 99;
    animation: fade-in var(--dur) var(--ease);
  }
  .nav-main.is-open { display: flex; }
  .nav-main a {
    padding: var(--sp-3) 0;
    font-size: var(--fs-md);
    border-bottom: 1px solid var(--clr-border-soft);
  }
  .nav-main a:last-child { border-bottom: none; }
  .nav-main a.is-active::after { display: none; }
  .nav-main a.is-active { font-weight: 600; }
  .nav-toggle { display: inline-flex; }

  /* Hero */
  .hero {
    padding: var(--sp-6) 0 var(--sp-5);
  }
  .hero p { font-size: var(--fs-md); }

  /* Product grid: 2 columns */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4);
  }
  .product-name { font-size: var(--fs-md); }
  .product-info { padding: var(--sp-3); }
  .product-actions .btn { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); }

  /* Product detail stacks */
  .product-detail {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
    margin-bottom: var(--sp-6);
  }
  .product-detail-price { font-size: var(--fs-xl); }

  /* Cart */
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .summary { position: static; }

  /* Filter bar stacks */
  .filter-bar {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-5);
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Phone (≤ 560px) ---------- */
@media (max-width: 560px) {
  :root {
    --container-pad: 1rem;
    --fs-3xl: 1.75rem;
    --fs-4xl: 2.25rem;
    --sp-7: 2rem;
    --sp-8: 3rem;
  }

  .brand { font-size: var(--fs-lg); }
  .cart-btn span:not(.cart-count) { display: none; }
  .cart-btn { padding: var(--sp-2); }

  .hero {
    padding: var(--sp-5) 0 var(--sp-4);
  }
  .hero-eyebrow { font-size: 11px; }
  .hero p { font-size: var(--fs-md); margin: var(--sp-3) auto var(--sp-5); }

  .btn { padding: var(--sp-3) var(--sp-4); }
  .btn-lg { padding: var(--sp-3) var(--sp-5); font-size: var(--fs-sm); }

  /* Product grid stays 2 col but tighter */
  .product-grid {
    gap: var(--sp-3);
  }
  .product-info {
    padding: var(--sp-3);
    gap: var(--sp-1);
  }
  .product-cat { font-size: 10px; }
  .product-name { font-size: var(--fs-sm); line-height: 1.35; }
  .product-price { font-size: var(--fs-sm); }
  .product-actions {
    flex-direction: column;
    gap: var(--sp-2);
  }
  .product-actions .btn { width: 100%; }

  /* Cart items become stacked rows */
  .cart-item {
    grid-template-columns: 72px 1fr;
    gap: var(--sp-3);
    padding: var(--sp-3);
  }
  .cart-item-media { width: 72px; height: 72px; }
  .cart-item-info h4 { font-size: var(--fs-sm); }
  .cart-item .qty-control { grid-column: 1 / -1; justify-self: start; }
  .cart-item .cart-item-remove { grid-column: 1 / -1; }

  /* Summary */
  .summary { padding: var(--sp-4); }
  .summary h3 { font-size: var(--fs-lg); }

  /* Forms */
  .form-row {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  /* Trust badges become single column */
  .trust-row {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  /* Steps indicator compact */
  .steps { gap: var(--sp-2); }
  .step span:not(.step-num) { display: none; }
  .step.is-active span:not(.step-num) { display: inline; }

  /* Modals full-width */
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal {
    max-width: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: modal-up var(--dur) var(--ease);
  }
  @keyframes modal-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .modal-head, .modal-body, .modal-foot { padding: var(--sp-4); }

  /* Toast full-width */
  .toast-stack {
    top: auto;
    bottom: var(--sp-4);
    left: var(--sp-4);
    right: var(--sp-4);
  }
  .toast { min-width: 0; max-width: none; }

  /* Order confirmation */
  .confirm-hero { padding: var(--sp-6) var(--sp-4) var(--sp-5); }
  .confirm-icon { width: 60px; height: 60px; }
  .order-box { padding: var(--sp-4); }
  .order-meta {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }

  /* Pagination */
  .pagination button, .pagination a {
    min-width: 36px;
    height: 36px;
    font-size: var(--fs-xs);
  }

  /* Footer single-column */
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom { font-size: 11px; }
}

/* ---------- Extra small (≤ 380px) ---------- */
@media (max-width: 380px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .brand span { display: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .nav-actions,
  .add-to-cart-row,
  .payment-options,
  .toast-stack,
  .modal-backdrop,
  .loading-overlay {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  .order-box {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  a { color: #000; text-decoration: underline; }
}