/* ==========================================================================
   HomeNestStore - Responsive Stylesheet (css/responsive.css)
   Mobile-First Breakpoint Architecture:
   320px, 360px, 390px, 480px, 768px, 1024px, 1280px+
   Zero Horizontal Scroll, Fluid Layouts & Touch-Friendly Touch Targets
   ========================================================================== */

/* --------------------------------------------------------------------------
   BASE MOBILE DEFAULTS (< 480px)
   -------------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.hamburger-toggle-btn {
  display: flex; /* Visible on mobile */
}

.desktop-nav-menu {
  display: none; /* Hidden on mobile */
}

.cart-layout-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  width: 100%;
}

.cart-table-header {
  display: none; /* Stacks vertically on mobile */
}

.cart-item-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.cart-col-price,
.cart-col-total {
  display: none; /* Replaced by inline mobile price */
}

.cart-item-mobile-price {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.footer-grid {
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.footer-bottom-bar {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

/* --------------------------------------------------------------------------
   VERY SMALL MOBILE BREAKPOINT (<= 360px)
   iPhone SE 1st gen, Galaxy Fold closed, etc.
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  html {
    font-size: 15px;
  }

  .site-brand-logo {
    font-size: 1.15rem;
  }

  .header-actions-group {
    gap: 2px;
  }

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

  .product-grid {
    grid-template-columns: 1fr; /* Single column on extreme narrow screens to prevent text squeeze */
    gap: 14px;
  }

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

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

  .product-card-actions {
    flex-direction: column;
  }

  .btn-add-cart, .btn-quick-details {
    width: 100%;
  }

  .cart-item-row {
    grid-template-columns: 60px 1fr;
    row-gap: 8px;
  }

  .cart-col-remove {
    grid-column: 2 / -1;
    justify-self: end;
  }
}

/* --------------------------------------------------------------------------
   SMARTPHONE VIEW (361px to 479px)
   -------------------------------------------------------------------------- */
@media (min-width: 361px) and (max-width: 479px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-card {
    padding: 8px;
  }

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

  .product-card-actions {
    flex-direction: column;
    gap: 4px;
  }

  .btn-add-cart {
    padding: 6px 8px;
    font-size: 0.8rem;
    min-height: 38px;
  }

  .btn-quick-details {
    display: none; /* Keeps mobile product card compact */
  }
}

/* --------------------------------------------------------------------------
   LARGE SMARTPHONE / COMPACT TABLET (480px to 767px)
   -------------------------------------------------------------------------- */
@media (min-width: 480px) and (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

/* --------------------------------------------------------------------------
   TABLET BREAKPOINT (768px to 1023px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .hamburger-toggle-btn {
    display: none; /* Hide hamburger */
  }

  .desktop-nav-menu {
    display: flex; /* Show 5 navbar links */
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-6);
  }

  /* Cart Layout becomes side-by-side or clean wide table */
  .cart-table-header {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1.2fr 1fr 40px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.825rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
  }

  .cart-item-row {
    grid-template-columns: 2.5fr 1fr 1.2fr 1fr 40px;
    padding: 16px 0;
  }

  .cart-col-price,
  .cart-col-total {
    display: block;
    font-weight: 600;
  }

  .cart-col-total {
    font-weight: 700;
  }

  .cart-item-mobile-price {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   LAPTOP BREAKPOINT (1024px to 1279px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

  .cart-layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-8);
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 2fr 1.2fr 1.2fr 1.6fr;
    gap: var(--space-8);
  }
}

/* --------------------------------------------------------------------------
   LARGE DESKTOP BREAKPOINT (1280px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }

  .cart-layout-grid {
    grid-template-columns: 1fr 400px;
    gap: var(--space-10);
  }
}

/* --------------------------------------------------------------------------
   GLOBAL OVERFLOW & ACCESSIBILITY GUARD
   -------------------------------------------------------------------------- */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

pre, code, table {
  max-width: 100%;
  overflow-x: auto;
}

