/* ==========================================================================
   SAHU TRADERS - COMPREHENSIVE RESPONSIVE STYLESHEET (PHASE 11)
   Pixel-perfect responsive implementation matching reference image across:
   Small Mobile (320px, 360px, 375px), Standard Mobile (390px, 393px, 414px),
   Large Mobile (430px, 480px), Tablet (600px, 768px, 820px, 1024px),
   and Desktop (1280px, 1366px, 1440px, 1920px).
   ========================================================================== */

/* --------------------------------------------------------------------------
   GLOBAL CONTAINER & FLUID WRAPPER
   -------------------------------------------------------------------------- */
.site-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(14px, 2.5vw, 24px);
  padding-right: clamp(14px, 2.5vw, 24px);
}

/* Ensure images never exceed parent container */
img, svg, video {
  max-width: 100%;
  height: auto;
}

/* Touch targets base */
button, a, input, select, textarea {
  touch-action: manipulation;
}

/* --------------------------------------------------------------------------
   1. COMPACT LAYOUT (below 1024px)
   -------------------------------------------------------------------------- */
@media (width < 1024px) {
  /* Top Bar Tablet */
  .top-delivery-item,
  .top-delivery-sep {
    display: none !important;
  }
  
  .location-full {
    display: none !important;
  }
  .location-short {
    display: inline !important;
  }

  .top-timing-item {
    display: inline-flex !important;
  }

  .top-timing-item .hours-text {
    display: none !important;
  }

  .top-bar-inner {
    height: 36px;
  }
  
  /* Header Tablet */
  .brand-logo img {
    height: 40px;
  }
  
  .header-search {
    max-width: 340px;
  }
  
  .whatsapp-text-wrap {
    display: none;
  }
  
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
  }

  /* Navigation Bar Tablet */
  .main-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar {
    display: none;
  }
  .nav-list {
    white-space: nowrap;
    gap: 4px;
  }
  .nav-link {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  /* Hero Tablet */
  .hero-inner {
    grid-template-columns: 50% 50%;
    min-height: 320px;
  }
  
  .hero-content-panel {
    padding: 30px 24px 30px 16px;
    clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%);
  }

  .hero-storefront-link {
    left: 50%;
  }
  
  .hero-heading {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 0.92rem;
    margin-bottom: 16px;
  }
  
  .hero-features {
    gap: 6px;
    margin-bottom: 18px;
  }
  
  .hero-feature-item {
    font-size: 0.72rem;
    gap: 4px;
  }
  
  .hero-feature-item svg {
    width: 13px;
    height: 13px;
  }
  
  .hero-cta-btn {
    padding: 8px 20px;
    font-size: 0.88rem;
  }

  /* Product Categories Tablet: Exactly 4 cards per row */
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  
  .category-name {
    font-size: 0.8rem;
  }

  /* Promotional Banners Tablet */
  .promo-grid {
    gap: 12px;
  }
  
  .promo-title-gold {
    font-size: 1.35rem;
  }
  
  .promo-title-bulk {
    font-size: 1.25rem;
  }

  /* Why Choose Us Tablet */
  .why-choose-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }
  
  .why-card {
    padding: 10px 8px;
    gap: 8px;
  }
  
  .why-card-icon svg {
    width: 26px;
    height: 26px;
  }
  
  .why-card-title {
    font-size: 0.76rem;
  }
  
  .catalog-layout {
    grid-template-columns: 220px 1fr;
    gap: 18px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* Catalogue filtering shares the compact navigation breakpoint. */
@media (width < 1024px) {
  /* Catalog Sidebar becomes off-canvas mobile filter drawer */
  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    background: #FFFFFF;
    z-index: 10002;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    padding: 24px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
  }

  .filter-sidebar.filter-drawer-open {
    transform: translateX(0);
  }

  .filter-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1.5px solid #E2E8F0;
  }

  .filter-drawer-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary-navy);
    margin: 0;
  }

  .filter-drawer-close {
    background: #F1F5F9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
  }

  .filter-drawer-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
  }

  .filter-drawer-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 10px;
  }

  .btn-filter-apply {
    flex: 1;
    background: var(--color-primary-orange);
    color: #FFF;
    border: none;
    padding: 10px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    text-align: center;
  }

  .btn-filter-reset {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
    padding: 10px 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
  }

  .filter-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3, 18, 46, 0.65);
    backdrop-filter: blur(2px);
    z-index: 10001;
  }

  .filter-backdrop.active {
    display: block;
  }

  /* Filter Toggle Button in Catalog Toolbar */
  .btn-filter-drawer-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    background: #F8FAFC;
    color: var(--color-primary-navy);
    border: 1.5px solid #CBD5E1;
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 38px;
  }

  .btn-filter-drawer-toggle:hover {
    background: #FFF7ED;
    border-color: var(--color-primary-orange);
    color: var(--color-primary-orange);
  }
}

