/* ==========================================================
   UNIFIED PRODUCTS & DETAIL SYSTEM
   ========================================================== */

/* Grid Mount */
[data-mount="products-grid"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

/* Card Styling */
.product-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

/* --- PRODUCT DETAIL PAGE (The "Trust" Layout) --- */
.product-shell {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 900px) {
  .product-shell {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Media Gallery */
.product-main-wrapper {
  background: #f8fafc;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
}

.product-main-img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

.product-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.product-thumb-btn {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  padding: 0;
  flex: 0 0 auto;
}

.product-thumb-btn.is-active {
  border-color: var(--accent);
}

/* Panel & Content */
.product-panel {
  position: sticky;
  top: 100px;
}

.product-title {
  font-size: 2.5rem;
  line-height: 1.1;
  margin: 12px 0;
  color: #0f172a;
}

.product-rating {
  color: #fbbf24;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.rating-count {
  color: #64748b;
  margin-left: 8px;
  font-weight: 400;
}

.product-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 24px;
}

/* Pricing */
.price-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-price {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
}

.price-tax-note {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Qty & Actions */
.qty-container {
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.qty-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 8px;
}

.qty-btn:hover {
  background: #f1f5f9;
}

.qty-val {
  font-weight: 800;
  width: 30px;
  text-align: center;
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Badges */
.badge-premium {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f9ff;
  color: #0369a1;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-right: 8px;
}

.badge-trust {
  display: inline-block;
  padding: 4px 12px;
  background: #f0fdf4;
  color: #15803d;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* Direct Button */
.btn-checkout-fast {
  background: transparent;
  color: var(--ink-92);
  border: 1px solid var(--ink-92);
  margin-top: 12px;
  width: 100%;
  min-height: 55px;
  padding: 16px 18px;
  border-radius: 14px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-checkout-fast:hover {
  background: var(--ink-92);
  color: #fff;
}

/* Premium Trust Ticker */
.premium-trust-row {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
}

.trust-item-mini {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 900px) {
  .product-panel {
    position: static;
    top: auto;
  }

  .product-title {
    font-size: 2rem;
  }

  .product-desc {
    font-size: 1rem;
  }

  .product-price {
    font-size: 1.75rem;
  }

  .product-thumb-btn {
    width: 72px;
    height: 72px;
  }

  .premium-trust-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 640px) {
  [data-mount="products-grid"] {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0;
  }

  .product-card {
    border-radius: 18px;
    padding: 14px;
  }

  .product-main-wrapper {
    border-radius: 18px;
  }

  .product-thumbs {
    gap: 10px;
    margin-top: 12px;
  }

  .product-thumb-btn {
    width: 64px;
    height: 64px;
    border-radius: 10px;
  }

  .product-title {
    font-size: 1.65rem;
    line-height: 1.12;
    margin: 10px 0;
  }

  .product-rating {
    font-size: 0.82rem;
    margin-bottom: 14px;
  }

  .product-desc {
    font-size: 0.96rem;
    line-height: 1.55;
    margin-bottom: 18px;
  }

  .product-price {
    font-size: 1.5rem;
  }

  .price-tax-note {
    font-size: 0.76rem;
  }

  .qty-container {
    margin: 24px 0 14px;
    gap: 12px;
    align-items: stretch;
  }

  .qty-ctrl {
    padding: 3px;
  }

  .qty-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .qty-val {
    width: 28px;
    font-size: 0.95rem;
  }

  .product-actions {
    gap: 10px;
  }

  .btn-checkout-fast {
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
  }

  .premium-trust-row {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 24px;
    padding-top: 18px;
  }

  .trust-item-mini {
    font-size: 0.82rem;
  }

  .badge-premium,
  .badge-trust {
    font-size: 0.68rem;
    padding: 4px 10px;
  }
}