/* ==========================================================================
   MOBILE HEADER — 4-row layout
   Row 1: Logo (centered, full width)
   Row 2: Toggle/Hamburger (left) | Wishlist + Cart + Login (right)
   Row 3: Location
   Row 4: Search bar
   ========================================================================== */

/* Wrapper — contains all 4 rows */
.mobile-hdr-wrap {
  background: #ffffff;
  border-bottom: 2px solid #eaeaea;
}

/* ── Row 1: Logo ── */
.mobile-hdr-logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.65rem 1rem 0.4rem;
  border-bottom: 1px solid #f1f2f4;
}

.mobile-hdr-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

/* ── Row 2: Toggle + Icons ── */
.mobile-hdr-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.85rem;
  border-bottom: 1px solid #f1f2f4;
}

/* Hamburger / Toggle button */
.mobile-hdr-hamburger {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
  font-size: 1.35rem;
  color: #191c1f;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s;
}

.mobile-hdr-hamburger:hover {
  border-color: #da251e;
  color: #da251e;
  background: #fff5f5;
}

.mobile-hdr-toggle-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: inherit;
  line-height: 1;
}

/* Icons group */
.mobile-hdr-icons {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── Row 3: Location ── */
.mobile-hdr-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 1rem;
  font-size: 0.82rem;
  color: #4b5563;
  border-bottom: 1px solid #f1f2f4;
  cursor: pointer;
  transition: background 0.15s;
}

.mobile-hdr-location:hover {
  background: #fff5f5;
}

.mobile-hdr-location strong {
  color: #191c1f;
  font-weight: 700;
}

/* ── Row 4: Search ── */
.mobile-hdr-search {
  padding: 0.5rem 0.85rem 0.6rem;
}



/* ===== GLOBAL: prevent horizontal scroll ===== */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

*,
*::before,
*::after {
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Mobile bottom nav body padding ===== */
@media (max-width: 991px) {
  body {
    padding-bottom: 70px;
    /* space for mobile bottom nav */
  }
}

/* ===================================================================
   LARGE DESKTOP (1400px+)
   =================================================================== */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* ===================================================================
   MEDIUM DESKTOP (1200px – 1399px)
   =================================================================== */
@media (max-width: 1399px) {
  .cat-circle-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
  }

  .cat-circle-thumb {
    width: 95px;
    height: 95px;
  }

  .hero-slide-title {
    font-size: 2.35rem;
  }
}

/* ===================================================================
   SMALL DESKTOP (992px – 1199px)
   =================================================================== */
@media (max-width: 1199px) {
  .cat-circle-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
  }

  .hero-slide {
    min-height: 360px;
  }

  .hero-slide-title {
    font-size: 2rem;
  }

  .hdr-loc-val {
    max-width: 90px;
  }

  .tracking-timeline {
    overflow-x: auto;
    padding-bottom: 1rem;
  }
}

/* ===================================================================
   TABLET (768px – 991px)
   =================================================================== */
@media (max-width: 991px) {


  /* Header */
  .hdr-main {
    display: none !important;
    /* replaced by .mobile-hdr-row on mobile */
  }


  .hdr-search-wrap {
    max-width: 100%;
    margin-top: 0.5rem;
  }

  .hdr-loc-pill {
    display: none !important;
  }

  .hdr-actions {
    gap: 0.75rem;
  }

  .hdr-action-btn span {
    display: none;
  }

  .hdr-icon-box {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  /* Hero */
  .hero-slide {
    min-height: 320px;
  }

  .hero-slide-content {
    padding: 2rem;
    max-width: 100%;
  }

  .hero-slide-title {
    font-size: 1.85rem;
  }

  .hero-banner-section {
    padding: 1rem 0 1.5rem;
  }

  /* Categories */
  .cat-circle-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }

  .cat-circle-thumb {
    width: 85px;
    height: 85px;
  }

  /* Product grid */
  .product-grid-wrap .col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Shop filter sidebar */
  .filter-sidebar {
    margin-bottom: 1.5rem;
  }

  /* Product detail */
  .pdp-details-wrap {
    padding-left: 0;
    margin-top: 2rem;
  }

  /* Cart table */
  .cart-table th,
  .cart-table td {
    padding: 0.65rem 0.5rem;
    font-size: 0.875rem;
  }

  /* Footer */
  .site-footer {
    padding: 2.5rem 0 1rem;
  }

  .footer-col {
    margin-bottom: 1.5rem;
  }

  .footer-stores-bar {
    font-size: 0.8rem;
    line-height: 2;
  }

  /* Section titles */
  .section-title {
    font-size: 1.65rem;
  }
}

