/* ================= RESET ================= */
html {
  scroll-behavior: smooth;
}

* {
  transition: background-color .2s ease,
              color .2s ease,
              border-color .2s ease,
              box-shadow .25s ease,
              transform .25s ease,
              opacity .25s ease;
}


* {
  box-sizing: border-box;
}
body{
  margin:0;
  font-family:'Inter','Avenir Next',Arial,sans-serif;
  background:#f3f4f6;
  font-size:14px;

  display:flex;
  flex-direction:column;
  min-height:100vh;
}

/* ================= NAVBAR ================= */
.store-navbar {
  background: #0f3d2e;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.store-navbar a {
  color: white;
  margin-left: 14px;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
}

.logo {
  font-size: 18px;
  font-weight: 600;
}
/* ================= LAYOUT ================= */
.container {
  display: block;
  padding: 20px 25px;
  flex:1;
  padding:20px 25px;
}


/* ================= CHECKOUT ================= */
.checkout-btn {
  display: block;
  width: 100%;
  background: #0f3d2e;
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.checkout-btn:hover {
  background: #145c44;
}

/* ================= SEARCH ================= */
.search-box {
  position: relative;
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0;
  height: 46px;
  display: flex;
  align-items: center;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.search-box:focus-within {
  border-color: #0f3d2e;
  box-shadow: 0 0 0 3px rgba(15,61,46,.15);
}

/* 🔍 Search icon */
.search-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: #6b7280;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  font-size: 14px;
  padding-left: 42px;   /* icon space */
  padding-right: 42px;  /* clear button space */
  background: transparent;
  color: #111;
}

.clear-search {
  position: absolute;
  right: 14px;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}
.clear-search:hover {
  color: #0f3d2e;
}

/* ================= TYPE FILTER ================= */
.type-select {
  width: 100%;
  height: 44px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
}
.type-select:focus {
  border-color: #0f3d2e;
  box-shadow: 0 0 0 3px rgba(15,61,46,.15);
}
/* ================= CATEGORY BAR ================= */

.category-bar{
  background:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.05);
  padding: 14px 25px;
  border-bottom:1px solid #e5e7eb;
  margin-bottom:22px;

  position:sticky;
  top:0;
  z-index:1000;
}

.category-list{
 display:flex;
 gap:10px;
 overflow-x:auto;
 white-space:nowrap;
 padding-bottom:4px;
}

.category-list::-webkit-scrollbar{
 display:none;
}

.category-list a {
  padding: 7px 14px;
  border-radius: 18px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  text-decoration: none;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
}

.category-list a:hover {
  background: #f3f4f6;
}

.category-list a.active {
  background: #0f3d2e;
  color: #ffffff;
  border-color: #0f3d2e;
}

.checkout-btn,
.step-btn,
.add-to-cart-btn {
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0.25px;
}

/* ================= SKELETON LOADING ================= */

.skeleton-card{
  background:#fff;
  border-radius:14px;
  padding:14px;
  height:240px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.skeleton-img{
  height:120px;
  border-radius:10px;
  background:#e5e7eb;
  animation:skeleton 1.2s infinite linear;
}

.skeleton-text{
  height:14px;
  border-radius:6px;
  background:#e5e7eb;
  animation:skeleton 1.2s infinite linear;
}

@keyframes skeleton{
  0%{opacity:0.6}
  50%{opacity:1}
  100%{opacity:0.6}
}

/* ================= PRODUCTS GRID ================= */
.products {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-content: start;
}

/* ================= PRODUCT CARD ================= */
.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
  border-color: #cfe3db; 
}

/* ================= IMAGE ================= */
.card img {
  height: 160px;                 /* 🔥 slightly smaller */
  object-fit: cover;
  background: #f9fafb;
  border-radius: 12px;
  padding: 6px;                  /* 🔥 less padding = compact */
  margin-bottom: 8px;
  transition: transform 0.35s ease;
  aspect-ratio: 1 / 1;
}
.card:hover img {
  transform: scale(1.06);
}

/* ================= TITLE ================= */
.card h4 {
  font-size: 14.5px;
  line-height: 1.35;
  margin: 0 0 4px;
  min-height: 34px;
  font-family: 'Inter', 'Avenir Next', Arial, sans-serif;
  font-weight: 500;        /* Medium */
  letter-spacing: 0.2px;  /* Avenir-like spacing */
  padding:1px 0;
}

