/**
 * Purpilo Mobile-First UX
 * Phone experience is priority #1 (70%+ traffic)
 * Thumb-friendly, fast, scrollable, readable
 *
 * Approach: styles written for mobile by default,
 * enhanced for tablet/desktop via min-width queries
 */

/* ===================================================
   1. BASE MOBILE DEFAULTS
   =================================================== */

/* Prevent horizontal overflow on all devices */
body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* Smooth momentum scrolling */
* {
  -webkit-overflow-scrolling: touch;
}

/* Tap highlight — subtle purple flash */
* {
  -webkit-tap-highlight-color: rgba(86, 69, 147, 0.08);
}

/* ===================================================
   2. MOBILE HEADER — Compact, functional
   =================================================== */
@media (max-width: 768px) {
  header {
    height: 54px !important;
    padding: 0 !important;
  }

  .header-container {
    padding: 0 12px !important;
    height: 54px !important;
    gap: 8px !important;
  }

  .logo {
    font-size: 1.3rem !important;
    gap: 6px !important;
  }

  .logo i {
    font-size: 1.4rem !important;
  }

  /* Cart icon — thumb friendly */
  .cart-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.2rem !important;
  }

  .cart-count {
    top: -2px !important;
    right: -2px !important;
    width: 16px !important;
    height: 16px !important;
    font-size: 9px !important;
  }

  /* Hamburger button */
  .mobile-menu-btn, .mobile-menu-toggle {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.3rem !important;
    border-radius: 10px !important;
  }

  /* Search button */
  .search-mobile-btn {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.2rem !important;
  }
}

/* ===================================================
   3. MOBILE HERO — Punchy, compact, fast
   =================================================== */
@media (max-width: 768px) {
  .hero {
    padding: 40px 0 50px !important;
    text-align: center !important;
  }

  .hero-container {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    text-align: center !important;
  }

  .hero-content {
    max-width: 100% !important;
    order: 1;
  }

  .hero-content h1 {
    font-size: 1.6rem !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
  }

  .hero-content .highlight {
    font-size: inherit !important;
  }

  .hero-content p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
    padding: 0 8px;
    color: rgba(255, 255, 255, 0.85) !important;
  }

  /* Hero buttons — stacked on very small, side by side on larger phones */
  .hero-btns {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
    margin-bottom: 24px !important;
  }

  .hero-btns .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px 20px !important;
    font-size: 0.875rem !important;
    height: 48px !important;
    border-radius: 12px !important;
  }

  /* Trust badges — horizontal scroll */
  .hero-trust-badge {
    display: flex !important;
    gap: 16px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  .trust-item {
    font-size: 0.75rem !important;
    gap: 5px !important;
    white-space: nowrap;
  }

  /* Hero image */
  .hero-visual, .hero-image {
    order: 2;
    max-height: 200px !important;
    overflow: hidden;
  }

  .hero-visual img, .hero-image img {
    max-height: 200px !important;
    object-fit: contain !important;
    margin: 0 auto;
  }

  /* Stats bar */
  .hero-stats-bar {
    padding: 12px 16px !important;
    margin-top: 16px !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
  }

  .stat-item {
    font-size: 0.75rem !important;
  }

  .stat-item .stat-value {
    font-size: 1rem !important;
  }
}

@media (min-width: 380px) and (max-width: 768px) {
  .hero-btns {
    flex-direction: row !important;
    gap: 10px !important;
  }

  .hero-btns .btn {
    flex: 1 !important;
    width: auto !important;
  }
}

/* ===================================================
   4. MOBILE SECTIONS — Tighter, phone-friendly
   =================================================== */
@media (max-width: 768px) {
  section, .section {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }

  .section-sm {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }

  .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .section-title {
    margin-bottom: 24px !important;
  }

  .section-title h2 {
    font-size: 1.25rem !important;
    margin-bottom: 6px !important;
  }

  .section-title p {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    padding: 0 8px;
  }
}

/* ===================================================
   5. MOBILE PRODUCT CARDS — 2-column grid, compact
   =================================================== */
