/* Responsive Styles for Fashion Company E-commerce */

/* Global Safety */
html {
  overflow-x: hidden; /* fallback for older browsers that don't support clip */
}

/* Hide mobile bottom navigation bar on desktop screens */
.mobile-bottom-nav {
  display: none !important;
}

/* Touch Device Overrides */
@media (hover: none) {
  .glass-card:hover,
  .category-card:hover,
  .btn:hover,
  .social-btn:hover,
  .footer-link:hover,
  .cat-photo-wrap:hover .cat-photo {
    transform: none !important;
  }
  
  .dropdown-menu {
    display: none;
  }
  
  .dropdown-menu.open {
    display: block;
    opacity: 1;
    visibility: visible;
  }
}

/* Mobile Category Accordion Styles */
.mobile-category-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-category-block.expanded .mobile-category-list {
  max-height: 300px;
}

.mobile-category-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-category-header::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-right: 2px solid rgba(255,255,255,0.5);
  border-bottom: 2px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.mobile-category-block.expanded .mobile-category-header::after {
  transform: rotate(-135deg);
}

/* ≤1280px (Desktop) */
@media (max-width: 1280px) {
  .footer-grid {
    grid-template-columns: 1.8fr 1fr 1fr 1.5fr;
  }
}

/* ≤1024px (Laptop) */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .nav-actions .btn-ghost, 
  .nav-actions .btn-primary {
    display: none !important;
  }
  
  .nav-actions {
    margin-left: auto;
  }
  
  .editorial-grid {
    height: 560px;
    aspect-ratio: auto;
  }
  
  .why-bento {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .bento-large,
  .bento-medium {
    grid-column: span 2;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-bottom-content {
    flex-direction: column;
    gap: var(--space-4);
  }
}

/* ≤768px (Tablet / Dedicated Mobile App Experience) */
@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
    --nav-top-offset: 10px;
    --nav-side-offset: 8px;
  }

  body {
    padding-bottom: 64px !important;
  }

  /* Dedicated Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(14, 14, 26, 0.95);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9990;
    align-items: center;
    justify-content: space-around;
    padding: 4px 6px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  }

  .mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: rgba(255, 255, 255, 0.70);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    flex: 1;
    border-radius: 16px;
    padding: 6px 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-bottom-nav-item:not(.active):hover,
  .mobile-bottom-nav-item:not(.active):focus {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
  }

  .mobile-bottom-nav-item.active,
  .mobile-bottom-nav-item.active:hover,
  .mobile-bottom-nav-item.active:focus {
    color: #ffffff !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, rgba(37, 43, 94, 0.98), rgba(28, 33, 75, 0.98)) !important;
    border: 1.5px solid rgba(129, 140, 248, 0.75) !important;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.45) !important;
    border-radius: 20px !important;
  }

  .mobile-bottom-nav-item svg {
    stroke-width: 2;
    transition: transform 0.2s ease;
  }

  .mobile-bottom-nav-item.active svg {
    transform: translateY(-1px);
    stroke: #818cf8;
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.6));
  }
  
  .nav-container {
    padding: 0 10px;
    gap: 6px;
    box-sizing: border-box;
    max-width: 100%;
  }

  .location-subbar {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    box-sizing: border-box !important;
  }

  .location-subbar-container {
    padding: 0 10px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden;
  }
  
  .nav-icon-btn {
    width: 44px;
    height: 44px;
  }
  
  .nav-search-wrapper {
    flex: 1;
    max-width: 200px;
    margin: 0 4px;
  }
  
  .nav-search-input {
    font-size: 0.85rem;
    padding: 7px 34px 7px 12px;
  }
  
  .nav-search-btn {
    width: 28px;
    height: 28px;
  }
  
  .hero {
    min-height: 100svh;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow: hidden;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
  }
  
  .hero-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 12px;
    box-sizing: border-box;
    align-items: stretch;
  }
  
  .hero-actions .btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center;
    text-align: center;
    padding: 0.85em 1.2em !important;
    font-size: clamp(0.875rem, 3.8vw, 1rem) !important;
  }
  
  .hero-stats {
    gap: var(--space-3);
    width: 100%;
    box-sizing: border-box;
  }
  
  .stat-pill {
    padding: var(--space-3) var(--space-4);
    box-sizing: border-box;
  }
  
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #kids-card {
    grid-column: span 2;
  }
  
  #kids-card .cat-photo-wrap {
    aspect-ratio: 16 / 9;
  }
  
  .editorial-grid {
    grid-template-columns: 1fr;
    height: auto;
    aspect-ratio: auto;
  }
  
  .editorial-main {
    height: 420px;
  }
  
  .editorial-small {
    height: 280px;
  }
  
  .why-bento {
    grid-template-columns: 1fr;
  }
  
  .bento-large,
  .bento-medium {
    grid-column: span 1;
  }
  
  .newsletter-glass {
    padding: var(--space-12) var(--space-8);
  }
  
  .form-group {
    flex-direction: row;
    gap: 8px;
  }
  
  .form-group input {
    flex: 1;
    font-size: 0.9rem;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-brand {
    grid-column: span 2;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ≤600px (Mobile Large) */
