/* ════════════════════════════════════════════════════════════
   MORE TECH COMPUTERS — shop.css
   Product cards + shop grid. Light theme, tokens from base.css.
   NOTE: .offer-banner, .category-card, .categories-scroll and the
   .products-grid layout live in base.css / home.html — not here.
════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════
   PRODUCT CARD
════════════════════════════════════════ */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--primary-line);
}

/* ── BADGES ── */
.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 100px;
  z-index: 2;
  letter-spacing: 0.01em;
}
.badge.sale {
  background: var(--accent);
  color: #fff;
}
.badge.featured {
  top: 14px;
  right: 14px;
  left: auto;
  background: var(--primary);
  color: #fff;
}

/* ── IMAGE ── */
.product-image {
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--section);
}
.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.product-card:hover .product-image img { transform: scale(1.07); }

/* ── QUICK VIEW (appears on hover, centered over image) ── */
.quick-view {
  position: absolute;
  top: 130px;
  left: 50%;
  transform: translate(-50%, 8px);
  background: rgba(15,23,34,0.92);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 3;
}
.product-card:hover .quick-view {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

/* ── INFO BLOCK ── */
.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* CATEGORY pill */
.product-category {
  align-self: flex-start;
  background: var(--primary-soft);
  color: var(--primary-dk);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 100px;
  margin-bottom: 10px;
}

/* TITLE */
.product-title {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
  /* clamp to 2 lines so cards stay even height */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}
.product-title a:hover { color: var(--primary-dk); }

/* RATINGS */
.ratings {
  font-size: 15px;
  color: var(--gold);
  margin: 0 0 10px;
  line-height: 1;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.ratings span {
  color: var(--muted);
  font-size: 13px;
  font-family: var(--font-body);
  margin-left: 5px;
  letter-spacing: 0;
}

/* PRICE */
.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 14px;
  margin-top: auto;        /* pushes price + button to card bottom */
}
.price .current {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.price .old {
  color: #e23b2e;
  text-decoration: line-through;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── ADD TO CART (wired to addToCart() in base.html) ── */
.add-cart {
  width: 100%;
  padding: 12px;
  border-radius: 100px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.add-cart:hover { background: var(--primary-dk); transform: translateY(-1px); }
.add-cart:disabled { opacity: 0.7; cursor: default; transform: none; }
.add-cart.added { background: var(--green); }

/* ════════════════════════════════════════
   SHOP PAGE — section + grid wrapper
   (generic .products-grid layout is in base.css; this scopes
    the shop listing page specifically)
════════════════════════════════════════ */
.products-section {
  padding: 72px 20px;
  background: var(--page);
}
.products-header {
  max-width: 1200px;
  margin: 0 auto 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.products-header h2 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.products-header a {
  color: var(--primary-dk);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
}
.products-header a:hover { text-decoration: underline; }

/* Shop listing grid */
.products-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

/* ── VIEW MORE button ── */
.view-more-wrap {
  text-align: center;
  margin-top: 44px;
}
.view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 100px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 6px 24px rgba(0,182,214,0.28);
  transition: background 0.2s, transform 0.15s;
}
.view-more-btn:hover { background: var(--primary-dk); transform: translateY(-2px); }

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 768px) {
  .products-section { padding: 56px 18px; }
  .product-image { height: 180px; }
  .quick-view { top: 105px; }
}
@media (max-width: 500px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-card { padding: 12px; }
  .price {
    flex-direction: column;}
  .product-title { font-size: 15px; }
  .price .current { font-size: 1.1rem; }
  .add-cart { font-size: 14px; padding: 11px; }
}