/* ===================================================================
   MOBILE LANDSCAPE / LARGE PHONES (576px – 767px)
   =================================================================== */
@media (max-width: 767px) {

  /* ── Top bar ── */
  .top-notice-bar {
    font-size: 0.75rem;
    text-align: center;
    padding: 0.3rem 0;
  }

  .top-notice-bar .text-end {
    display: none !important;
  }

  /* ── Brand logo ── */
  .brand-title {
    font-size: 1.1rem;
  }

  .brand-subtitle {
    font-size: 0.62rem;
  }

  .brand-emblem {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  /* ── Header strip ── */
  .hdr-main {
    padding: 0.55rem 0;
  }

  /* ── Hero ── */
  .hero-slide {
    min-height: 220px;
  }

  .hero-banner-section {
    padding: 0.75rem 0 1rem;
  }

  .hero-slide-content {
    padding: 1.5rem 1rem;
  }

  .hero-slide-tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    margin-bottom: 0.6rem;
  }

  .hero-slide-title {
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
    line-height: 1.2;
  }

  .hero-slide-desc {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-slide-content .btn {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 8%;
  }

  /* ── Category grid ── */
  .cat-circle-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .cat-circle-thumb {
    width: 72px;
    height: 72px;
  }

  .cat-circle-name {
    font-size: 0.78rem;
  }

  .cat-circle-count {
    font-size: 0.7rem;
  }

  /* ── Section headers ── */
  .section-title {
    font-size: 1.35rem;
  }

  .section-header {
    margin-bottom: 1.25rem;
  }

  /* ── USP cards (Fixed Mobile Squeeze) ── */
  .usp-card {
    padding: 1.1rem 0.75rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    height: 100%;
    border-radius: var(--radius-md);
  }

  .usp-icon-wrap {
    min-width: 44px;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
  }

  .usp-title {
    font-size: 0.88rem;
    margin-bottom: 0.2rem;
  }

  .usp-desc {
    font-size: 0.72rem;
    line-height: 1.35;
    margin-bottom: 0;
  }

  /* ── Review & Testimonial section ── */
  .review-card,
  .testimonial-slide-card {
    padding: 1.25rem 1rem;
    border-radius: 14px;
  }

  .testimonial-quote-icon {
    font-size: 1.75rem;
    top: 0.85rem;
    right: 1rem;
  }

  /* ── Shop page ── */
  .shop-banner {
    padding: 1.5rem !important;
  }

  .shop-banner h1 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .shop-banner p {
    font-size: 0.85rem;
  }

  .filter-sidebar {
    padding: 1rem;
  }

  .filter-heading {
    font-size: 0.85rem;
  }

  .product-grid-wrap .col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* ── Product card ── */
  .product-body {
    padding: 1rem;
  }

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

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

  .product-add-btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
  }

  .product-desc-snippet {
    display: none;
  }

  .product-weight-row {
    margin-bottom: 0.5rem;
  }

  /* ── Product detail page ── */
  .pdp-main-img {
    height: 280px;
  }

  .pdp-current-price {
    font-size: 1.75rem;
  }

  /* ── Cart page ── */
  .cart-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cart-table th,
  .cart-table td {
    white-space: nowrap;
  }

  /* ── Checkout ── */
  .checkout-progress {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  .step-connector {
    width: 24px;
    margin: 0 0.25rem;
  }

  .checkout-step-label {
    font-size: 0.7rem;
  }

  /* ── Tracking page ── */
  .tracking-timeline {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    padding-left: 2rem;
    position: relative;
  }

  .tracking-timeline::before {
    top: 20px;
    bottom: 20px;
    left: 45px;
    width: 3px;
    height: auto;
    right: auto;
  }

  .timeline-progress-bar {
    top: 20px;
    left: 45px;
    width: 3px;
    height: 50%;
    right: auto;
  }

  .timeline-step {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1rem;
    width: 100%;
  }

  .timeline-icon-box {
    margin-bottom: 0;
    min-width: 50px;
  }

  /* ── Footer ── */
  .footer-bottom-copy {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .footer-bottom-copy .d-flex {
    justify-content: center;
  }

  .site-footer {
    padding: 2rem 0 1rem;
  }

  .footer-stores-bar {
    font-size: 0.78rem;
    line-height: 2.2;
  }

  /* ── Mobile bottom nav ── */
  .mobile-bottom-nav {
    display: flex !important;
  }

  /* ── Contact page ── */
  .contact-map-wrap {
    height: 250px;
  }

  /* ── About page ── */
  .about-hero {
    min-height: 200px;
    padding: 2rem 1rem;
  }

  .about-hero h1 {
    font-size: 1.6rem;
  }

  /* ── Order confirmation ── */
  .order-success-box {
    padding: 2rem 1rem;
  }

  /* ── Payment page ── */
  .payment-method-card {
    padding: 1rem;
  }
}

/* ===================================================================
   SMALL PHONES (360px – 575px)
   =================================================================== */
@media (max-width: 575px) {

  /* ── Container padding ── */
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* ── Category grid – 3 columns ── */
  .cat-circle-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .cat-circle-thumb {
    width: 68px;
    height: 68px;
  }

  .cat-circle-name {
    font-size: 0.72rem;
  }

  .cat-circle-card {
    padding: 0.5rem 0.25rem;
  }

  /* ── Hero ── */
  .hero-slide {
    min-height: 200px;
  }

  .hero-slide-content {
    padding: 1rem;
  }

  .hero-slide-title {
    font-size: 1.2rem;
  }

  .hero-slide-desc {
    display: none;
  }

  .hero-slide-content .d-flex {
    gap: 0.5rem;
  }

  .hero-slide-content .btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
  }

  /* ── Product grid – 2 columns on small phones ── */
  .product-grid-wrap .col,
  .row-cols-2>.col,
  .row-cols-sm-2>.col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* ── Product card compact & responsive ── */
  .product-card {
    height: 100% !important;
    border-radius: 12px;
  }

  .product-thumb-wrap {
    padding-top: 85%;
  }

  .product-badges-wrap {
    top: 6px;
    left: 6px;
    gap: 3px;
  }

  .badge-item {
    font-size: 0.58rem;
    padding: 0.15rem 0.45rem;
    letter-spacing: 0;
  }

  .wishlist-btn-corner {
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .product-body {
    padding: 0.65rem 0.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }

  .product-meta-row {
    margin-bottom: 0.25rem;
  }

  .product-cat-name {
    font-size: 0.62rem;
    letter-spacing: 0;
  }

  .product-rating-pill {
    font-size: 0.62rem;
    padding: 0.1rem 0.35rem;
  }

  .product-title {
    font-size: 0.825rem;
    line-height: 1.25;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.1rem;
  }

  .product-desc-snippet {
    display: none !important;
  }

  .product-weight-row {
    margin-bottom: 0.35rem;
    gap: 0.2rem;
    flex-wrap: wrap;
  }

  .weight-pill {
    font-size: 0.62rem;
    padding: 0.1rem 0.32rem;
  }

  .product-footer-row {
    margin-top: auto;
    padding-top: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
  }

  .product-current-price {
    font-size: 0.95rem;
    font-weight: 700;
  }

  .product-mrp-price {
    font-size: 0.68rem;
    margin-top: 0;
  }

  .product-add-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    white-space: nowrap;
    border-radius: 20px;
    flex-shrink: 0;
  }

  /* ── Buttons ── */
  .btn-brand,
  .btn-brand-outline {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  /* ── Section title ── */
  .section-title {
    font-size: 1.25rem;
  }

  /* ── Cart total ── */
  .cart-total-box {
    padding: 1.25rem;
  }

  /* ── Checkout ── */
  .checkout-step-dot {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }

  .checkout-form-section {
    padding: 1.25rem;
  }

  /* ── Shop filter ── */
  .filter-sidebar {
    padding: 0.85rem;
  }

  /* ── Header icons ── */
  .hdr-icon-box {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .hdr-actions {
    gap: 0.5rem;
  }

  .brand-emblem {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .brand-title {
    font-size: 1rem;
  }

  .brand-subtitle {
    display: none;
  }

  /* ── Mobile bottom nav spacing ── */
  .mobile-bottom-nav {
    padding: 0.3rem 0;
  }

  .mobile-nav-link span {
    font-size: 0.65rem;
  }

  .mobile-nav-link i {
    font-size: 1.15rem;
  }

  /* ── Footer bottom ── */
  .footer-bottom-copy {
    font-size: 0.8rem;
  }

  /* ── Order success ── */
  .order-success-box {
    padding: 1.5rem 0.75rem;
  }

  /* ── Product details ── */
  .pdp-main-img {
    height: 240px;
  }

  .pdp-current-price {
    font-size: 1.5rem;
  }

  .pdp-title {
    font-size: 1.25rem;
  }

  /* ── Cart table ── */
  .cart-table {
    font-size: 0.85rem;
  }
}

/* ===================================================================
   EXTRA SMALL (< 360px)
   =================================================================== */
@media (max-width: 359px) {
  .cat-circle-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }

  .cat-circle-thumb {
    width: 60px;
    height: 60px;
  }

  .hero-slide {
    min-height: 180px;
  }

  .hero-slide-title {
    font-size: 1.05rem;
  }

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

  .hdr-icon-box {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }
}

/* ===================================================================
   UTILITY: Mobile-specific helpers
   =================================================================== */

/* Truncate long text gracefully */
.text-truncate-mobile {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hide on mobile, show on desktop */
@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }

  .show-mobile {
    display: block !important;
  }
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none !important;
  }

  .show-desktop {
    display: block !important;
  }
}

/* Smooth scrolling for horizontal nav */
.hdr-nav-list,
.tab-scroll-wrap {
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.hdr-nav-item {
  scroll-snap-align: start;
}

/* Fix modal z-index on mobile */
.modal-backdrop {
  z-index: 1040;
}

.modal {
  z-index: 1045;
}

/* ===================================================================
   COMPREHENSIVE ALL-CARDS MOBILE RESPONSIVENESS FIXES
   =================================================================== */
@media (max-width: 767px) {

  /* All card containers fill full height of grid columns */
  .product-card,
  .usp-card,
  .testimonial-slide-card,
  .review-card,
  .form-card,
  .cart-total-box,
  .card {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Equal height rows for card grids */
  .row>[class*="col-"] {
    display: flex;
    flex-direction: column;
  }

  .row>[class*="col-"]>.product-card,
  .row>[class*="col-"]>.usp-card,
  .row>[class*="col-"]>.testimonial-slide-card,
  .row>[class*="col-"]>.card {
    flex: 1 1 auto;
    width: 100%;
  }

  /* Product Card Mobile Proportions */
  .product-card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    height: 100%;
  }

  .product-thumb-wrap {
    padding-top: 80%;
    border-radius: 12px 12px 0 0;
  }

  .product-body {
    padding: 0.65rem 0.55rem;
  }

  .product-meta-row {
    margin-bottom: 0.2rem;
  }

  .product-cat-name {
    font-size: 0.62rem;
    font-weight: 600;
  }

  .product-rating-pill {
    font-size: 0.62rem;
    padding: 0.1rem 0.35rem;
  }

  .product-title {
    font-size: 0.825rem;
    line-height: 1.25;
    margin-bottom: 0.25rem;
    min-height: 2.1rem;
    -webkit-line-clamp: 2;
  }

  .product-weight-row {
    margin-bottom: 0.35rem;
    gap: 0.2rem;
  }

  .weight-pill {
    font-size: 0.62rem;
    padding: 0.1rem 0.32rem;
  }

  .product-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    padding-top: 0.35rem;
    margin-top: auto;
  }

  .product-current-price {
    font-size: 0.95rem;
    font-weight: 700;
  }

  .product-mrp-price {
    font-size: 0.68rem;
  }

  .product-add-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    border-radius: 16px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* USP Card Responsive */
  .usp-card {
    padding: 1rem 0.6rem !important;
    text-align: center;
    border-radius: 12px;
  }

  .usp-icon-wrap {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }

  .usp-title {
    font-size: 0.825rem;
    margin-bottom: 0.2rem;
  }

  .usp-desc {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  /* Brand Location text in mobile header */
  .brand-loc-link {
    font-size: 0.72rem;
    padding-top: 1px;
  }

  .brand-loc-text {
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 480px) {
  .product-body {
    padding: 0.55rem 0.45rem;
  }

  .product-title {
    font-size: 0.78rem;
    min-height: 1.95rem;
  }

  .product-current-price {
    font-size: 0.88rem;
  }

  .product-add-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
  }

  .brand-loc-text {
    max-width: 130px;
  }
}