/* public/css/store.css — Nova Store storefront styles (Layer 2).
   Design system: deep space black #0A0A0C, neon cyan #00D1C1, neon purple #A020F0,
   electric blue #3A7BFF, cards #1A1A1A / #2A2A2A. */

/* ═══ Store Body Override ═══ */
.store-body { background: #0A0A0C; }

/* ═══ Layout ═══ */
.store-main {
  margin-left: 240px;
  padding: 1.5rem 2rem;
  min-height: 100vh;
  max-width: 1400px;
}
@media (max-width: 768px) {
  .store-main { margin-left: 0; padding: 1rem; padding-top: 4rem; }
}

/* ═══ Header ═══ */
.store-header { margin-bottom: 1rem; }
.store-header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.store-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.store-logo-icon {
  width: 28px;
  height: 28px;
  color: #00D1C1;
  filter: drop-shadow(0 0 6px rgba(0, 209, 193, 0.4));
}
.store-title {
  font-family: 'Inter', var(--ff-head), sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #00D1C1, #A020F0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.store-subtitle {
  color: #666;
  font-size: 0.8rem;
  font-family: 'Inter', var(--ff-body), sans-serif;
}

/* Search bar */
.store-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 480px;
}
.store-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #666;
  transition: color 0.2s;
}
.store-search {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 2.5rem;
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}
.store-search:focus {
  border-color: #00D1C1;
  box-shadow: 0 0 0 3px rgba(0, 209, 193, 0.1);
}
.store-search:focus + .store-search-icon,
.store-search:focus ~ .store-search-icon { color: #00D1C1; }

/* Cart icon */
.store-cart-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 8px;
  color: #aaa;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s;
}
.store-cart-icon svg { width: 20px; height: 20px; }
.store-cart-icon:hover { border-color: #00D1C1; color: #00D1C1; }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #FF4D6D;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  display: none;
}
.cart-badge.visible { display: flex; }

/* ═══ Category Chips ═══ */
.store-chips-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.store-chips-row::-webkit-scrollbar { display: none; }
.store-chip {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid #2A2A2A;
  background: #1A1A1A;
  color: #aaa;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
.store-chip:hover {
  border-color: #00D1C1;
  color: #fff;
}
.store-chip.active {
  background: #00D1C1;
  color: #0A0A0C;
  border-color: #00D1C1;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(0, 209, 193, 0.3);
}

/* ═══ Toolbar (sort + results count) ═══ */
.store-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.store-results-count {
  color: #666;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
}
.store-select {
  padding: 0.45rem 0.75rem;
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 8px;
  color: #fff;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.store-select:focus { border-color: #00D1C1; }

/* ═══ Product Grid ═══ */
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1024px) {
  .store-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .store-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* ═══ Product Card ═══ */
.product-card {
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.22s ease-out,
              box-shadow 0.22s ease-out;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: #00D1C1;
  box-shadow: 0 4px 24px rgba(0, 209, 193, 0.12), 0 0 0 1px rgba(0, 209, 193, 0.1);
}

/* Card image */
.product-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #111;
}
.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-card:hover .product-card-img { transform: scale(1.03); }
.product-card-noimg {
  width: 100%;
  aspect-ratio: 1;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

/* Profit badge — top-right, neon cyan glow */
.profit-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 209, 193, 0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(0, 209, 193, 0.5);
  animation: profitPulse 1.5s ease-in-out infinite;
  z-index: 2;
}
@keyframes profitPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 209, 193, 0.5); }
  50% { box-shadow: 0 0 20px rgba(0, 209, 193, 0.7), 0 0 6px rgba(0, 209, 193, 0.3); }
}
@media (max-width: 500px) {
  .profit-badge { font-size: 0.65rem; padding: 0.2rem 0.5rem; }
}

