/*! Plotter Dijital — mağaza bileşenleri (kategori, ürün kartı, ürün detayı) */

:root {
    --st-brand: #053C98;
    --st-brand-600: #0a4bb8;
    --st-brand-50: #eef3fc;
    --st-accent: #21D6CA;
    --st-ink-900: #0f1b33;
    --st-ink-700: #33415c;
    --st-ink-500: #64728c;
    --st-ink-400: #8a96ab;
    --st-ink-200: #dfe4ee;
    --st-ink-100: #edf0f6;
    --st-ink-50: #f6f8fb;
    --st-success: #16865a;
    --st-warning: #b7791f;
    --st-danger: #c8323f;
    --st-radius: 1rem;
    --st-radius-sm: 0.625rem;
    --st-shadow: 0 1px 2px rgba(15, 27, 51, 0.04), 0 2px 8px rgba(15, 27, 51, 0.05);
    --st-shadow-hover: 0 14px 32px -14px rgba(5, 60, 152, 0.28);
}

/* ── Kategori kartı ─────────────────────────────────── */
.cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--st-ink-200);
    border-radius: var(--st-radius);
    overflow: hidden;
    box-shadow: var(--st-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cat-card:hover { border-color: #c7d6f2; box-shadow: var(--st-shadow-hover); }

.cat-card-media {
    aspect-ratio: 4 / 3;
    background: radial-gradient(120% 90% at 50% 20%, #fff 0%, var(--st-ink-50) 100%);
    display: grid;
    place-items: center;
    padding: 1rem;
}

.cat-card-media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform 0.35s ease; }
.cat-card:hover .cat-card-media img { transform: scale(1.04); }

.cat-card-icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--st-brand), var(--st-accent));
}

.cat-card-body { padding: 1rem 1.125rem 1.125rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.cat-card-title { font-size: 1rem; font-weight: 700; color: var(--st-ink-900); margin: 0; line-height: 1.3; }
.cat-card-desc {
    font-size: 0.82rem;
    color: var(--st-ink-500);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-card-link {
    margin-top: auto;
    padding-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 650;
    font-size: 0.85rem;
    color: var(--st-brand);
    text-decoration: none;
}

.cat-card-count { color: var(--st-ink-400); font-weight: 500; font-size: 0.78rem; }
.cat-card-link i { font-size: 0.75rem; transition: transform 0.2s ease; }
.cat-card:hover .cat-card-link i { transform: translateX(3px); }

/* Üst sıradaki 3 ana kategori: daha büyük, vitrin kartı */
.cat-card.is-featured .cat-card-media {
    aspect-ratio: 16 / 11;
    padding: 1.5rem;
    background:
        radial-gradient(90% 70% at 50% 35%, #fff 0%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(5, 60, 152, 0.07) 0%, rgba(33, 214, 202, 0.1) 100%);
}
.cat-card.is-featured .cat-card-body { padding: 1.25rem 1.5rem 1.5rem; gap: 0.5rem; }
.cat-card.is-featured .cat-card-title { font-size: 1.3rem; }
.cat-card.is-featured .cat-card-desc { font-size: 0.9rem; -webkit-line-clamp: 3; }
.cat-card.is-featured .cat-card-link {
    align-self: flex-start;
    margin-top: auto;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--st-brand), #0a6fc2);
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(5, 60, 152, 0.6);
}
.cat-card.is-featured .cat-card-count { color: rgba(255, 255, 255, 0.75); }
.cat-card.is-featured::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--st-brand), var(--st-accent));
}

/* ── Ürün kartı ─────────────────────────────────────── */
.p-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--st-ink-200);
    border-radius: var(--st-radius);
    overflow: hidden;
    box-shadow: var(--st-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.p-card:hover { border-color: #c7d6f2; box-shadow: var(--st-shadow-hover); }
.p-card:focus-within { outline: 2px solid var(--st-brand); outline-offset: 2px; }

.p-card-media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: radial-gradient(120% 90% at 50% 20%, #fff 0%, var(--st-ink-50) 100%);
    padding: 0.875rem;
}

.p-card-media picture, .p-card-img { display: block; width: 100%; height: 100%; }
.p-card-img { object-fit: contain; transition: transform 0.35s ease; }
.p-card:hover .p-card-img { transform: scale(1.04); }

.p-card-badges { position: absolute; top: 0.625rem; left: 0.625rem; right: 0.625rem; display: flex; flex-wrap: wrap; gap: 0.35rem; pointer-events: none; }

.p-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--st-ink-200);
    color: var(--st-ink-700);
}

.p-card-badge.is-deal { background: #fff7e6; border-color: #f7dca3; color: #8a5a0f; }
.p-card-badge.is-low { background: #fff7e6; border-color: #f7dca3; color: #8a5a0f; }
.p-card-badge.is-out { background: #fdecee; border-color: #f3c5ca; color: var(--st-danger); }

.p-card-body { padding: 0.875rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; border-top: 1px solid var(--st-ink-100); }
.p-card-brand { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--st-ink-400); }

.p-card-title { font-size: 0.9rem; font-weight: 650; line-height: 1.35; margin: 0; min-height: 2.43em; }
.p-card-title a {
    color: var(--st-ink-900);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.p-card-title a:hover { color: var(--st-brand); }

.p-card-foot { margin-top: auto; padding-top: 0.625rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem; }
.p-card-pricebox { display: flex; flex-direction: column; min-width: 0; }
.p-card-price { font-size: 1.05rem; font-weight: 800; color: var(--st-brand); font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.p-card-vat { font-size: 0.7rem; color: var(--st-ink-400); }
.p-card-ask { font-size: 0.8rem; font-weight: 600; color: var(--st-ink-500); }

.p-card-cta {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--st-brand-50);
    color: var(--st-brand);
    font-size: 0.8rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.p-card:hover .p-card-cta { background: var(--st-brand); color: #fff; }

@media (max-width: 575.98px) {
    .p-card-body { padding: 0.75rem; }
    .p-card-title { font-size: 0.82rem; }
    .p-card-price { font-size: 0.95rem; }
    .p-card-cta { display: none; }
    .cat-card-body { padding: 0.75rem; }
    .cat-card-title { font-size: 0.9rem; }
    .cat-card-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .p-card-img, .cat-card-media img, .p-card-cta, .cat-card-link i { transition: none; }
    .p-card:hover .p-card-img, .cat-card:hover .cat-card-media img { transform: none; }
}