@media (max-width: 900px) {
  /* Product Details 1-Column Layout */
  .product-details-container {
    grid-template-columns: 1fr !important;
    padding: 20px !important;
    gap: 24px !important;
  }
}

/* --------------------------------------------------------------------------
   3. SMARTPHONE / MOBILE ADAPTATION (below 768px)
   Matches the Smartphone in Reference Image
   -------------------------------------------------------------------------- */
@media (width < 768px) {
  /* Top Bar Mobile: Location + Prop: Manoj & Rahul */
  .top-bar {
    height: 32px;
  }

  .top-bar-inner {
    height: 32px;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .top-info-group {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
  }

  .top-info-item:not(.top-location-item),
  .v-separator {
    display: none !important;
  }
  
  .top-location-item {
    font-size: 0.72rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 170px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  
  .top-bar-phone {
    padding: 3px 8px;
    font-size: 0.72rem;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: var(--radius-full);
  }
  
  .top-bar-phone svg {
    width: 11px;
    height: 11px;
  }

  /* Main Header Mobile */
  .main-header {
    padding: 8px 0;
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .brand-logo img {
    height: 34px;
    width: auto;
    max-width: 145px;
  }
  
  .header-search {
    display: none; /* Replaced by expandable mobile search bar below */
  }

  /* Expandable Mobile Search Bar */
  .mobile-search-bar {
    display: block;
    padding: 8px 12px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    z-index: 80;
  }

  .mobile-search-bar .search-box {
    display: flex;
    width: 100%;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-full);
    overflow: hidden;
  }

  .mobile-search-bar .search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 14px;
    font-size: 16px; /* Prevents auto zoom on iOS */
    color: var(--color-text-dark);
    outline: none;
  }

  .mobile-search-bar .search-btn {
    border: none;
    background: var(--color-primary-orange);
    color: #FFF;
    padding: 0 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-search-bar .search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    background: #FFF;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    border: 1px solid #E2E8F0;
    max-height: 65vh;
    overflow-y: auto;
    z-index: 1000;
  }
  
  .v-separator-dark {
    display: none;
  }
  
  .action-enquiry {
    display: none;
  }

  .whatsapp-text-wrap {
    display: none;
  }
  
  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .action-whatsapp {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .whatsapp-icon-wrap {
    width: 28px;
    height: 28px;
  }
  
  .action-cart {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
  }

  .action-cart svg {
    width: 24px;
    height: 24px;
  }
  
  .cart-badge {
    width: 16px;
    height: 16px;
    font-size: 0.62rem;
    top: 2px;
    right: -2px;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    background: none;
    border: none;
    color: var(--color-primary-navy);
  }

  .mobile-menu-btn svg {
    width: 26px;
    height: 26px;
  }

  /* Navigation Mobile: Drawer Menu with Slide & Backdrop */
  .main-nav {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 310px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    background-color: var(--color-deep-navy);
    padding: 20px 16px 30px;
    z-index: 10005;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .main-nav.mobile-active {
    transform: translateX(0);
  }
  
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(3, 18, 46, 0.7);
    backdrop-filter: blur(2px);
    z-index: 10004;
  }
  
  .nav-backdrop.active {
    display: block;
  }
  
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    overflow-x: visible;
    white-space: normal;
    width: 100%;
    margin-top: 12px;
  }
  
  .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  
  .nav-link {
    width: 100%;
    padding: 12px 6px;
    font-size: 0.94rem;
    color: #E2E8F0;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .nav-item.active .nav-link,
  .nav-link.home-active {
    color: var(--color-primary-orange);
    font-weight: 700;
  }

  .mobile-close-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: var(--color-white);
    font-weight: 800;
    font-size: 1.05rem;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }
  
  .mobile-close-btn button {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #FFF;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .mobile-drawer-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.78rem;
    color: #CBD5E1;
  }

  .mobile-drawer-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-drawer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
  }

  .mobile-drawer-btn.call {
    background: var(--color-primary-orange);
    color: #FFF;
  }

  .mobile-drawer-btn.whatsapp {
    background: #25D366;
    color: #FFF;
  }

  .mobile-drawer-btn.directions {
    color: #FFF;
    border: 1px solid #94A3B8;
  }

  .mobile-drawer-btn.directions svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  /* Hero Section Mobile (Matches Phone Screen in Reference) */
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .hero-content-panel {
    clip-path: none;
    padding: 24px 16px 20px;
    text-align: center;
    align-items: center;
    background: linear-gradient(180deg, #020C1F 0%, #031433 100%);
  }
  
  .hero-tagline {
    font-size: 0.85rem;
    justify-content: center;
  }
  
  .hero-tagline::before,
  .hero-tagline::after {
    width: 14px;
  }
  
  .hero-heading {
    font-size: 1.85rem;
    margin-bottom: 6px;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 16px;
    line-height: 1.4;
  }
  
  .hero-features {
    display: none; /* In reference smartphone, 4 pill list omitted for clean composition */
  }
  
  .hero-cta-btn {
    align-self: center;
    padding: 10px 28px;
    font-size: 0.92rem;
    margin-bottom: 12px;
  }
  
  .hero-showcase-panel {
    display: none; /* Reference smartphone shows centered navy hero */
  }

  .hero-storefront {
    display: block;
    position: relative;
  }

  .hero-storefront-link {
    position: static;
  }

  .hero-storefront-link img {
    height: auto;
  }

  .hero-actions-row {
    justify-content: center;
  }

  .hero-actions-row .hero-cta-btn {
    min-height: 44px;
    margin-bottom: 0;
    padding-inline: 13px;
  }
  
  .slider-control-btn {
    display: none; /* Phone displays pagination dots */
  }
  
  .slider-dots {
    position: static;
    transform: none;
    justify-content: center;
    padding: 6px 0;
  }

  /* Section Titles Mobile */
  .section-header {
    margin: 18px 0 12px;
  }
  
  .section-title {
    font-size: 1.15rem;
    gap: 8px;
  }
  
  .section-title::before,
  .section-title::after {
    width: 18px;
    height: 2.5px;
  }

  /* Product Categories Mobile: Exactly 3 cards per row */
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .category-card {
    padding: 8px 4px 10px;
    border-radius: var(--radius-sm);
  }
  
  .category-img-wrap {
    margin-bottom: 6px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .category-img-wrap img {
    max-height: 44px;
    object-fit: contain;
  }
  
  .category-name {
    font-size: 0.72rem;
    line-height: 1.2;
    text-align: center;
  }

  /* Promotional Banners Mobile */
  .promo-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .promo-banner {
    min-height: 130px;
  }
  
  .promo-banner-content {
    padding: 16px;
  }
  
  .promo-tagline {
    font-size: 0.85rem;
  }
  
  .promo-title-gold {
    font-size: 1.25rem;
  }
  
  .promo-title-bulk {
    font-size: 1.2rem;
  }
  
  .promo-title-sub-bulk {
    font-size: 1.05rem;
  }

  /* Why Choose Us Mobile (Icon-based compact horizontal row) */
  .why-choose-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  
  .why-card:nth-child(5) {
    display: none; /* Matches reference mobile 4-card compact row */
  }
  
  .why-card {
    flex-direction: column;
    text-align: center;
    padding: 10px 4px;
    gap: 4px;
  }
  
  .why-card-icon {
    width: 28px;
    height: 28px;
  }
  
  .why-card-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .why-card-title {
    font-size: 0.68rem;
    line-height: 1.15;
  }

  /* Bottom Contact Bar Mobile: Sticky Navy Bar */
  .bottom-contact-bar {
    padding: 6px 0 max(6px, env(safe-area-inset-bottom, 6px));
    position: sticky;
    bottom: 0;
    z-index: 999;
  }
  
  .bottom-contact-bar::before,
  .bottom-contact-bar::after {
    display: none;
  }
  
  .bottom-contact-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    padding: 0 12px;
  }

  .bottom-contact-item,
  .bottom-contact-inner .bottom-desktop-label {
    display: none;
  }

  .bottom-contact-inner .bottom-mobile-label {
    display: inline;
  }

  .bottom-call-btn,
  .bottom-whatsapp-btn {
    min-height: 44px;
    width: 100%;
    justify-content: center;
    padding: 8px;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
  }

  .bottom-whatsapp-btn {
    background: #124b37;
  }

  /* Product Catalogue Mobile: 2 Columns at Standard Mobile */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-item-card {
    padding: 10px;
    display: flex;
    flex-direction: column;
  }

  .product-item-thumb {
    height: 135px;
    margin-bottom: 8px;
  }

  .product-item-thumb img {
    height: 100%;
    object-fit: contain;
  }

  .product-item-title {
    font-size: 0.82rem;
    line-height: 1.25;
    height: 34px;
    overflow: hidden;
    margin-bottom: 6px;
  }

  .product-cat-label {
    font-size: 0.68rem;
    margin-bottom: 3px;
  }

  .product-price-row {
    flex-wrap: wrap;
    gap: 4px;
  }

  .product-price-label {
    font-size: 0.95rem;
  }

  .card-subtotal-text {
    font-size: 0.72rem;
    margin-bottom: 8px;
  }

  .product-qty-row {
    margin-bottom: 8px;
    gap: 6px;
  }

  .qty-control {
    border-width: 1px;
  }

  .qty-btn {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  .qty-input {
    width: 54px;
    min-width: 48px;
    height: 30px;
    font-size: 16px !important;
    text-align: center;
    padding: 0 2px;
  }

  .product-actions-row {
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
  }

  .btn-add-cart,
  .btn-whatsapp-quote {
    width: 100%;
    padding: 7px;
    font-size: 0.78rem;
    text-align: center;
    justify-content: center;
  }

  /* Horizontally Scrollable Subcategory Pills */
  .subfilter-pill-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 8px;
    padding: 4px 2px 8px;
  }

  .subfilter-pill-group::-webkit-scrollbar {
    display: none;
  }

  .subfilter-pill {
    flex-shrink: 0;
    padding: 5px 12px;
    font-size: 0.78rem;
  }

  /* Catalog Toolbar */
  .catalog-toolbar {
    padding: 10px 12px;
    gap: 8px;
  }

  .catalog-sort-select {
    padding: 5px 8px;
    font-size: 0.78rem;
  }

  /* Cart Mobile Card Transformation */
  .cart-table-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table,
  .cart-table tbody {
    display: block;
    width: 100%;
  }

  .cart-table tr.cart-item-row {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    gap: 8px;
  }

  .cart-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #F1F5F9;
    font-size: 0.88rem;
  }

  .cart-table td:first-child {
    display: block;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 10px;
    margin-bottom: 4px;
  }

  .cart-table td:last-child {
    border-bottom: none;
    padding-top: 8px;
  }

  .cart-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #64748B;
    font-size: 0.8rem;
  }

  .cart-table td:first-child::before,
  .cart-table td:last-child::before {
    display: none;
  }

  .cart-remove-btn {
    width: 100%;
    text-align: center;
    padding: 9px;
    font-size: 0.85rem;
  }

  .cart-summary-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 8px;
  }

  /* Product Details Page on Mobile */
  .product-details-container {
    padding: 14px !important;
  }

  .gallery-main {
    height: 240px;
  }

  .gallery-thumb {
    width: 52px;
    height: 52px;
  }

  .product-main-heading {
    font-size: 1.35rem;
  }

  .price-value {
    font-size: 1.35rem;
  }

  .btn-action-group {
    flex-direction: column;
    gap: 10px;
  }

  .btn-action-group > * {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .spec-table td {
    padding: 7px 10px;
    font-size: 0.82rem;
  }
}

/* --------------------------------------------------------------------------
   4. ULTRA-SMALL SCREENS (max-width: 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  .top-location-item {
    max-width: 110px;
    font-size: 0.68rem;
  }

  .top-bar-phone {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  .brand-logo img {
    height: 28px;
    max-width: 120px;
  }

  .header-actions {
    gap: 6px;
  }

  .hero-heading {
    font-size: 1.6rem;
  }

  /* At 320px–360px, switch catalogue to 1 column for clean breathing room */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-item-thumb {
    height: 160px;
  }

  .product-item-title {
    height: auto;
  }

  .product-actions-row {
    flex-direction: row;
  }

  /* Fallback: 2 columns on homepage categories for <= 340px */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .why-card:nth-child(5) {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   5. LANDSCAPE ORIENTATION ON MOBILE
   -------------------------------------------------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-content-panel {
    padding: 16px;
  }
  .hero-heading {
    font-size: 1.45rem;
  }
  .hero-subtitle {
    margin-bottom: 8px;
  }
  .gallery-main {
    height: 180px;
  }
  .main-nav {
    width: 280px;
  }
}

/* --------------------------------------------------------------------------
   6. ACCESSIBLE REDUCED MOTION SUPPORT
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