@media (max-width: 768px) {
  .product-grid,
  #products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .product-card, article.product-card {
    border-radius: 12px !important;
  }

  /* Card image */
  .product-card .product-image,
  .product-card .product-image-link {
    aspect-ratio: 1 !important;
  }

  .product-card .product-image img {
    padding: 8px !important;
  }

  /* Card content — tight */
  .product-card .product-content,
  .product-card .product-info {
    padding: 10px 10px 12px !important;
    gap: 2px !important;
  }

  .product-card .product-category {
    font-size: 0.6rem !important;
    margin-bottom: 2px !important;
  }

  .product-card .product-content h3,
  .product-card .product-info h3 {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
    -webkit-line-clamp: 2 !important;
  }

  /* Hide description on mobile cards */
  .product-card .product-desc,
  .product-card .card-description {
    display: none !important;
  }

  /* Price */
  .product-card .product-price {
    font-size: 0.9rem !important;
    margin-bottom: 8px !important;
  }

  .product-card .price-regular,
  .product-card .original-price {
    font-size: 0.7rem !important;
  }

  /* Add to cart button */
  .product-card .product-btn,
  .product-card .btn-add-cart,
  .product-card .add-to-cart-btn,
  .card-footer .btn {
    height: 36px !important;
    font-size: 0.7rem !important;
    border-radius: 8px !important;
    padding: 0 8px !important;
    gap: 4px !important;
  }

  /* Hide "Ajouter" text, show only icon on very small cards */
  .product-card .product-btn .btn-text {
    display: none;
  }

  /* Badges */
  .product-badge, .badge {
    font-size: 0.6rem !important;
    padding: 3px 7px !important;
  }

  /* Wishlist / action buttons */
  .wishlist-btn, .card-action-btn {
    width: 30px !important;
    height: 30px !important;
    top: 6px !important;
    right: 6px !important;
  }

  .wishlist-btn i, .card-action-btn i {
    font-size: 0.85rem !important;
  }

  /* Rating stars */
  .product-rating {
    margin: 3px 0 !important;
  }

  .product-rating .stars {
    font-size: 0.65rem !important;
  }

  .rating-count {
    font-size: 0.6rem !important;
  }
}

/* ===================================================
   6. MOBILE SHOP PAGE — Filters, sort, layout
   =================================================== */
@media (max-width: 768px) {
  /* Shop header banner — compact */
  .shop-header {
    padding: 32px 0 !important;
    border-radius: 0 0 20px 20px !important;
    margin-bottom: 12px !important;
  }

  .shop-title h1 {
    font-size: 1.4rem !important;
  }

  .shop-title .breadcrumb {
    font-size: 0.75rem !important;
  }

  /* Shop layout — single column */
  .shop-layout {
    flex-direction: column !important;
    gap: 0 !important;
  }

  /* Hide desktop filter sidebar, show mobile filter button */
  .shop-filters {
    display: none !important;
  }

  .shop-filters.mobile-active {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1100 !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    padding-bottom: 80px !important;
    animation: mf-slideUp 0.3s ease both;
  }

  @keyframes mf-slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  /* Mobile filter trigger button */
  .mobile-filter-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    background: white;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #564593;
    margin-bottom: 12px;
    cursor: pointer;
  }

  /* Sort & view controls */
  .shop-controls, .sort-controls, .filter-sort-bar {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .shop-controls select, .sort-controls select {
    height: 38px !important;
    font-size: 0.8rem !important;
    padding: 0 28px 0 10px !important;
    border-radius: 8px !important;
    flex-shrink: 0;
  }

  /* Results count */
  .results-count, .product-count {
    font-size: 0.8rem !important;
    color: #6b7280;
    margin-bottom: 10px;
  }

  /* Products area */
  .shop-products, .products-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
  }
}

/* Show filter button only on mobile */
.mobile-filter-btn {
  display: none;
}

/* ===================================================
   7. MOBILE PRODUCT DETAIL — Readable, scrollable
   =================================================== */