/* Card body */
.product-card-body {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.product-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  line-height: 1.3;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-vendor {
  font-size: 0.7rem;
  color: #666;
  font-family: 'Inter', sans-serif;
}
.product-card-vendor span { color: #888; }
.product-card-divider {
  height: 1px;
  background: #2A2A2A;
  margin: 0.2rem 0;
}

/* Profit row */
.product-card-profit {
  font-size: 0.78rem;
  font-weight: 500;
  color: #00D1C1;
  font-family: 'Inter', sans-serif;
}

/* Price row */
.product-card-prices {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}
.product-card-original {
  font-size: 0.75rem;
  color: #555;
  text-decoration: line-through;
}
.product-card-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

/* Add to Cart */
.product-card-cart-btn {
  width: 100%;
  padding: 0.55rem;
  margin-top: 0.4rem;
  background: #FF4D6D;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s ease-out, transform 0.15s ease-out;
}
.product-card-cart-btn:hover {
  background: #ff6b85;
  transform: scale(1.02);
}
.product-card-cart-btn:active { transform: scale(0.98); }
.product-card-cart-btn.added {
  background: #00D1C1;
  pointer-events: none;
}

/* ═══ Badges ═══ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-approved {
  background: rgba(0, 209, 193, 0.12);
  color: #00D1C1;
  border: 1px solid rgba(0, 209, 193, 0.3);
}
.badge-vendor {
  background: rgba(255, 77, 109, 0.12);
  color: #FF4D6D;
  border: 1px solid rgba(255, 77, 109, 0.3);
}
.badge-category {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #aaa);
  border: 1px solid #2A2A2A;
}
.product-card-badges {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

/* ═══ Pagination ═══ */
.store-pagination-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-bottom: 2rem;
}
.store-pagination-info {
  color: #666;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
}
.store-pagination {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.store-page-btn {
  padding: 0.4rem 0.75rem;
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 8px;
  color: #aaa;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.store-page-btn:hover { border-color: #00D1C1; color: #fff; }
.store-page-btn.active {
  background: #00D1C1;
  color: #0A0A0C;
  border-color: #00D1C1;
  font-weight: 700;
}
.store-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ═══ Loading & Empty States ═══ */
.store-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: #666;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.store-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #2A2A2A;
  border-top-color: #00D1C1;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.store-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
}
.store-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  color: #333;
  filter: drop-shadow(0 0 8px rgba(0, 209, 193, 0.2));
}
.store-empty-title {
  color: #aaa;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}
.store-empty-text {
  color: #555;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}
.store-empty-link {
  color: #00D1C1;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: 'Inter', sans-serif;
  border: none;
  background: none;
}
.store-empty-link:hover { opacity: 0.7; }


/* ═══ Search results label ═══ */
.store-search-results-label {
  color: #888;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

/* ═══ Back link (product detail) ═══ */
.store-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #00D1C1;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  transition: opacity 0.2s;
}
.store-back:hover { opacity: 0.7; }

/* ═══ PRODUCT DETAIL PAGE ═══ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 1100px;
}
@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; gap: 1.5rem; }
}

.product-gallery { position: relative; }
.product-main-img-wrap {
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 12px;
  overflow: hidden;
}
.product-main-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #111;
}
.product-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}
.product-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.product-thumb:hover, .product-thumb.active { border-color: #00D1C1; }
.product-no-img {
  aspect-ratio: 1;
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

.product-info { display: flex; flex-direction: column; gap: 1.25rem; }
.product-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.product-name {
  font-family: 'Inter', var(--ff-head), sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}
.product-price-block { display: flex; align-items: baseline; gap: 0.75rem; }
.product-price {
  font-size: 2rem;
  font-weight: 800;
  color: #00D1C1;
}
.product-price-note { color: #666; font-size: 0.8rem; }

.product-breakdown {
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 12px;
  padding: 1rem;
}
.product-breakdown h3 {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: #aaa;
}
.breakdown-row.breakdown-total {
  border-top: 1px solid #2A2A2A;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.product-description h3 {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.product-description p {
  color: #aaa;
  font-size: 0.875rem;
  line-height: 1.7;
}

.product-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.meta-item {
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}
.meta-label {
  display: block;
  font-size: 0.65rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.meta-value {
  font-size: 0.8rem;
  color: #fff;
  font-weight: 500;
}

/* ═══ Cart Page ═══ */
.cart-items { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.cart-item { display: flex; align-items: center; gap: 1rem; background: #1a1a1a; border-radius: 12px; padding: 1rem; border: 1px solid #2a2a2a; }
.cart-item-img img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex: 1; }
.cart-item-name { color: #fff; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.cart-item-price { color: #00D1C1; font-weight: 700; font-size: 1.1rem; }
.cart-item-remove { background: none; border: none; color: #666; font-size: 1.5rem; cursor: pointer; padding: 0.5rem; transition: color 0.15s; }
.cart-item-remove:hover { color: #FF4D6D; }
.cart-summary { background: #1a1a1a; border-radius: 12px; padding: 1.5rem; border: 1px solid #2a2a2a; max-width: 400px; }
.cart-summary-row { display: flex; justify-content: space-between; color: #aaa; padding: 0.4rem 0; font-size: 0.9rem; }
.cart-summary-total { color: #fff; font-weight: 700; font-size: 1.2rem; border-top: 1px solid #333; margin-top: 0.5rem; padding-top: 0.75rem; }
.cart-checkout-btn { display: block; width: 100%; padding: 0.9rem; background: linear-gradient(135deg, #00D1C1, #3A7BFF); color: #fff; font-weight: 700; border: none; border-radius: 10px; cursor: pointer; text-align: center; text-decoration: none; font-size: 1rem; margin-top: 1rem; transition: opacity 0.15s; }
.cart-checkout-btn:hover { opacity: 0.9; }
.cart-continue-link { display: block; text-align: center; color: #00D1C1; text-decoration: none; margin-top: 0.75rem; font-size: 0.9rem; }

/* ═══ Checkout Page ═══ */
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-summary { background: #1a1a1a; border-radius: 12px; padding: 1.5rem; border: 1px solid #2a2a2a; align-self: start; }
.checkout-section-title { color: #fff; font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.checkout-item { display: flex; justify-content: space-between; color: #ccc; padding: 0.4rem 0; font-size: 0.9rem; }
.checkout-total { color: #00D1C1; font-weight: 700; font-size: 1.15rem; border-top: 1px solid #333; margin-top: 0.5rem; padding-top: 0.75rem; }
.checkout-divider { border-top: 1px solid #2a2a2a; margin: 0.75rem 0; }
.checkout-form { background: #1a1a1a; border-radius: 12px; padding: 1.5rem; border: 1px solid #2a2a2a; }
.checkout-field { margin-bottom: 1rem; }
.checkout-field label { display: block; color: #aaa; font-size: 0.8rem; margin-bottom: 0.3rem; }
.checkout-field input { width: 100%; padding: 0.7rem 0.9rem; background: #0A0A0C; border: 1px solid #333; border-radius: 8px; color: #fff; font-size: 0.95rem; box-sizing: border-box; }
.checkout-field input:focus { outline: none; border-color: #00D1C1; }
.checkout-field-row { display: flex; gap: 1rem; }
.checkout-field-row .checkout-field { flex: 1; }
.checkout-notice { background: #1a1a2e; border: 1px solid #3A7BFF44; border-radius: 8px; padding: 0.75rem; color: #7aa2f7; font-size: 0.85rem; margin-bottom: 1rem; text-align: center; }

/* ═══ Order Confirmed Page ═══ */
.order-confirmed { text-align: center; padding: 4rem 2rem; max-width: 500px; margin: 0 auto; }
.order-confirmed-icon { margin-bottom: 1.5rem; }
.order-confirmed-title { color: #fff; font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; }
.order-confirmed-text { color: #aaa; font-size: 1rem; line-height: 1.6; margin-bottom: 1.5rem; }
.order-confirmed-id { display: inline-block; background: #1a1a2e; border: 1px solid #3A7BFF44; border-radius: 8px; padding: 0.5rem 1.5rem; color: #00D1C1; font-family: monospace; font-size: 1rem; margin-bottom: 2rem; }
.order-confirmed-actions { display: flex; flex-direction: column; gap: 0.5rem; max-width: 300px; margin: 0 auto; }