/* Focus styles for keyboard accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}
/* Mobile Screens (768px se kam) ke liye layout fix */
@media screen and (max-width: 768px) {
  /* Cart Table Header ko hide karein kyunki mobile me card view hoga */
  .cart-table-header {
    display: none;
  }

  /* Har cart item row ko card format me badlein */
  .cart-item-row {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: #fff;
    position: relative;
  }

  /* Top Section: Image aur Details ko ek row me rakein */
  .cart-col-product {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    width: 100%;
  }

  .cart-item-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
  }

  .cart-item-details {
    flex: 1;
  }

  /* Price, Quantity, aur Total ko bottom controls me Arrange karein */
  .cart-col-price {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
  }

  .cart-col-qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
  }

  .qty-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .qty-step-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    border-radius: 4px;
    cursor: pointer;
  }

  .cart-col-total {
    font-weight: bold;
    font-size: 1rem;
    margin-top: 6px;
    text-align: right;
  }

  /* Remove Button ko card ke top-right corner par place karein */
  .cart-col-remove {
    position: absolute;
    top: 10px;
    right: 10px;
  }
}

/* Container ko flexrow aur stretch se set karein */
.wishlist-card-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 4px !important; /* Buttons ke beech ka distance */
  width: 100% !important;
  margin-top: 8px;
}

/* Dono buttons ki width, padding aur font size adjust karein */
.wishlist-card-actions .btn-move-cart,
.wishlist-card-actions .btn-wish-remove {
  white-space: nowrap !important; /* Text break hone se rokega */
  font-size: 10px !important;     /* Text chota karega */
  padding: 6px 4px !important;    /* Button padding kam karega */
  line-height: 1 !important;      /* Extra vertical space khatam karega */
  text-align: center;
  box-sizing: border-box;
}

/* "Move to Cart" button ko zyada space dene ke liye */
.wishlist-card-actions .btn-move-cart {
  flex: 1.4 !important;
}

/* "Remove" button ko fit karne ke liye */
.wishlist-card-actions .btn-wish-remove {
  flex: 1 !important;
}
.btn-move-cart svg {
  display: none !important;
}
.hero-banner-overlay-tag {
  left: 50% !important;
  transform: translateX(-50%) !important;
  text-align: center;
  width: max-content; /* Ya auto, taaki extra space na le */
  max-width: 90%;     /* Small screens par padding maintain rakhne ke liye */
}
@media screen and (max-width: 576px) {
  /* Team Grid ko Horizontal Scroll Container me badlein */
  .team-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important; /* Horizontally scroll hoga */
    scroll-snap-type: x mandatory; /* Smooth snap effect */
    gap: 16px !important;
    padding-bottom: 12px; /* Scrollbar space */
    -webkit-overflow-scrolling: touch;
  }

  /* Har Team Card ko fixed responsive width dein */
  .team-card {
    flex: 0 0 80% !important; /* Ek bar me ~1.2 cards dikhenge */
    scroll-snap-align: start;
    box-sizing: border-box;
  }

  /* Scrollbar ko clean/minimal dikhane ke liye (optional) */
  .team-grid::-webkit-scrollbar {
    height: 4px;
  }

  .team-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }
}
@media screen and (max-width: 576px) {
  /* 2x2 Grid maintain rakhne ke liye */
  .pillars-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 4 cards ko 2x2 me rakhega */
    gap: 8px !important; /* Cards ke beech ka gap kam */
  }

  /* Card ke andar padding kam karein */
  .pillar-card {
    padding: 12px 8px !important;
    min-width: 0 !important; /* Grid item overflow na ho */
    box-sizing: border-box;
  }

  /* Headings aur Titles ka size chota karein */
  .pillar-card h3 {
    font-size: 13px !important;
    margin-bottom: 4px !important;
    line-height: 1.2;
  }

  /* Paragraph, Email, aur Phone number ke liye */
  .pillar-card p,
  .pillar-card a,
  .pillar-card span {
    font-size: 10px !important;
    line-height: 1.3 !important;
    word-break: break-word !important; /* Long email addresses line break ho jayenge */
    overflow-wrap: break-word !important;
  }

  /* Icon size chota karein */
  .pillar-icon-top {
    margin-bottom: 6px !important;
  }
  
  .pillar-icon-top svg {
    width: 20px !important;
    height: 20px !important;
  }
}
/* 1. Dropdown styling na di top bar */
.category-dropdown,
.sort-dropdown {
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #ffffff;
  font-size: 14px;
  color: #374151;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.category-dropdown:focus,
.sort-dropdown:focus {
  border-color: #4f46e5;
}

/* 2. Grid layout setup for make cards bigger */
.product-grid, 
.products-container {
  display: grid;
  /* Increase minimum card width to make fewer, larger cards per row */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 24px !important;
}

/* 3. Bigger Card Container */
.product-card {
  padding: 16px !important;
  border-radius: 12px !important;
  background: #ffffff;
}

/* 4. Bigger Image Container & Image styling */
.product-card .image-wrapper,
.product-card .card-image,
.product-card img {
  width: 100% !important;
  /* Increase height to make images bigger */
  height: 280px !important; 
  object-fit: cover !important;
  border-radius: 8px !important;
}/* Shop layout full width */
.shop-layout {
  display: block !important;
  width: 100% !important;
}

/* Align Dropdown next to Search */
div:has(> input[placeholder*="Search"]) {
  display: flex !important;
  gap: 12px !important;
  width: 100% !important;
}

.category-dropdown {
  height: 42px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
  background-color: #fff !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

/* Larger Product Cards & Images */
.product-grid,
div:has(> .product-card) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 24px !important;
}

.product-card img {
  height: 280px !important;
  width: 100% !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}
/* Sidebar hide & layout full width */
aside.shop-sidebar, .shop-sidebar { display: none !important; }
.shop-layout { display: block !important; width: 100% !important; }

/* Custom Dropdown Styling */
.custom-dropdown-container {
  position: relative;
  display: inline-block;
}

.category-dropdown-menu {
  position: relative;
}

.dropdown-trigger-btn {
  height: 42px;
  padding: 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  list-style: none;
}

.category-dropdown-menu[open] .dropdown-trigger-btn {
  border-color: #111827;
}

.category-dropdown-menu ul#categoryFilterList {
  position: absolute;
  top: 48px;
  left: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 6px;
  margin: 0;
  list-style: none;
  z-index: 50;
}