@media (max-width: 600px) {
  :root {
    --space-32: 80px;
    --space-24: 60px;
    --space-20: 48px;
    --space-16: 40px;
    --container-pad: 16px;
  }
  
  .logo-text {
    font-size: 0.875rem;
  }
  
  .nav-icon-btn {
    width: 44px;
    height: 44px;
  }
  
  .hero-badge {
    font-size: 0.6875rem;
  }
  
  .hero-stats {
    flex-wrap: wrap;
  }
  
  .stat-pill {
    min-width: calc(50% - var(--space-2));
  }
  
  .cat-grid {
    grid-template-columns: 1fr;
  }
  
  #kids-card {
    grid-column: span 1;
  }
  
  .cat-photo-wrap {
    aspect-ratio: 4 / 5 !important;
  }
  
  .cat-content {
    padding: var(--space-6) var(--space-5);
  }
  
  .cat-title {
    font-size: 1.5rem;
  }
  
  .editorial-main {
    height: 320px;
  }
  
  .editorial-small {
    height: 220px;
  }
  
  .editorial-content {
    padding: var(--space-6);
  }
  
  .newsletter-glass {
    padding: var(--space-10) var(--space-5);
    border-radius: var(--radius-xl);
  }
  
  .bento-card {
    padding: var(--space-6);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-brand {
    grid-column: span 1;
  }
  
  .map-embed {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  .map-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }
  
  .back-to-top {
    bottom: var(--space-5);
    right: var(--space-5);
    width: 44px;
    height: 44px;
  }
  
  .section-eyebrow::before,
  .section-eyebrow::after {
    display: none;
  }
  
  .announcement-item {
    font-size: 0.75rem;
  }
  
  .announcement-track {
    gap: var(--space-10);
  }
}

/* ≤480px (Mobile Medium) */
@media (max-width: 480px) {
  .form-group {
    flex-direction: column;
  }
  
  .form-group .btn {
    width: 100%;
  }
  
  .hero-actions .btn-lg {
    font-size: 0.9375rem;
    padding: 0.75em 1.75em;
  }
  
  .footer-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ≤400px (Mobile Small) */
@media (max-width: 400px) {
  :root {
    --container-pad: 12px;
  }
  
  .logo-text {
    display: none;
  }
  
  .logo-mark {
    width: 34px;
    height: 34px;
    font-size: 0.75rem;
  }
  
  .nav-actions {
    gap: 2px;
  }
  
  .nav-search-wrapper {
    display: none;
  }
  
  .stat-pill {
    flex: 1;
    min-width: 100%;
  }
  
  .hero-stats {
    gap: var(--space-2);
  }
  
  .footer-legal {
    flex-direction: column;
    gap: var(--space-2);
  }
}

/* ≤320px (iPhone SE) */
@media (max-width: 320px) {
  .nav-container {
    padding: 0 6px;
  }
  
  .nav-icon-btn {
    width: 40px;
    height: 40px;
  }
  
  .hero-badge {
    display: none;
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }
  
  .stat-pill {
    padding: var(--space-2) var(--space-3);
  }
  
  .cat-photo-wrap {
    border-radius: var(--radius-lg);
  }
}

/* Print Styles */
@media print {
  .navbar,
  .mobile-menu,
  .announcement-bar,
  .newsletter-section,
  .back-to-top,
  .mouse-glow,
  .orb,
  .noise-overlay {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  
  .hero {
    min-height: auto;
    padding: 2cm 0;
  }
  
  .hero-img {
    display: none;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
}

/* Commercial E-Commerce 2 Products Per Screen Mobile Grid */
@media (max-width: 768px) {
  #category-products-grid:not([style*="display: none"]):not([style*="display:none"]),
  #wishlist-grid:not([style*="display: none"]):not([style*="display:none"]),
  .category-products-grid:not([style*="display: none"]):not([style*="display:none"]),
  .products-grid:not([style*="display: none"]):not([style*="display:none"]),
  .shop-products-grid:not([style*="display: none"]):not([style*="display:none"]) {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  .shop-carousel-card {
    flex: 0 0 160px;
    width: 160px;
  }
}
