/* ============================================================
   Smart Shop Pro — Product Cards (Reference-Style Redesign)
   FILE: public/css/ssp-cards.css
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   PRODUCT CARD
   ──────────────────────────────────────────────────────────── */
.ssp-product-card {
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.07),
    0 12px 32px rgba(0, 0, 0, 0.08);
  border: none;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}

.ssp-product-card:hover {
  transform: translateY(-7px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.1),
    0 28px 52px rgba(0, 0, 0, 0.09);
}

/* ────────────────────────────────────────────────────────────
   IMAGE ZONE
   ──────────────────────────────────────────────────────────── */
.ssp-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f5f6f8;
}

.ssp-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ssp-product-card:hover .ssp-card-image img {
  transform: scale(1.05);
}

.ssp-card-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  background: linear-gradient(145deg, #f0f4f8 0%, #e8edf2 100%);
  color: #c9d2dc;
}

/* ────────────────────────────────────────────────────────────
   BADGES
   ──────────────────────────────────────────────────────────── */
.ssp-badge-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}

.ssp-badge {
  display: inline-block;
  padding: 4px 11px !important;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--ssp-font-head);
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.ssp-badge-sale {
  background: var(--ssp-green);
  color: #fff;
}
.ssp-badge-featured {
  background: #ff9900;
  color: #fff;
}
.ssp-badge-custom {
  background: var(--ssp-green);
  color: #fff;
}
.ssp-badge-out {
  background: rgba(156, 163, 175, 0.85);
  color: #fff;
}

/* WISHLIST BUTTON */
.ssp-wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s ease;
}
.ssp-wishlist-btn:hover {
  transform: scale(1.15);
}
.ssp-wishlist-btn svg {
  width: 15px;
  height: 15px;
}

/* IMAGE DOTS */
.ssp-img-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}
.ssp-img-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  transition:
    width 0.2s ease,
    background 0.2s ease;
}
.ssp-img-dot.active {
  background: #1a6fd4;
  width: 16px;
  border-radius: 4px;
}

/* Remove old overlay / quick-add */
.ssp-card-overlay,
.ssp-quick-add {
  display: none !important;
}

/* ────────────────────────────────────────────────────────────
   CARD BODY
   ──────────────────────────────────────────────────────────── */
.ssp-card-body {
  padding: 14px 16px 18px !important;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 5px;
}

.ssp-card-category {
  font-size: 10.5px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 3px;
}

.ssp-card-title {
  font-family: var(--ssp-font-head);
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

/* ────────────────────────────────────────────────────────────
   STAR RATING
   ──────────────────────────────────────────────────────────── */
.ssp-card-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 10px;
}
.ssp-star {
  width: 13px;
  height: 13px;
  color: #f59e0b;
}
.ssp-star-empty {
  color: #e5e7eb;
}
.ssp-star-count {
  font-size: 11px;
  color: #9ca3af;
  margin-left: 3px;
  font-weight: 500;
}

/* ────────────────────────────────────────────────────────────
   COLOR + SIZE META ROW
   ──────────────────────────────────────────────────────────── */
.ssp-card-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
}
.ssp-meta-label {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.ssp-color-dots {
  display: flex;
  gap: 6px;
}
.ssp-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.ssp-color-dot.active,
.ssp-color-dot:hover {
  border-color: #111827;
}

.ssp-size-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px 22px 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 7px center;
  cursor: pointer;
  outline: none;
  font-family: var(--ssp-font-body);
  transition: border-color 0.2s;
}
.ssp-size-select:hover,
.ssp-size-select:focus {
  border-color: #1a6fd4;
}

/* ────────────────────────────────────────────────────────────
   DESCRIPTION
   ──────────────────────────────────────────────────────────── */
.ssp-card-desc {
  font-size: 12px;
  color: #000000;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

/* ────────────────────────────────────────────────────────────
   STOCK INDICATOR
   ──────────────────────────────────────────────────────────── */
.ssp-card-stock {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
}
.ssp-stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ssp-in-stock .ssp-stock-dot {
  background: var(--ssp-green);
}
.ssp-low-stock .ssp-stock-dot {
  background: #f59e0b;
}
.ssp-no-stock .ssp-stock-dot {
  background: #9ca3af;
}

.ssp-in-stock {
  color: var(--ssp-green);
}
.ssp-low-stock {
  color: #b45309;
}
.ssp-no-stock {
  color: #9ca3af;
}

/* ────────────────────────────────────────────────────────────
   PRICE + CTA FOOTER PILL
   ──────────────────────────────────────────────────────────── */
.ssp-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f7f8fa;
  border-radius: 14px;
  padding: 10px 14px;
  border: 1.5px solid #eef0f3;
  margin-top: auto;
  gap: 8px;
}

.ssp-price-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1px;
}

.ssp-price-current {
  font-family: var(--ssp-font-head);
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
  line-height: 1;
}

.ssp-price-regular {
  font-size: 11px;
  font-weight: 600;
  color: #f47d15;
  text-decoration: line-through;
  margin-left: 5px;
}

/* Hide old standalone discount pill — info shown via strikethrough */
.ssp-price-discount {
  display: none;
}

/* ────────────────────────────────────────────────────────────
   ADD TO CART BUTTON
   ──────────────────────────────────────────────────────────── */
.ssp-card-btn {
  background: #1a6fd4;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 14px !important;
  font-family: var(--ssp-font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  letter-spacing: 0.2px;
  flex-shrink: 0;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}
.ssp-card-btn:hover:not(:disabled) {
  background: var(--ssp-green);
  transform: scale(1.04);
}
.ssp-card-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.ssp-card-btn:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* ────────────────────────────────────────────────────────────
   LOADING & EMPTY STATES
   ──────────────────────────────────────────────────────────── */
.ssp-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 80px 0;
  color: var(--ssp-muted);
  font-size: 14px;
}

.ssp-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--ssp-green, #1a6fd4);
  border-radius: 50%;
  animation: ssp-spin 0.7s linear infinite;
}

@keyframes ssp-spin {
  to {
    transform: rotate(360deg);
  }
}

.ssp-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: var(--ssp-muted);
}
.ssp-no-results-icon {
  font-size: 52px;
  margin-bottom: 14px;
}
.ssp-no-results h3 {
  font-family: var(--ssp-font-head);
  font-size: 20px;
  color: var(--ssp-text);
  margin-bottom: 8px;
}
.ssp-no-results p {
  font-size: 14px;
}

.ssp-card-price {
  display: flex;
  gap: 20px;
}