@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin: 12px 0 24px !important;
  }

  .product-gallery {
    position: static !important;
  }

  /* Main image — full width, not too tall */
  .main-image {
    border-radius: 12px !important;
    max-height: 320px !important;
    aspect-ratio: auto !important;
  }

  .main-image img {
    max-height: 300px !important;
    padding: 12px !important;
  }

  /* Thumbnails — horizontal scroll row */
  .thumbnail-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 8px !important;
    padding: 8px 0 !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .thumbnail {
    width: 50px !important;
    height: 50px !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start;
  }

  /* Product info */
  .product-info {
    padding: 0 4px !important;
  }

  .product-info h1,
  .product-info .product-title {
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
  }

  .product-info .product-category {
    font-size: 0.65rem !important;
    margin-bottom: 4px !important;
  }

  .product-info .current-price {
    font-size: 1.4rem !important;
  }

  .product-info .original-price {
    font-size: 0.85rem !important;
  }

  .product-info .product-rating {
    margin-bottom: 10px !important;
  }

  .product-info .product-short-description {
    font-size: 0.8rem !important;
    padding: 10px 12px !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
  }

  /* Stock indicator */
  .stock-indicator {
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
    margin-bottom: 10px !important;
  }

  /* Action buttons — full width stacked */
  .product-info .product-actions,
  .product-actions {
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 12px !important;
  }

  .product-info .product-actions .btn,
  .product-actions .btn {
    width: 100% !important;
    height: 48px !important;
    font-size: 0.9rem !important;
    border-radius: 12px !important;
  }

  /* Gift wrapping */
  .gift-wrapping-section {
    padding: 10px 12px !important;
    margin: 10px 0 !important;
    font-size: 0.8rem !important;
  }

  /* Product meta */
  .product-info .product-meta {
    font-size: 0.75rem !important;
    padding: 8px 0 !important;
    margin: 10px 0 !important;
  }

  /* Tabs — horizontal scroll */
  .tabs-section {
    margin: 0 !important;
    padding: 0 !important;
  }

  .tabs-nav {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    padding-bottom: 1px;
  }

  .tab-btn {
    padding: 10px 14px !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .tab-btn i {
    display: none !important;
  }

  .tab-pane {
    padding: 14px 0 !important;
    font-size: 0.8rem !important;
    line-height: 1.6 !important;
  }

  /* Related products */
  .related-title {
    font-size: 1rem !important;
    margin-bottom: 14px !important;
  }

  #related-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

/* ===================================================
   8. MOBILE HOME — Benefits, categories, age cards
   =================================================== */
@media (max-width: 768px) {
  /* Benefits/features grid — horizontal scroll */
  .benefits-grid, .features-grid {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px !important;
    padding: 4px 14px 16px !important;
    margin: 0 -14px !important;
  }

  .benefit-card, .feature-card {
    min-width: 200px !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start;
    padding: 20px 16px !important;
  }

  .benefit-card i, .feature-card i {
    font-size: 1.4rem !important;
    margin-bottom: 8px !important;
  }

  .benefit-card h3, .feature-card h3 {
    font-size: 0.85rem !important;
    margin-bottom: 4px !important;
  }

  .benefit-card p, .feature-card p {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
  }

  /* Category cards — 2 columns */
  .categories-grid, .age-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .age-card {
    border-radius: 12px !important;
  }

  .age-card h3, .category-card h3 {
    font-size: 0.8rem !important;
  }

  /* Brands slider */
  .brands-track {
    gap: 30px !important;
  }

  .brands-track img {
    height: 40px !important;
    min-width: 80px !important;
  }

  /* Teacher/school section */
  .teacher-section, .school-section {
    padding: 28px 16px !important;
    border-radius: 16px !important;
    text-align: center !important;
  }

  .teacher-section h2, .school-section h2 {
    font-size: 1.1rem !important;
    margin-bottom: 8px !important;
  }

  .teacher-section p, .school-section p {
    font-size: 0.85rem !important;
    margin-bottom: 16px !important;
  }

  /* Testimonials — horizontal scroll */
  .testimonials-grid {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px !important;
    padding: 4px 14px 16px !important;
    margin: 0 -14px !important;
  }

  .testimonial-card {
    min-width: 260px !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start;
    padding: 16px !important;
    border-radius: 12px !important;
  }

  .testimonial-card p {
    font-size: 0.8rem !important;
    line-height: 1.5 !important;
  }

  .testimonial-card .author {
    font-size: 0.75rem !important;
  }
}

/* ===================================================
   9. MOBILE FOOTER — Compact, accordion-style
   =================================================== */
@media (max-width: 768px) {
  footer {
    border-radius: 24px 24px 0 0 !important;
    padding-top: 36px !important;
    margin-top: 40px !important;
  }

  .footer-content, .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    margin-bottom: 24px !important;
  }

  .footer-col h3 {
    font-size: 0.875rem !important;
    margin-bottom: 10px !important;
  }

  .footer-col a, .footer-col li {
    font-size: 0.8rem !important;
    padding: 4px 0;
  }

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

  .footer-newsletter input {
    height: 44px !important;
    font-size: 0.85rem !important;
  }

  .footer-newsletter button {
    height: 44px !important;
    font-size: 0.85rem !important;
  }

  .footer-social {
    justify-content: center !important;
    margin-top: 16px !important;
  }

  .footer-social a {
    width: 40px !important;
    height: 40px !important;
  }

  .footer-bottom {
    font-size: 0.7rem !important;
    padding-top: 14px !important;
    text-align: center !important;
  }
}

/* ===================================================
   10. MOBILE BUTTONS — Thumb-friendly everywhere
   =================================================== */