/* ================= AVAILABILITY ================= */
.availability {
  font-size: 12.5px;
  margin-bottom: 6px;
}

.in-stock {
 color:#15803d;
 font-weight:500;
}
.out-of-stock { color: #dc2626; }

/* ================= FOOTER ================= */
.card-footer {
  margin-top: auto;              /* 🔥 always bottom aligned */
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

/* ================= PRICE ================= */
.price-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Increased gap */
}

.card .price {
  margin: 0;
  font-size: 18px;               /* 🔥 image jaisa */
  font-weight: 700;
  color: #0f3d2e;
}

/* ================= ADD TO CART ================= */
.add-to-cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0f3d2e;
  color: #fff;
  border-radius: 10px;
  padding: 6px 12px;             /* 🔥 compact button */
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.add-to-cart-btn:hover {
  background: #145c44;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15,61,46,.25);
}
.card:hover .add-to-cart-btn {
  box-shadow: 0 6px 14px rgba(15,61,46,.25);
}


.qty-pill {
  background: #fff;
  color: #0f3d2e;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}


/* ================= QUICK VIEW OVERLAY ================= */
.quickview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.quickview-overlay.show {
  display: flex;
}

/* ================= MODAL ================= */
.quickview-modal {
  position: relative;
  background: #fff;
  border-radius: 10px;
  width: 60%;
  max-width: 880px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 🔥 important */
  box-shadow: 0 25px 60px rgba(0,0,0,.3);
}

/* ================= CLOSE BUTTON ================= */
.qv-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
}

/* ================= TOP CONTENT (SCROLLABLE) ================= */
.qv-top {
  padding: 14px 16px;
  max-height: 200px;          /* 🔥 top section height */
  overflow-y: auto;           /* 🔥 scrollbar */
  border-bottom: 1px solid #e5e7eb;

}

/* scrollbar (clean) */
.qv-top::-webkit-scrollbar,
.qv-description::-webkit-scrollbar {
  width: 6px;
}
.qv-top::-webkit-scrollbar-thumb,
.qv-description::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}

/* ================= CONTENT GRID ================= */
.qv-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
  padding: 8px 16px;
}

/* IMAGE */
.qv-image img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8f8f8;
}

/* INFO */
.qv-info h2 {
  font-size: 18px;
  margin: 0 0 6px;
  line-height: 1.3;
}

.qv-price {
  font-size: 15px;
  margin-bottom: 4px;
}

.qv-availability {
  font-size: 13px;
  color: #16a34a;
  margin-bottom: 10px;
}

/* ADD TO CART */
.qv-info .add-to-cart-btn {
  width: fit-content;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
}

/* ================= DESCRIPTION (SCROLLABLE) ================= */
.qv-description {
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
  overflow-y: auto;          /* 🔥 separate scrollbar */
  max-height: calc(85vh - 200px); /* 🔥 remaining height */
}

.qv-top::-webkit-scrollbar,
.qv-description::-webkit-scrollbar {
  width: 6px;
}

.qv-top::-webkit-scrollbar-thumb,
.qv-description::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.qv-top::-webkit-scrollbar-thumb:hover,
.qv-description::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ================= PAGINATION ================= */
.pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
  padding: 10px;
}

.pagination button {
  min-width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pagination button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.pagination button.active {
  background: #0f3d2e;
  color: #ffffff;
  border-color: #0f3d2e;
}

.pagination span {
  display: flex;
  align-items: flex-end;
  padding-bottom: 8px;
  color: #6b7280;
  font-weight: bold;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .container {
    flex-direction: column;
    padding: 15px;
  }
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
  .quickview-modal {
    width: 80%;
  }
}

@media (max-width: 768px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .card img {
    height: 140px;
  }
  .pagination button {
    min-width: 35px;
    height: 35px;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .category-bar {
    padding: 10px 15px;
    margin-bottom: 15px;
  }
  
  .category-list a {
    padding: 6px 12px;
    font-size: 12px;
  }

  .qv-content {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  
  .qv-image img {
    height: 180px;
  }

  .quickview-modal {
    width: 95%;
    max-height: 90vh;
  }

  .pagination {
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .card {
    padding: 8px;
  }
  
  .card img {
    height: 120px;
  }
  
  .card h4 {
    font-size: 13px;
    min-height: 32px;
  }
  
  .card .price {
    font-size: 16px;
  }
  
  .add-to-cart-btn {
    padding: 5px 8px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .products {
    grid-template-columns: 1fr;
  }
}