/* ==========================================================================
   INSANE-GENIX // 3D SPATIAL PRODUCT CARDS & CART (HIGH FPS OPTIMIZED)
   ========================================================================== */

/* Catalog Toolbar */
.catalog-toolbar {
  background: #0e0e16;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.35rem 1.75rem;
  margin-bottom: 2.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.search-box-wrap {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.85rem 1.1rem 0.85rem 3rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary-red);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.filter-sort-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.custom-select {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.custom-select:hover, .custom-select:focus {
  border-color: var(--primary-red);
}

.custom-select option {
  background: #111118;
  color: #fff;
}

/* Category Filter Tabs */
.category-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
}
.category-tabs-wrap::-webkit-scrollbar {
  display: none;
}

.cat-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 0.65rem 1.35rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.cat-tab-btn:hover {
  background: rgba(255, 30, 39, 0.15);
  border-color: rgba(255, 30, 39, 0.45);
  color: #fff;
}

.cat-tab-btn.active {
  background: var(--crimson-gradient);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cat-count-badge {
  background: rgba(0, 0, 0, 0.45);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
}

.catalog-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.catalog-status-bar strong {
  color: #fff;
}

/* ==========================================================================
   3D SPATIAL PRODUCT GRID & CARDS (ZERO JANK / ZERO LAG)
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
  gap: 2.2rem;
  contain: layout style;
}

.product-card {
  position: relative;
  background: #101018;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  contain: content;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  transform: translateZ(0);
}

.card-edge-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
  opacity: 0.3;
}

.product-card:hover .card-edge-glow {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 30, 39, 0.55);
  background: #151522;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
}

.card-header-meta {
  position: absolute;
  top: 1.15rem;
  left: 1.15rem;
  right: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}

.product-badge {
  background: var(--primary-red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.product-badge.gold {
  background: linear-gradient(135deg, #d4af37, #997b1a);
  color: #000;
}

.product-category-tag {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 20px;
}

/* Card Image & 3D Podium */
.card-image-wrap {
  position: relative;
  width: 100%;
  height: 245px;
  background: radial-gradient(circle at 50% 55%, rgba(255, 30, 39, 0.08) 0%, #0a0a10 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-3d-podium {
  position: absolute;
  bottom: 20px;
  width: 130px;
  height: 18px;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 30, 39, 0.35) 0%, transparent 70%);
  border-radius: 50%;
}

.card-product-img {
  max-width: 78%;
  max-height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.8));
  transition: transform 0.35s ease;
  transform: translateZ(0);
}

.product-card:hover .card-product-img {
  transform: scale(1.08) translateY(-4px);
}

.card-quick-actions {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.product-card:hover .card-quick-actions {
  opacity: 1;
  transform: translateY(0);
}

.quick-view-btn {
  background: #14141e;
  border: 1px solid var(--border-glass);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-view-btn:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
  transform: scale(1.1);
}

/* Card Body */
.card-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-strength-pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #ff5b63;
  background: rgba(255, 30, 39, 0.14);
  border: 1px solid rgba(255, 30, 39, 0.35);
  padding: 0.18rem 0.6rem;
  border-radius: 6px;
}

.product-chemical-comp {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  line-height: 1.4;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-specs-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
}

.spec-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.spec-chip i {
  color: var(--primary-red);
  font-size: 0.72rem;
}

/* Card Footer & Add to Cart */
.card-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.price-block {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.price-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.add-cart-btn {
  background: rgba(255, 30, 39, 0.14);
  border: 1px solid rgba(255, 30, 39, 0.4);
  color: #ffffff;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.add-cart-btn:hover {
  background: var(--crimson-gradient);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

/* ==========================================================================
   PRODUCT QUICK-VIEW MODAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 4, 6, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #12121c;
  border: 1px solid rgba(255, 30, 39, 0.35);
  border-radius: 26px;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95);
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-smooth);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--primary-red);
}

.modal-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
}

.modal-visual-side {
  background: radial-gradient(circle at 50% 50%, rgba(255, 30, 39, 0.15) 0%, #0c0c14 100%);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-subtle);
  position: relative;
}

.modal-product-image {
  max-width: 85%;
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.9));
  margin-bottom: 1.5rem;
}

.modal-details-side {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
}

.modal-product-brand {
  font-size: 2.3rem;
  margin-bottom: 0.25rem;
}

.modal-product-composition {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.modal-rating-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stars-list {
  color: #ffb703;
  display: flex;
  gap: 0.2rem;
}

.specs-meter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.25rem;
}

.meter-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.meter-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.meter-bar-fill {
  height: 100%;
  background: var(--crimson-gradient);
  border-radius: 3px;
}

.modal-actions-box {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.modal-quantity-wrap {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  overflow: hidden;
}

.qty-btn {
  background: none;
  border: none;
  color: #fff;
  width: 38px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
}

.qty-btn:hover {
  background: rgba(255, 30, 39, 0.25);
  color: var(--primary-red);
}

.qty-input {
  width: 48px;
  background: none;
  border: none;
  color: #fff;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  outline: none;
}

/* ==========================================================================
   LUXURY SHOPPING CART DRAWER
   ========================================================================== */
.cart-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.cart-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -500px;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: #12121a;
  border-left: 1px solid rgba(255, 30, 39, 0.35);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.9);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  transition: right var(--transition-smooth);
}

.cart-drawer-backdrop.open .cart-drawer {
  right: 0;
}

.drawer-header {
  padding: 1.6rem 1.8rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d0d14;
}

.drawer-title {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.drawer-title span {
  color: var(--primary-red);
}

.drawer-body {
  padding: 1.6rem 1.8rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.empty-inquiry-box {
  text-align: center;
  padding: 4.5rem 1rem;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 3.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.inquiry-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0.95rem 1.1rem;
  position: relative;
}

.inquiry-item-thumb {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  object-fit: cover;
}

.inquiry-item-info {
  flex: 1;
}

.inquiry-item-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
}

.inquiry-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.inquiry-item-price {
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  font-size: 1rem;
  margin-top: 0.2rem;
}

.inquiry-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.remove-item-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
}

.remove-item-btn:hover {
  color: var(--primary-red);
}

.drawer-footer {
  padding: 1.6rem 1.8rem;
  border-top: 1px solid var(--border-subtle);
  background: #0d0d14;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.summary-row.total-row {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.85rem;
}

.summary-row.total-row strong {
  color: var(--primary-red);
  font-family: var(--font-display);
}

.whatsapp-checkout-btn {
  background: #25d366;
  color: #000;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform var(--transition-fast);
}

.whatsapp-checkout-btn:hover {
  transform: translateY(-2px);
  background: #20ba59;
}