@media (max-width: 768px) {
  .btn, button.btn, a.btn {
    min-height: 44px !important;
    font-size: 0.85rem !important;
    padding: 0 18px !important;
    border-radius: 10px !important;
  }

  .btn-lg {
    height: 50px !important;
    font-size: 0.9rem !important;
  }

  .btn-sm, .btn-small {
    min-height: 38px !important;
    font-size: 0.8rem !important;
  }
}

/* ===================================================
   11. MOBILE PAGINATION — Compact row
   =================================================== */
@media (max-width: 768px) {
  .pagination {
    gap: 4px !important;
    margin: 24px 0 !important;
    flex-wrap: wrap !important;
  }

  .page-item,
  .pagination-btn,
  .pagination a,
  .pagination button {
    min-width: 36px !important;
    height: 36px !important;
    font-size: 0.75rem !important;
    border-radius: 8px !important;
  }

  .page-ellipsis {
    min-width: 24px !important;
  }
}

/* ===================================================
   12. MOBILE CART SIDEBAR — Full screen takeover
   =================================================== */
@media (max-width: 768px) {
  .cart-sidebar-content, .cart-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }

  .cart-sidebar-header {
    padding: 14px 16px !important;
  }

  .cart-sidebar-header h3 {
    font-size: 0.95rem !important;
  }

  .cart-sidebar-item {
    padding: 10px !important;
    margin-bottom: 8px !important;
    border-radius: 10px !important;
  }

  .cart-sidebar-item img {
    width: 50px !important;
    height: 50px !important;
    border-radius: 8px !important;
  }

  .cart-sidebar-item .item-name {
    font-size: 0.8rem !important;
  }

  .cart-sidebar-item .item-price {
    font-size: 0.85rem !important;
  }

  /* Quantity controls */
  .qty-btn, .quantity-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
  }

  .qty-value, .quantity-value {
    font-size: 0.85rem !important;
    min-width: 28px !important;
  }
}

/* ===================================================
   13. MOBILE SEARCH — Full-screen overlay
   =================================================== */
@media (max-width: 768px) {
  .mobile-search-content {
    padding: 14px !important;
    border-radius: 0 0 16px 16px !important;
  }

  .mobile-search-header input {
    height: 46px !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
  }

  .mobile-search-close {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
  }

  /* Search results in mobile */
  .search-results-dropdown {
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    max-height: calc(100vh - 80px) !important;
    border-radius: 0 0 16px 16px !important;
    border: none !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
  }

  .search-result-item {
    padding: 12px 14px !important;
  }

  .search-result-item img {
    width: 48px !important;
    height: 48px !important;
  }

  .search-result-name {
    font-size: 0.85rem !important;
  }

  .search-result-price {
    font-size: 0.8rem !important;
  }
}

/* ===================================================
   14. MOBILE FLOATING ELEMENTS — Not intrusive
   =================================================== */
@media (max-width: 768px) {
  /* WhatsApp — smaller, bottom-left */
  .whatsapp-float, .whatsapp-float-container .whatsapp-float {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    font-size: 1.4rem !important;
    bottom: 16px !important;
    left: 14px !important;
  }

  .whatsapp-bubble {
    font-size: 0.7rem !important;
    max-width: 120px !important;
    padding: 6px 10px !important;
  }

  /* Scroll to top — smaller */
  #scrollToTop, .scroll-to-top {
    width: 38px !important;
    height: 38px !important;
    bottom: 16px !important;
    right: 14px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
  }

  /* Notifications — full width at bottom */
  .notification, #cart-notification {
    left: 10px !important;
    right: 10px !important;
    bottom: 70px !important;
    max-width: none !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 0.8rem !important;
  }
}

/* ===================================================
   15. MOBILE MODALS — Full screen, swipe-friendly
   =================================================== */