.category-dropdown-menu ul#categoryFilterList li {
  margin: 0;
}

.category-dropdown-menu .filter-category-btn {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.category-dropdown-menu .filter-category-btn:hover,
.category-dropdown-menu .filter-category-btn.active {
  background: #f3f4f6;
  font-weight: 600;
}

/* Cards & Images Size Increase */
.product-grid, div:has(> .product-card) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 24px !important;
}

.product-card img {
  height: 280px !important;
  width: 100% !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}
/* Toolbar flex layout */
.shop-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  background: #ffffff !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 24px !important;
}

/* Search bar takes available space */
.shop-search-bar {
  flex: 1 !important;
}

/* Custom Dropdown Styling inside Toolbar */
.custom-dropdown-container {
  position: relative !important;
}

.dropdown-trigger-btn {
  height: 40px !important;
  padding: 0 14px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  white-space: nowrap !important;
  list-style: none !important;
}

.category-dropdown-menu ul#categoryFilterList {
  position: absolute !important;
  top: 46px !important;
  left: 0 !important;
  width: 200px !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
  padding: 6px !important;
  margin: 0 !important;
  list-style: none !important;
  z-index: 100 !important;
}

.category-dropdown-menu .filter-category-btn {
  width: 100% !important;
  text-align: left !important;
  padding: 8px 12px !important;
  border: none !important;
  background: transparent !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: space-between !important;
  font-size: 14px !important;
}

.category-dropdown-menu .filter-category-btn:hover,
.category-dropdown-menu .filter-category-btn.active {
  background: #f3f4f6 !important;
  font-weight: 600 !important;
}

/* Bigger Cards & Images */
.product-card img,
.product-card [class*="image"] {
  height: 280px !important;
  width: 100% !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}
/* Mobile view (screens up to 768px wide) */
@media (max-width: 768px) {
  .product-grid,
  #shopProductGrid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 1 line me 2 cards */
    gap: 12px !important; /* Mobile ke hisaab se gap */
    padding: 8px !important;
  }

  /* Card and Image proportions for 2-column mobile layout */
  .product-card {
    padding: 8px !important;
  }

  .product-card img,
  .product-card [class*="image"],
  .product-card .product-img-wrap {
    height: 160px !important; /* Card size ke hisaab se image height */
    width: 100% !important;
    object-fit: cover !important;
  }

  /* Text & buttons responsive sizing */
  .product-card h3,
  .product-card [class*="title"] {
    font-size: 0.85rem !important;
  }

  .product-card button,
  .product-card [class*="btn"] {
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
  }
}