/* ======================================================================
   PARTIAL — PRODUCT CARD
   Prefix: .pc-
   Yeniden kullanılabilir ürün kartı (Featured Products, Menu, Search, vb.)
   3 boyut: small / medium / large
   ====================================================================== */

.pc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
    isolation: isolate;
}
.pc:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-lt);
}

/* ─────────── Media (image) ─────────── */

.pc-media-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.pc-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-soft);
}

.pc-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pc:hover .pc-image {
    transform: scale(1.06);
}

.pc-image-fallback {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-lt) 0%, var(--accent-lt) 100%);
    color: var(--primary-dk);
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 3rem;
    letter-spacing: -0.02em;
}

/* ─────────── Badges ─────────── */

.pc-badge {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    border-radius: var(--radius-full);
    line-height: 1;
}

.pc-badge-veg {
    top: 8px;
    inset-inline-start: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    background: #ecfdf5;
    color: #059669;
    border: 1.5px solid #10b981;
}
.pc-badge-veg svg {
    width: 14px;
    height: 14px;
}

.pc-badge-discount {
    top: 8px;
    inset-inline-end: 8px;
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* "Sadece restoranda" — restoran-only ürün */
.pc-badge-in-house {
    top: 8px;
    inset-inline-end: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 5px 10px;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    gap: 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pc-badge-in-house svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* ─────────── Body ─────────── */

.pc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4) var(--sp-4) var(--sp-4);
}

/* 🏷️ Marka rozeti — title üstünde küçük ve sade */
.pc-brand {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 -2px;
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pc-brand-star { color: #f59e0b; font-size: 10px; }
.pc-brand-name { overflow: hidden; text-overflow: ellipsis; }

.pc-title {
    font-family: var(--font-display);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    margin: 0;
    line-height: var(--lh-snug);
    color: var(--text);
}

/* ⚖️ Net ağırlık + raf ömrü */
.pc-netweight {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    line-height: 1.4;
    margin: 2px 0 0;
    flex-wrap: wrap;
}
.pc-shelf-life {
    color: #059669;
    font-weight: 500;
}

.pc-title-link {
    color: inherit;
    text-decoration: none;
    transition: color var(--t-fast);
}
.pc-title-link:hover { color: var(--primary-dk); }

.pc-desc {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: var(--lh-snug);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(var(--fs-sm) * var(--lh-snug) * 2);
}

/* ─────────── Footer (price + action) ─────────── */

.pc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    margin-top: auto;
    padding-top: var(--sp-2);
}

.pc-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.1;
}

.pc-price-old {
    font-size: var(--fs-xs);
    color: var(--text-soft);
    text-decoration: line-through;
}

.pc-price-current {
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--primary-dk);
    font-variant-numeric: tabular-nums;
}

/* 💰 Birim fiyat (₺/kg, ₺/L) — price'in altında soluk */
.pc-price-unit {
    display: block;
    width: 100%;
    font-size: 10.5px;
    font-style: italic;
    color: var(--text-muted, #9ca3af);
    margin-top: 1px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

/* ─────────── Action button (sepete ekle / detay) ─────────── */

.pc-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: all var(--t-fast);
}

.pc-action svg {
    width: 18px;
    height: 18px;
}

.pc-action-add {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.pc-action-add:hover {
    background: var(--primary-dk);
    color: var(--primary-on, #fff);
    transform: scale(1.08);
}
.pc-action-add.is-added {
    background: var(--success, #16a34a);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
    transform: scale(1.12);
    transition: background 0.15s, transform 0.15s;
}
.pc-action-add.is-added svg line {
    /* + → ✓ animasyonu için opacity düşür */
    opacity: 0.6;
}

.pc-action-variants {
    background: var(--bg-soft);
    border: 1.5px solid var(--primary);
    color: var(--primary-dk);
}
.pc-action-variants:hover {
    background: var(--primary);
    color: var(--primary-on, #fff);
}

.pc-action-view {
    background: var(--bg-soft);
    color: var(--text-muted);
}
.pc-action-view:hover {
    background: var(--primary-lt);
    color: var(--primary-dk);
}

.pc-action:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ─────────── Boyutlar ─────────── */

.pc-small {
    /* Compact list view */
}
.pc-small .pc-title { font-size: var(--fs-sm); }
.pc-small .pc-desc  { display: none; }
.pc-small .pc-body  { padding: var(--sp-2) var(--sp-3) var(--sp-3); gap: 4px; }
.pc-small .pc-price-current { font-size: var(--fs-base); }
.pc-small .pc-action { width: 32px; height: 32px; }
.pc-small .pc-action svg { width: 14px; height: 14px; }

.pc-large .pc-title { font-size: var(--fs-lg); }
.pc-large .pc-price-current { font-size: var(--fs-xl); }


/* ======================================================================
   YENİ: Event ribbon + Attrs strip (alerjen + dietary mini chips)
   2026-Q2 — themes/default-perakende refresh
   ====================================================================== */

/* Event ribbon — görselin sol alt köşesinde altın şerit */
.pc-event-ribbon {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(251, 191, 36, .35);
  border: 1px solid rgba(255, 255, 255, .6);
  max-width: calc(100% - 16px);
}
.pc-event-ribbon-icon { font-size: 13px; line-height: 1; }
.pc-event-ribbon-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Attrs strip — body içinde, footer öncesi */
.pc-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 6px;
  align-items: center;
}

.pc-attr-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.pc-attr-chip-dietary {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #86efac;
}
.pc-attr-icon { font-size: 12px; line-height: 1; }

.pc-attr-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  color: #78350f;
  cursor: help;
}
.pc-attr-warn { font-size: 11px; line-height: 1; }
.pc-attr-allergen {
  font-size: 12px;
  line-height: 1;
  cursor: help;
}
.pc-attr-allergen-more {
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  background: #f59e0b;
  color: #fff;
  border-radius: 999px;
  line-height: 1.4;
}

/* Small kartlarda label gizlenir, sadece icon kalır */
.pc-small .pc-attr-label { display: none; }
.pc-small .pc-attr-chip { padding: 3px 6px; }
.pc-small .pc-event-ribbon-text { display: none; }
.pc-small .pc-event-ribbon { padding: 4px 7px; }


/* ======================================================================
   YENİ: Hızlı Dinle butonu (.pc-tts-btn) — kart üzerinde TTS shortcut
   Smart Voice: edge-tts endpoint | Standard: Web Speech API
   ====================================================================== */
.pc-tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin-left: 4px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  flex-shrink: 0;
}
.pc-tts-btn:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #38bdf8;
  transform: scale(1.08);
}
.pc-tts-btn:active { transform: scale(.95); }
.pc-tts-btn:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}
.pc-tts-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.pc-tts-btn.is-playing {
  background: #fef3c7;
  color: #b45309;
  border-color: #f59e0b;
  animation: pcTtsPulse 1.4s ease-in-out infinite;
}
.pc-tts-btn.is-loading {
  background: #fef3c7;
  color: #b45309;
  border-color: #f59e0b;
  cursor: wait;
}
@keyframes pcTtsPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .4); }
  50%      { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); }
}
/* Small kartlarda biraz daha küçük */
.pc-small .pc-tts-btn { width: 24px; height: 24px; }
.pc-small .pc-tts-btn svg { width: 13px; height: 13px; }