@media (max-width: 768px) {
  .quick-view-modal {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .quick-view-content {
    border-radius: 20px 20px 0 0 !important;
    max-height: 90vh !important;
    width: 100% !important;
    padding: 20px 16px !important;
    margin: 0 !important;
  }

  .quick-view-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .quick-view-image img {
    max-height: 200px !important;
    object-fit: contain !important;
  }

  .quick-view-info h2 {
    font-size: 1.05rem !important;
  }

  .quick-view-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .quick-view-actions .btn {
    width: 100% !important;
    height: 46px !important;
  }

  /* Quote modal */
  .quote-modal-content {
    width: 95% !important;
    margin: auto !important;
    padding: 20px !important;
    border-radius: 16px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
  }

  .form-group {
    margin-bottom: 14px !important;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    height: 46px !important;
    font-size: 16px !important; /* Prevents iOS zoom */
    border-radius: 10px !important;
  }

  .form-group textarea {
    height: auto !important;
    min-height: 90px !important;
  }
}

/* ===================================================
   16. MOBILE NAV MENU — Clean, spacious
   =================================================== */
@media (max-width: 768px) {
  .nav-mobile, .mobile-menu {
    width: 85% !important;
    max-width: 320px !important;
    padding: 24px 20px !important;
    border-radius: 0 20px 20px 0 !important;
  }

  .mobile-menu-header {
    margin-bottom: 32px !important;
  }

  .mobile-nav a, .nav-mobile a {
    font-size: 1.05rem !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 48px !important;
  }

  .mobile-nav li, .nav-mobile li {
    margin-bottom: 4px !important;
  }

  .close-menu, .nav-mobile-close {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.5rem !important;
  }
}

/* ===================================================
   17. MOBILE BREADCRUMB — Minimal
   =================================================== */
@media (max-width: 768px) {
  .breadcrumb, .breadcrumbs {
    font-size: 0.7rem !important;
    padding: 8px 0 !important;
    gap: 4px !important;
  }

  .breadcrumb i, .breadcrumbs i {
    font-size: 0.5rem !important;
    margin: 0 3px !important;
  }
}

/* ===================================================
   18. MOBILE TYPOGRAPHY — Readable on small screens
   =================================================== */
@media (max-width: 768px) {
  body {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  h1 { font-size: 1.4rem !important; }
  h2 { font-size: 1.2rem !important; }
  h3 { font-size: 1rem !important; }
  h4 { font-size: 0.9rem !important; }
  h5 { font-size: 0.85rem !important; }

  p {
    font-size: 0.85rem !important;
    line-height: 1.55 !important;
  }
}

/* ===================================================
   19. EXTRA SMALL PHONES (< 375px)
   =================================================== */
@media (max-width: 374px) {
  .header-container {
    padding: 0 8px !important;
  }

  .logo {
    font-size: 1.15rem !important;
  }

  .logo i {
    font-size: 1.2rem !important;
  }

  .hero-content h1 {
    font-size: 1.35rem !important;
  }

  .product-grid,
  #products-grid {
    gap: 8px !important;
  }

  .product-card .product-content,
  .product-card .product-info {
    padding: 8px !important;
  }

  .product-card .product-content h3,
  .product-card .product-info h3 {
    font-size: 0.7rem !important;
  }

  .product-card .product-price {
    font-size: 0.8rem !important;
  }

  .product-card .product-btn {
    height: 32px !important;
    font-size: 0.65rem !important;
  }

  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* ===================================================
   20. TABLET (769px - 1024px) — Balanced layout
   =================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .hero-container {
    gap: 40px !important;
  }

  .hero-content h1 {
    font-size: 2rem !important;
  }

  .product-grid,
  #products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
  }

  .shop-layout {
    gap: 20px !important;
  }

  .shop-filters {
    flex: 0 0 240px !important;
  }

  .product-detail {
    gap: 24px !important;
  }

  #related-products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
  }
}

/* ===================================================
   21. SAFE AREA INSETS (iPhone notch, home bar)
   =================================================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
  }

  .whatsapp-float, .whatsapp-float-container .whatsapp-float {
    bottom: calc(16px + env(safe-area-inset-bottom)) !important;
  }

  #scrollToTop, .scroll-to-top {
    bottom: calc(16px + env(safe-area-inset-bottom)) !important;
  }

  .notification, #cart-notification {
    bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  }
}

/* ===================================================
   22. PERFORMANCE — Hide decorative stuff on mobile
   =================================================== */
@media (max-width: 768px) {
  /* Remove heavy decorative elements */
  .hero-shape,
  .hero-icon-float,
  .hero::after {
    display: none !important;
  }

  /* Reduce animation complexity */
  .product-card:hover {
    transform: translateY(-2px) !important;
  }

  /* Disable hover effects that don't matter on touch */
  .card-actions {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Quick view button — always visible on mobile */
  .quick-view-btn {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Smooth scroll indicator for horizontally scrollable areas */
  .benefits-grid::after,
  .testimonials-grid::after {
    content: '';
    min-width: 14px;
    flex-shrink: 0;
  }
}

/* ===================================================
   23. LANDSCAPE PHONE — Prevent awkward layouts
   =================================================== */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 24px 0 32px !important;
  }

  .hero-content h1 {
    font-size: 1.3rem !important;
  }

  .hero-visual, .hero-image {
    max-height: 150px !important;
  }

  .product-grid,
  #products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
