/* ============================================================
   FLORA77 - Product Grid (product-grid.css)
   Product listing grid & card styles
   ============================================================ */

/* ── Grid Container ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  padding: 20px 0;
}

/* ── Product Card ── */
.product-card {
  background: var(--bg-card, #1a1a2e);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
  transition: all 0.25s;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--accent, #22c55e);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

/* ── Card Thumb ── */
.product-card .card-thumb {
  aspect-ratio: 1/1;
  background: var(--bg-surface, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.3s;
}

.product-card:hover .card-thumb img {
  transform: scale(1.05);
}

/* ── Card Badges ── */
.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}

.card-badge.discount { background: var(--danger, #ef4444); }
.card-badge.new { background: var(--accent, #22c55e); }
.card-badge.hot { background: var(--warning, #f59e0b); }

/* ── Card Info ── */
.product-card .card-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-card .card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #e8e8f0);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .card-spec {
  font-size: 11px;
  color: var(--text-muted, #6b6b80);
  font-weight: 500;
}

.product-card .card-price {
  margin-top: auto;
}

.product-card .price-final {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent, #22c55e);
  display: block;
}

.product-card .price-original {
  font-size: 12px;
  color: var(--text-muted, #6b6b80);
  text-decoration: line-through;
}

.product-card .card-sold {
  font-size: 11px;
  color: var(--text-muted, #6b6b80);
}

/* ── Quick Actions ── */
.card-actions {
  display: flex;
  gap: 4px;
  padding: 0 12px 12px;
}

.card-action-btn {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  background: var(--bg-surface, #16213e);
  color: var(--text-secondary, #a0a0b8);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}

.card-action-btn:hover {
  border-color: var(--accent, #22c55e);
  color: var(--accent, #22c55e);
  background: rgba(34,197,94,0.08);
}

.card-action-btn.primary {
  background: linear-gradient(135deg, var(--accent, #22c55e), var(--accent-dark, #16a34a));
  color: #fff;
  border-color: transparent;
}

.card-action-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--accent-glow, rgba(34,197,94,0.3));
}

/* ── Skeleton Loading ── */
.card-skeleton {
  background: var(--bg-card, #1a1a2e);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
}

.card-skeleton .sk-thumb {
  aspect-ratio: 1/1;
  background: linear-gradient(90deg, var(--bg-surface, #16213e) 25%, var(--bg-hover, #1e1e3a) 37%, var(--bg-surface, #16213e) 63%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.card-skeleton .sk-info { padding: 12px; }

.card-skeleton .sk-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-surface, #16213e) 25%, var(--bg-hover, #1e1e3a) 37%, var(--bg-surface, #16213e) 63%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.card-skeleton .sk-line + .sk-line { margin-top: 8px; }
.card-skeleton .sk-line.short { width: 60%; }

@keyframes shimmer {
  0% { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

/* ── Grid Columns ── */
.product-grid--full {
  grid-template-columns: repeat(6, 1fr);
}

.product-grid--compact {
  grid-template-columns: repeat(4, 1fr);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .product-grid, .product-grid--full { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .product-grid, .product-grid--full { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .product-grid, .product-grid--full {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .product-card .card-info { padding: 8px; }
  .product-card .card-name { font-size: 12px; }
  .product-card .price-final { font-size: 13px; }
  .card-actions { padding: 0 8px 8px; }
}
