/* ==========================================================================
   CHATKARA FOODS - COMPREHENSIVE RESPONSIVE STYLESHEET
   Mobile-First & Breakpoints: 320px, 480px, 768px, 1024px, 1280px
   ========================================================================== */

/* --------------------------------------------------------------------------
   GLOBAL RESET & CONTAINER ADAPTATIONS
   -------------------------------------------------------------------------- */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

.container {
  width: 100%;
  max-width: var(--container-max, 1320px);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   HEADER & NAVIGATION RESPONSIVENESS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .nav-links {
    gap: 1.2rem;
  }
  .nav-link {
    font-size: 0.88rem;
  }
}

@media (max-width: 860px) {
  .site-header {
    padding: 0;
  }
  .header-inner {
    height: 4rem;
    gap: 0.75rem;
  }
  .brand-logo .logo-symbol {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }
  .brand-name {
    font-size: 1.2rem;
  }
  .brand-sub {
    font-size: 0.58rem;
    letter-spacing: 0.04em;
  }
  .nav-links {
    display: none; /* Collapsed on mobile/tablet */
  }
  .header-actions {
    gap: 0.5rem;
  }
  .header-actions a[href*="wa.me"] span:last-child {
    display: none; /* Show only WhatsApp icon on small screens */
  }
  .header-actions a[href*="wa.me"] {
    padding: 0.45rem 0.65rem !important;
  }
  .cart-trigger-pill {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 3.8rem;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-sub {
    font-size: 0.54rem;
  }
  .brand-logo {
    gap: 0.5rem;
  }
}

/* Mobile Quick Navigation Bar */
.mobile-nav-bar {
  display: none;
}
@media (max-width: 860px) {
  .mobile-nav-bar {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #FFFFFF;
    border-bottom: 1px solid var(--color-border);
    padding: 0.4rem 1rem;
    gap: 0.8rem;
    position: sticky;
    top: 4rem;
    z-index: 85;
  }
  .mobile-nav-bar::-webkit-scrollbar {
    display: none;
  }
  .mobile-nav-bar a {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text-main);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    background: var(--bg-surface-alt);
    border: 1px solid var(--color-border);
    transition: all 0.2s;
  }
  .mobile-nav-bar a.active, .mobile-nav-bar a:hover {
    background: var(--color-pine-dark);
    color: #FFFFFF;
    border-color: var(--color-pine-dark);
  }
}

/* --------------------------------------------------------------------------
   HERO SECTION RESPONSIVENESS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-section {
    padding: 3rem 0 3.5rem;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: left;
  }
  .hero-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
  }
  .hero-image-wrap {
    max-height: 380px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2.5rem 0 3rem;
  }
  .hero-tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
  }
  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.3rem);
    line-height: 1.25;
  }
  .hero-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }
  .hero-cta-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.65rem;
  }
  .hero-cta-group button {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px;
    padding: 0.8rem 1rem;
    font-size: 0.84rem;
  }
  .trust-strip-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
    padding: 0.85rem !important;
    font-size: 0.78rem !important;
  }
}

@media (max-width: 480px) {
  .hero-cta-group {
    flex-direction: column;
  }
  .hero-cta-group button {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   CATALOG & TOOLBAR RESPONSIVENESS
   -------------------------------------------------------------------------- */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .search-box {
    width: 100%;
    max-width: 100%;
  }
  .sort-box {
    width: 100%;
    justify-content: space-between;
  }
  .sort-select {
    flex: 1;
  }
}

.category-tabs-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.4rem 0 1rem;
  margin-bottom: 1.5rem;
}
.category-tabs-wrapper::-webkit-scrollbar {
  display: none;
}
.category-tabs {
  display: flex;
  gap: 0.6rem;
  white-space: nowrap;
  width: max-content;
}

/* --------------------------------------------------------------------------
   PRODUCTS GRID RESPONSIVENESS
   -------------------------------------------------------------------------- */
.products-grid, .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  width: 100%;
}

@media (max-width: 900px) {
  .products-grid, .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 580px) {
  .products-grid, .product-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .product-card {
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   4-JAR BUNDLE BUILDER RESPONSIVENESS
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .bundle-box-container {
    padding: 1.75rem 1.25rem;
  }
  .bundle-slots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 500px) {
  .bundle-slots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .bundle-slot {
    min-height: 150px;
    padding: 0.85rem 0.4rem;
  }
  .slot-img {
    width: 52px;
    height: 52px;
  }
  .slot-title {
    font-size: 0.74rem;
  }
  .slot-badge {
    font-size: 0.62rem;
    padding: 0.15rem 0.45rem;
  }
  .bundle-flavor-chip {
    padding: 0.35rem 0.65rem;
    font-size: 0.74rem;
  }
  .bundle-flavor-chip img {
    width: 26px;
    height: 26px;
  }
}

/* --------------------------------------------------------------------------
   STORY, VALUES & BLOGS RESPONSIVENESS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .blogs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
  .blogs-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --------------------------------------------------------------------------
   FOOTER RESPONSIVENESS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .site-footer {
    padding: 3.5rem 0 1.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   CHECKOUT & MODALS RESPONSIVENESS
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .modal-overlay, .modal-backdrop {
    padding: 0.75rem;
    align-items: flex-end; /* Mobile Bottom Sheet Feel */
  }
  .modal-card {
    width: 100% !important;
    max-height: 90vh !important;
    border-radius: 24px 24px 12px 12px !important;
    padding: 1.35rem 1rem !important;
    margin: 0 !important;
  }
  .checkout-steps-bar {
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }
  .step-pill {
    padding: 0.35rem 0.75rem;
    font-size: 0.76rem;
  }
  .cart-drawer {
    width: 100% !important;
    max-width: 100% !important;
  }
}
