/* ==========================================================================
   RESPONSIVE — Complete Media Query Breakpoints for ALL Pages
   Covers: Navbar, Hero, Products, Product Detail, Cart, Wishlist,
           Checkout, Receipt, Auth, Footer, Components, Static Pages
   ========================================================================== */

/* ══════════════════════════════════════════════════════════════════════════
   BREAKPOINT: ≤1200px — Narrow Desktops / Large Tablets (Landscape)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .nav-container {
    gap: 1rem;
    padding: 0.75rem 1rem;
  }

  .brand-logo {
    height: 65px;
  }

  .search-container {
    flex: 1.5;
  }

  .footer-links-container {
    gap: 2.5rem;
    padding: 2.5rem 1.5rem;
  }

  .main-content {
    padding: 1.5rem 1rem;
  }

  /* Product Detail — shrink buybox */
  .pd-buybox {
    flex: 0 0 240px;
    width: 240px;
    min-width: 220px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   BREAKPOINT: ≤1024px — Tablets (Landscape) / Small Desktops
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

  /* ── Navbar ─────────────────────────────────────────────── */
  .nav-container {
    gap: 0.75rem;
    padding: 0.6rem 1rem;
  }

  .brand-logo {
    height: 55px;
  }

  .search-submit-btn {
    padding: 0 1.25rem;
    font-size: 0.9rem;
  }

  /* ── Sort / Filter ──────────────────────────────────────── */
  .sort-filter-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .price-range-section {
    width: 100%;
    justify-content: flex-start;
  }

  /* ── Product Detail — Stack to single column ────────────── */
  .pd-layout {
    flex-direction: column;
  }

  .pd-gallery-section {
    position: relative;
    width: 100%;
    max-width: 100%;
    flex: none;
    flex-direction: row;
  }

  .pd-info-center {
    padding: 0;
  }

  /* Buybox → fixed bottom action bar */
  .pd-buybox {
    flex: none;
    width: 100%;
    min-width: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 9999;
    background: #fff;
    border: none;
    border-top: 1px solid #D5D9D9;
    border-radius: 0;
    padding: 0.75rem 1rem;
    margin-top: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 0.75rem;
    align-items: center;
  }

  .pd-buybox > *:not(button) {
    display: none !important;
  }

  .pd-buybox .pd-add-to-cart-btn,
  .pd-buybox .pd-buy-now-btn {
    flex: 1;
    width: auto !important;
    margin-top: 0 !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    min-height: 44px;
    white-space: nowrap;
  }

  .pd-modal-content {
    padding-bottom: 70px !important;
  }

  .pd-main-image-container {
    min-height: 350px;
    max-height: 60vh;
    overflow: hidden;
  }

  .pd-image-large {
    max-height: 55vh;
  }

  .pd-zoom-lens,
  .pd-zoom-result {
    display: none !important;
  }

  /* ── Checkout Modal ─────────────────────────────────────── */
  .modal-content.glass-card {
    max-height: 90vh;
    overflow-y: auto;
  }

  /* ── Products ───────────────────────────────────────────── */
  .jumia-container .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   BREAKPOINT: ≤768px — Tablets (Portrait) / Large Phones
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Navbar — Wrap layout ───────────────────────────────── */
  .nav-container {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 8px 12px;
    gap: 8px;
  }

  .brand-logo {
    height: 50px;
  }

  .search-container {
    order: 3;
    width: 100%;
    flex: 100%;
    margin-top: 4px;
  }

  .search-bar-wrapper {
    height: 40px;
  }

  .search-input {
    padding: 0 1rem;
    font-size: 0.9rem;
  }

  .search-submit-btn {
    padding: 0 1rem;
    font-size: 0.9rem;
  }

  /* ── Search suggestions responsive ──────────────────────── */
  .search-suggestions {
    max-height: 350px;
    border-radius: 0 0 6px 6px;
  }

  .search-suggestion-item {
    padding: 10px 14px;
    font-size: 0.9rem;
    gap: 10px;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .category-nav-wrapper {
    overflow-x: auto;
  }

  .category-list {
    padding: 0.25rem 1rem 0.5rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* ── Promo Banner ───────────────────────────────────────── */
  .promo-banner {
    font-size: 0.78rem;
    padding: 6px 32px 6px 10px;
    gap: 6px;
  }

  /* ── Hero / Poster ──────────────────────────────────────── */
  .premium-hero .poster-container {
    height: 220px;
  }

  .poster-overlay-content {
    padding: 1rem 1.25rem;
    max-width: 65%;
    gap: 0.5rem;
  }

  .poster-title {
    font-size: 1.1rem;
  }

  .poster-discount-tag {
    font-size: 0.75rem;
    padding: 3px 10px;
  }

  .poster-shop-btn {
    padding: 8px 20px;
    font-size: 0.8rem;
  }

  .poster-carousel-btn {
    display: none !important;
  }

  .poster-carousel-btn .material-symbols-rounded {
    font-size: 24px;
  }

  .poster-dots {
    bottom: 10px;
    gap: 5px;
    padding: 4px 8px;
  }

  .poster-dot {
    width: 6px;
    height: 6px;
  }

  .poster-dot.active {
    width: 18px;
  }

  /* ── Main Content ───────────────────────────────────────── */
  .main-content {
    padding: 1rem 8px !important;
  }

  /* ── Products ───────────────────────────────────────────── */
  .jumia-container {
    padding: 8px;
    border-radius: 0;
  }

  .jumia-container .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .jumia-img-container {
    height: 130px;
  }

  .jumia-title {
    font-size: 0.78rem !important;
  }

  .jumia-price {
    font-size: 1rem !important;
  }

  .jumia-old-price {
    font-size: 0.75rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
  }

  .product-image-container {
    height: 140px;
  }

  .product-title {
    font-size: 0.8rem;
  }

  .product-price {
    font-size: 1.1rem;
  }

  .product-info {
    padding: 0.5rem;
    gap: 0.15rem;
  }

  /* ── Sort / Filter ──────────────────────────────────────── */
  .sort-filter-bar {
    padding: 8px 10px;
  }

  .sort-select {
    width: 100%;
  }

  .product-count-text {
    font-size: 0.8rem;
  }

  .price-range-section {
    flex-wrap: wrap;
  }

  /* ── Breadcrumbs ────────────────────────────────────────── */
  .breadcrumb-nav {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  /* ── Product Detail — Gallery + Info ────────────────────── */
  .pd-layout {
    padding: 1rem 0.75rem;
    gap: 1rem;
  }

  .pd-gallery-section {
    flex-direction: column;
  }

  .pd-thumbnails {
    flex-direction: row !important;
    width: 100% !important;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }

  .pd-thumbnail {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
  }

  .pd-main-image-container {
    max-height: 50vh;
    min-height: 250px;
    width: 100%;
    overflow: hidden;
  }

  .pd-image-large {
    max-height: 45vh;
  }

  .pd-title-large {
    font-size: 1.15rem;
  }

  .pd-price-large {
    font-size: 1.5rem;
  }

  .pd-close {
    top: 10px !important;
    right: 10px !important;
    width: 38px;
    height: 38px;
  }

  .pd-cart-icon-btn {
    top: 10px !important;
    right: 58px !important;
    width: 38px;
    height: 38px;
  }

  .pd-buybox {
    padding: 0.75rem 1rem;
    gap: 10px;
  }

  .pd-buybox .pd-add-to-cart-btn,
  .pd-buybox .pd-buy-now-btn {
    padding: 0.7rem 0.75rem !important;
    font-size: 0.9rem !important;
  }

  /* product detail related products */
  .pd-related-card {
    width: 120px;
  }

  .pd-related-card img {
    width: 120px;
    height: 120px;
  }

  /* ── Cart / Wishlist Sidebars — Full Width ───────────────── */
  .cart-sidebar {
    max-width: 100%;
  }

  .cart-header {
    padding: 1rem;
  }

  .cart-items {
    padding: 1rem;
    gap: 1rem;
  }

  .cart-footer {
    padding: 1rem;
  }

  .cart-total {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .wishlist-sidebar {
    max-width: 100%;
  }

  .wishlist-header {
    padding: 1rem;
  }

  .wishlist-items {
    padding: 0.75rem;
  }

  /* ── Auth Modals — Wider on tablet ──────────────────────── */
  .modal-content {
    width: 92%;
    max-width: 400px;
    padding: 1.5rem;
  }

  /* ── Checkout Modal — FULL SCREEN SHEET ──────────────────── */
  .modal-content.glass-card {
    width: 95% !important;
    max-width: none !important;
    padding: 1.25rem !important;
    max-height: 90vh;
    overflow-y: auto;
  }

  #checkoutModal .modal-content.glass-card {
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    max-height: 100%;
    border-radius: 0 !important;
    padding: 1.25rem 1rem !important;
    display: flex;
    flex-direction: column;
  }

  #checkoutModal h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem !important;
  }

  #checkoutModal #checkoutForm {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
  }

  #checkoutModal .form-input {
    font-size: 16px; /* prevents iOS zoom */
    padding: 12px;
    border-radius: 8px;
  }

  #checkoutModal #checkoutSummary {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 5;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e3e6e6;
    margin-bottom: 1rem;
  }

  /* Checkout address header */
  .checkout-address-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  /* ── Receipt Modal ──────────────────────────────────────── */
  .receipt-modal-content {
    max-width: 95% !important;
  }

  .receipt-container {
    padding: 1.5rem 1.25rem 0.75rem;
  }

  /* ── Trust Badges ───────────────────────────────────────── */
  .trust-badges {
    gap: 8px;
    flex-wrap: wrap;
  }

  .trust-badge {
    min-width: 60px;
    flex: 1 1 calc(25% - 8px);
  }

  .trust-badge .material-symbols-rounded {
    font-size: 20px;
  }

  .trust-badge span:last-child {
    font-size: 0.65rem;
  }

  /* ── Footer ─────────────────────────────────────────────── */
  .footer-links-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    text-align: center;
  }

  .footer-col ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1rem;
  }

  .footer-col h3 {
    margin-bottom: 0.5rem;
  }

  .footer-copyright ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
  }

  .footer-bottom {
    padding: 1.5rem 1rem;
  }

  /* ── Toast ──────────────────────────────────────────────── */
  .toast-container {
    top: auto;
    bottom: 90px; /* Above mobile cart FAB */
    right: 10px;
    left: 10px;
  }

  .toast {
    min-width: auto;
    max-width: 100%;
    font-size: 0.88rem;
    padding: 12px 16px;
    border-radius: 12px;
  }

  /* ── Recently Viewed ────────────────────────────────────── */
  .recently-viewed-section {
    margin: 1rem 8px;
    padding: 10px;
  }

  .rv-card {
    width: 120px;
  }

  .rv-card img {
    width: 120px;
    height: 120px;
  }

  /* ── Static Pages ───────────────────────────────────────── */
  .static-page {
    padding: 1rem 0.5rem;
  }

  .page-content-card {
    padding: 1.25rem 1rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .page-section h2 {
    font-size: 1.15rem;
  }

  .page-section p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .values-grid,
  .tech-grid,
  .ad-grid,
  .contact-grid,
  .benefits-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .info-table {
    font-size: 0.85rem;
  }

  .info-table th,
  .info-table td {
    padding: 8px 10px;
  }

  /* Make tables horizontally scrollable */
  .page-section:has(.info-table) {
    overflow-x: auto;
  }

  .info-table {
    min-width: 500px;
  }

  /* ── Back to Top FAB ────────────────────────────────────── */
  .back-to-top-fab {
    width: 42px;
    height: 42px;
    bottom: 20px;
    right: 16px;
  }

  /* ── Quantity controls in cart ───────────────────────────── */
  .qty-controls {
    padding: 0.2rem;
  }

  .qty-btn {
    width: 28px;
    height: 28px;
  }

  /* ── Profile modal ──────────────────────────────────────── */
  #profileModal .modal-content {
    width: 95%;
    padding: 1.5rem 1.25rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   BREAKPOINT: ≤600px — Phablets / Large Phones
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

  /* ── Navbar ─────────────────────────────────────────────── */
  .nav-container {
    padding: 6px 10px;
  }

  .brand-logo {
    height: 44px;
  }

  .search-bar-wrapper {
    height: 38px;
  }

  .search-input {
    padding: 0 0.75rem;
    font-size: 0.85rem;
  }

  .search-suggestions {
    max-height: 300px;
    left: 0;
    right: 0;
  }

  .search-suggestion-item {
    padding: 9px 12px;
    font-size: 0.85rem;
    gap: 8px;
  }

  .search-suggestion-item .suggestion-category {
    display: none;
  }

  .search-suggestion-item .suggestion-fill {
    display: none;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .cart-badge {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  .category-list {
    gap: 0.5rem;
    padding: 0.2rem 0.75rem 0.4rem;
  }

  .category-pill {
    font-size: 0.82rem;
    padding: 5px 8px;
  }

  /* ── Hero ────────────────────────────────────────────────── */
  .premium-hero .poster-container {
    height: 190px;
  }

  /* ── Products ───────────────────────────────────────────── */
  .jumia-container {
    padding: 6px;
  }

  .jumia-container .product-grid {
    gap: 5px;
  }

  .jumia-img-container {
    height: 120px;
  }

  /* ── Cart Sidebar ───────────────────────────────────────── */
  .cart-sidebar {
    right: -100%;
    max-width: 100%;
  }

  .cart-item-img {
    width: 65px;
    height: 65px;
    border-radius: 8px;
  }

  .cart-item-title {
    font-size: 0.88rem;
  }

  /* ── Wishlist Sidebar ───────────────────────────────────── */
  .wishlist-sidebar {
    right: -100%;
    max-width: 100%;
  }

  .wishlist-item img {
    width: 65px;
    height: 65px;
  }

  /* ── Checkout — tighter spacing ──────────────────────────── */
  #checkoutModal h2 {
    font-size: 1.15rem;
  }

  /* ── Auth Modals ────────────────────────────────────────── */
  .modal-content {
    width: 95%;
    padding: 1.25rem 1rem;
    border-radius: 12px;
  }

  .google-signin-btn {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  /* ── Footer ─────────────────────────────────────────────── */
  .footer-links-container {
    gap: 1.25rem;
    padding: 1.25rem 0.75rem;
  }

  .footer-col ul li a {
    font-size: 0.82rem;
  }

  .footer-copyright ul {
    gap: 0.4rem 0.75rem;
  }

  .footer-copyright ul li a {
    font-size: 0.72rem;
  }

  .footer-copyright p {
    font-size: 0.72rem;
  }

  /* ── Static Pages ───────────────────────────────────────── */
  .page-content-card {
    padding: 1rem 0.75rem;
  }

  .value-card,
  .tech-card,
  .ad-card,
  .contact-card,
  .benefit-item {
    padding: 1.25rem;
  }

  .account-card {
    padding: 1rem;
  }

  .faq-item summary {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .faq-item p {
    padding: 0 1rem 0.75rem;
    font-size: 0.85rem;
  }

  .press-card {
    padding: 1rem 1.25rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   BREAKPOINT: ≤480px — Standard Phones
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

  /* ── Hero ────────────────────────────────────────────────── */
  .premium-hero .poster-container {
    height: 165px;
  }

  .poster-overlay-content {
    padding: 0.75rem 1rem;
    max-width: 72%;
    gap: 0.35rem;
  }

  .poster-title {
    font-size: 0.95rem;
  }

  .poster-discount-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
  }

  .poster-shop-btn {
    padding: 6px 16px;
    font-size: 0.75rem;
  }

  .poster-carousel-btn {
    display: none;
  }

  /* ── Product Detail ─────────────────────────────────────── */
  .pd-layout {
    padding: 0.75rem 0.5rem;
    gap: 0.75rem;
  }

  .pd-main-image-container {
    min-height: 220px;
    max-height: 45vh;
    padding: 0.5rem;
    border-radius: 6px;
  }

  .pd-image-large {
    max-height: 40vh;
  }

  .pd-thumbnails {
    gap: 4px;
  }

  .pd-thumbnail {
    width: 44px;
    height: 44px;
  }

  .pd-title-large {
    font-size: 1.05rem;
  }

  .pd-price-large {
    font-size: 1.35rem;
  }

  .pd-related-card {
    width: 100px;
  }

  .pd-related-card img {
    width: 100px;
    height: 100px;
  }

  .pd-related-card .rv-title {
    font-size: 0.72rem;
  }

  /* ── Carousel buttons on product cards ───────────────────── */
  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .prev-btn {
    left: 6px;
  }

  .next-btn {
    right: 6px;
  }

  /* ── Checkout — Full-screen compact ─────────────────────── */
  #checkoutModal .modal-content.glass-card {
    padding: 1rem 0.75rem !important;
    height: 100%;
    max-height: 100%;
  }

  #checkoutModal h2 {
    font-size: 1.1rem;
  }

  #checkoutModal .form-input {
    padding: 11px 10px;
    font-size: 16px;
    border-radius: 8px;
  }

  #checkoutModal select.form-input {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='m7 10 5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
  }

  /* Stack coupon field vertically */
  #checkoutForm > div:has(#chkCoupon) {
    flex-direction: column;
    gap: 0.5rem !important;
  }

  #checkoutForm > div:has(#chkCoupon) .checkout-btn {
    width: 100%;
    padding: 10px !important;
  }

  /* Stack state / postal code vertically */
  #checkoutForm > div:has(#chkState) {
    flex-direction: column;
    gap: 0.5rem;
  }

  #checkoutForm > div:has(#chkState) .form-input {
    flex: none !important;
    width: 100%;
  }

  /* Payment method radios */
  .payment-radio-group {
    flex-direction: column;
    gap: 8px;
  }

  .payment-radio-group label {
    width: 100%;
    justify-content: flex-start;
  }

  /* Checkout button */
  .checkout-btn {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
  }

  /* ── Trust Badges — 2 per row ───────────────────────────── */
  .trust-badges {
    gap: 6px;
    flex-wrap: wrap;
  }

  .trust-badge {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    padding: 8px 4px;
  }

  .trust-badge .material-symbols-rounded {
    font-size: 18px;
  }

  .trust-badge span:last-child {
    font-size: 0.6rem;
  }

  /* ── Receipt — Full width ───────────────────────────────── */
  .receipt-modal-content {
    width: 100% !important;
    max-height: 100vh;
    border-radius: 0 !important;
  }

  .receipt-container {
    padding: 1.25rem 1rem 0.75rem;
  }

  .receipt-actions {
    padding: 0.75rem 1rem 1rem;
  }

  .receipt-meta {
    grid-template-columns: 1fr;
  }

  .receipt-header h2 {
    font-size: 1.2rem;
  }

  /* ── Auth Modals ────────────────────────────────────────── */
  .modal-content {
    width: 96%;
    max-width: none;
    padding: 1.25rem 1rem;
    border-radius: 12px;
  }

  #loginModal h2,
  #registerModal h2 {
    font-size: 1.15rem;
  }

  /* ── Cart adjustments ───────────────────────────────────── */
  .cart-header h2 {
    font-size: 1.2rem;
  }

  .cart-item-img {
    width: 60px;
    height: 60px;
  }

  .cart-total {
    font-size: 1rem;
  }

  /* ── Wishlist adjustments ───────────────────────────────── */
  .wishlist-header h2 {
    font-size: 1.1rem;
  }

  .wishlist-item img {
    width: 60px;
    height: 60px;
  }

  .wishlist-add-cart-btn,
  .wishlist-remove-btn {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  /* ── Promo Banner ───────────────────────────────────────── */
  .promo-banner {
    font-size: 0.72rem;
    padding: 5px 28px 5px 8px;
  }

  .promo-banner .promo-close {
    right: 6px;
  }

  /* ── Static Pages ───────────────────────────────────────── */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .job-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .step-card {
    padding: 1.25rem;
  }

  .feature-list li {
    font-size: 0.88rem;
    gap: 8px;
  }

  .policy-list li,
  .numbered-list li {
    font-size: 0.88rem;
  }

  .page-title {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
  }

  #pageView {
    padding: 0 0.5rem;
  }

  /* ── Back to Top ────────────────────────────────────────── */
  .back-to-top-fab {
    width: 40px;
    height: 40px;
    bottom: 16px;
    right: 12px;
  }

  .back-to-top-fab .material-symbols-rounded {
    font-size: 20px;
  }

  /* ── Recently Viewed ────────────────────────────────────── */
  .rv-card {
    width: 110px;
  }

  .rv-card img {
    width: 110px;
    height: 110px;
  }

  .rv-card .rv-title {
    font-size: 0.75rem;
  }

  .rv-card .rv-price {
    font-size: 0.82rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   BREAKPOINT: ≤400px — Very Small Phones
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 400px) {

  /* ── Navbar ─────────────────────────────────────────────── */
  .brand-logo {
    height: 40px;
  }

  .search-bar-wrapper {
    height: 36px;
  }

  .search-input {
    padding: 0 0.5rem;
    font-size: 0.82rem;
  }

  .search-submit-btn {
    padding: 0 0.75rem;
    font-size: 0.82rem;
  }

  .nav-actions {
    gap: 0.3rem;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  /* ── Hero ────────────────────────────────────────────────── */
  .premium-hero .poster-container {
    height: 145px;
  }

  .poster-overlay-content {
    max-width: 80%;
    padding: 0.5rem 0.75rem;
    gap: 0.25rem;
  }

  .poster-title {
    font-size: 0.85rem;
  }

  .poster-discount-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .poster-shop-btn {
    padding: 5px 14px;
    font-size: 0.7rem;
  }

  /* ── Products ───────────────────────────────────────────── */
  .jumia-container .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .jumia-img-container {
    height: 110px;
  }

  .jumia-card {
    padding: 4px;
  }

  .jumia-title {
    font-size: 0.72rem !important;
  }

  .jumia-price {
    font-size: 0.92rem !important;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .product-image-container {
    height: 120px;
  }

  .product-title {
    font-size: 0.75rem;
  }

  .product-price {
    font-size: 1rem;
  }

  .product-old-price {
    font-size: 0.72rem;
  }

  .pct-off-tag {
    font-size: 0.65rem;
    padding: 1px 3px;
  }

  .add-btn {
    width: 26px;
    height: 26px;
  }

  .add-btn span {
    font-size: 16px;
  }

  /* ── Product Detail ─────────────────────────────────────── */
  .pd-main-image-container {
    min-height: 200px;
    max-height: 40vh;
  }

  .pd-image-large {
    max-height: 35vh;
  }

  .pd-thumbnail {
    width: 40px;
    height: 40px;
  }

  .pd-title-large {
    font-size: 1rem;
  }

  .pd-close {
    top: 8px !important;
    right: 8px !important;
    width: 34px;
    height: 34px;
  }

  .pd-cart-icon-btn {
    top: 8px !important;
    right: 50px !important;
    width: 34px;
    height: 34px;
  }

  .pd-close .material-symbols-rounded,
  .pd-cart-icon-btn .material-symbols-rounded {
    font-size: 20px;
  }

  /* Variant pills smaller */
  .pd-variant-pill {
    padding: 4px 10px !important;
    font-size: 0.82rem !important;
    min-width: 34px;
  }

  .pd-color-swatch {
    width: 30px;
    height: 30px;
  }

  /* ── Checkout — Ultra compact ────────────────────────────── */
  #checkoutModal .modal-content.glass-card {
    padding: 0.75rem 0.5rem !important;
  }

  #checkoutModal h2 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem !important;
  }

  #checkoutModal .form-input {
    padding: 10px 8px;
    font-size: 15px;
  }

  #checkoutModal .checkout-btn {
    padding: 12px;
    font-size: 0.95rem;
  }

  .checkout-address-header strong {
    font-size: 0.85rem !important;
  }

  /* COD notice */
  .cod-notice {
    font-size: 0.82rem;
    padding: 8px 10px;
  }

  /* ── Cart & Wishlist ────────────────────────────────────── */
  .cart-item-img {
    width: 55px;
    height: 55px;
  }

  .cart-item-title {
    font-size: 0.82rem;
  }

  .cart-item-price {
    font-size: 0.88rem;
  }

  .qty-input {
    width: 36px;
    font-size: 0.82rem;
  }

  .qty-btn {
    width: 24px;
    height: 24px;
  }

  .wishlist-item img {
    width: 55px;
    height: 55px;
  }

  .wishlist-item-title {
    font-size: 0.82rem;
  }

  .wishlist-add-cart-btn,
  .wishlist-remove-btn {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  /* ── Auth Modals ────────────────────────────────────────── */
  .modal-content {
    padding: 1rem 0.75rem;
  }

  /* ── Footer ─────────────────────────────────────────────── */
  .footer-links-container {
    gap: 1rem;
    padding: 1rem 0.5rem;
  }

  .footer-col h3 {
    font-size: 0.9rem;
  }

  .footer-col ul li a {
    font-size: 0.78rem;
  }

  .footer-logo img {
    height: 32px;
  }

  .footer-bottom {
    padding: 1rem 0.5rem;
  }

  /* ── Static Pages ───────────────────────────────────────── */
  .page-title {
    font-size: 1.2rem;
  }

  .page-section h2 {
    font-size: 1.05rem;
  }

  .page-section p {
    font-size: 0.85rem;
  }

  .value-card .material-symbols-rounded,
  .tech-card .material-symbols-rounded,
  .ad-card .material-symbols-rounded,
  .contact-card .material-symbols-rounded {
    font-size: 2rem;
  }

  .value-card h3,
  .tech-card h3,
  .ad-card h3,
  .contact-card h3 {
    font-size: 0.95rem;
  }

  .value-card p,
  .tech-card p,
  .ad-card p,
  .contact-card p {
    font-size: 0.82rem;
  }

  .benefit-item .material-symbols-rounded {
    font-size: 2rem;
  }

  .benefit-item h3 {
    font-size: 0.9rem;
  }

  .benefit-item p {
    font-size: 0.82rem;
  }

  .step-number {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .account-card .material-symbols-rounded {
    font-size: 2rem;
  }

  .account-card h3 {
    font-size: 0.9rem;
  }

  .account-card p {
    font-size: 0.78rem;
  }

  /* ── Recently Viewed ────────────────────────────────────── */
  .recently-viewed-section {
    margin: 0.75rem 4px;
    padding: 8px;
  }

  .recently-viewed-section h2 {
    font-size: 1.05rem;
  }

  .rv-card {
    width: 100px;
  }

  .rv-card img {
    width: 100px;
    height: 100px;
  }

  /* ── Breadcrumbs ────────────────────────────────────────── */
  .breadcrumb-nav {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  /* ── Toast ──────────────────────────────────────────────── */
  .toast {
    font-size: 0.82rem;
    padding: 8px 12px;
    border-radius: 8px;
  }

  .toast .toast-icon {
    font-size: 18px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   BREAKPOINT: ≤360px — Very Small / Older Phones
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {

  .nav-container {
    padding: 4px 6px;
    gap: 6px;
  }

  .brand-logo {
    height: 36px;
  }

  .search-bar-wrapper {
    height: 34px;
  }

  .search-submit-btn {
    display: none; /* hide text button, rely on enter key */
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .premium-hero .poster-container {
    height: 130px;
  }

  .poster-overlay-content {
    max-width: 85%;
    padding: 0.4rem 0.5rem;
  }

  .poster-title {
    font-size: 0.78rem;
  }

  .poster-shop-btn {
    padding: 4px 12px;
    font-size: 0.65rem;
  }

  .jumia-img-container {
    height: 95px;
  }

  .product-image-container {
    height: 105px;
  }

  .pd-main-image-container {
    min-height: 180px;
    max-height: 36vh;
  }

  .pd-thumbnail {
    width: 36px;
    height: 36px;
  }

  #checkoutModal .modal-content.glass-card {
    padding: 0.5rem 0.4rem !important;
  }

  #checkoutModal .form-input {
    padding: 9px 7px;
    font-size: 14px;
  }

  .cart-item-img {
    width: 48px;
    height: 48px;
  }

  .page-content-card {
    padding: 0.75rem 0.5rem;
  }

  .page-title {
    font-size: 1.1rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   UTILITY: Height-constrained viewports (landscape phones)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-height: 500px) and (orientation: landscape) {
  .premium-hero .poster-container {
    height: 200px;
  }

  .pd-main-image-container {
    max-height: 35vh;
    min-height: 150px;
  }

  .pd-image-large {
    max-height: 30vh;
  }

  #checkoutModal .modal-content.glass-card {
    max-height: 100%;
  }

  .modal-content.glass-card {
    max-height: 100vh;
  }

  .receipt-modal-content {
    max-height: 100vh;
  }

  .back-to-top-fab {
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   UTILITY: Touch-device optimizations
   ══════════════════════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
  /* Ensure all tappable elements meet 44px minimum */
  .icon-btn,
  .cart-badge,
  .qty-btn,
  .close-btn,
  .close-modal,
  .pd-close,
  .category-pill {
    min-width: 44px;
    min-height: 44px;
  }

  /* Remove hover effects that cause sticky states on touch */
  .product-card:hover {
    transform: none;
  }

  .jumia-card:hover {
    box-shadow: none !important;
  }

  /* Poster nav always visible on touch */
  .poster-container:hover .poster-carousel-btn {
    opacity: 1;
  }

  .poster-carousel-btn {
    opacity: 1;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════════════════════════════════ */
@media print {
  .navbar,
  .promo-banner,
  .category-nav-wrapper,
  .back-to-top-fab,
  .toast-container,
  .cart-overlay,
  .cart-sidebar,
  .wishlist-sidebar,
  .amazon-footer {
    display: none !important;
  }

  .main-content {
    padding: 0 !important;
  }

  .product-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}