/* ============================================================================
   HERO V3 — Mandıracıdede anasayfa kahraman alanı
   Foundation tokens: themes/mandiracidede/assets/css/home-v3.css
   ============================================================================ */

.hv3 {
    position: relative;
    min-height: 80vh;
    background: var(--cream);
    overflow: hidden;
    padding: 80px 0 60px;
}

/* Arkaplan yaprak deseni — yavaş drift */
.hv3-bg-pattern {
    position: absolute;
    inset: 0;
    opacity: .05;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 24 24' fill='%233D5A3D'%3E%3Cpath d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z'/%3E%3C/svg%3E");
    background-size: 120px 120px;
    animation: hv3-bg-drift 50s linear infinite;
}
@keyframes hv3-bg-drift {
    from { background-position: 0 0; }
    to   { background-position: 120px 120px; }
}

.hv3-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 60px;
    align-items: center;
    position: relative;
}

/* ─────────────── SOL: İçerik ─────────────── */
.hv3-content {
    position: relative;
    z-index: 2;
}

/* Brand row — marka adı + tagline */
.hv3-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--ink-soft);
    font-size: 14px;
    flex-wrap: wrap;
}
.hv3-brand-name {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--earth);
    letter-spacing: -.01em;
}
.hv3-brand-sep { opacity: .35; }
.hv3-brand-tagline {
    font-style: italic;
    color: var(--ink-soft);
    font-weight: 500;
}

.hv3-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(61,90,61,.08);
    color: var(--earth);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}
.hv3-eyebrow svg {
    width: 16px;
    height: 16px;
    animation: hv3-leaf-tilt 3s ease-in-out infinite;
}
@keyframes hv3-leaf-tilt {
    0%, 100% { transform: rotate(0); }
    50%      { transform: rotate(8deg); }
}

.hv3-title {
    font-family: var(--serif);
    font-size: clamp(2.6rem, 5.5vw, 5rem);
    line-height: 1.04;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0 0 24px;
}
.hv3-title em {
    font-style: italic;
    color: var(--earth);
    font-weight: 400;
    display: inline-block;
    animation: hv3-em-pulse 4s ease-in-out infinite;
}
@keyframes hv3-em-pulse {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50%      { text-shadow: 0 4px 24px rgba(212, 168, 69, .35); }
}

.hv3-sub {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 520px;
    margin: 0 0 36px;
    line-height: 1.65;
}

.hv3-search {
    display: flex;
    gap: 6px;
    background: #fff;
    padding: 6px;
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    max-width: 520px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
}
.hv3-search input {
    flex: 1;
    border: 0;
    padding: 14px 22px;
    font-size: 15px;
    background: transparent;
    font-family: inherit;
    outline: none;
    color: var(--ink);
    min-width: 0;
}
.hv3-search input::placeholder { color: var(--ink-soft); opacity: .6; }
.hv3-search button {
    border: 0;
    background: var(--earth);
    color: #fff;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    transition: background .2s ease;
}
.hv3-search button:hover { background: var(--earth-2); }

.hv3-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.hv3-chip {
    background: #fff;
    border: 1px solid var(--line);
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
    color: var(--ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hv3-chip:hover {
    border-color: var(--earth);
    color: var(--earth);
    transform: translateY(-1px);
}

/* Hero giriş animasyonu — sırayla yukarı kalkar */
.hv3-brand,
.hv3-eyebrow,
.hv3-title,
.hv3-sub,
.hv3-search,
.hv3-chips {
    animation: hv3-rise .9s ease-out backwards;
}
.hv3-brand   { animation-delay: 0s; }
.hv3-eyebrow { animation-delay: .10s; }
.hv3-title   { animation-delay: .20s; }
.hv3-sub     { animation-delay: .35s; }
.hv3-search  { animation-delay: .50s; }
.hv3-chips   { animation-delay: .65s; }
@keyframes hv3-rise {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────── SAĞ: Uçuşan ürün kartları sahnesi ─────────────── */
.hv3-stage {
    position: relative;
    height: 560px;
    perspective: 1000px;
}

/* Ürün kartları — pozisyonları slot bazlı */
.hv3-card {
    position: absolute;
    width: 200px;
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    transition: transform .3s ease, box-shadow .3s ease, z-index 0s;
    z-index: 1;
    transform-origin: center center;
}
.hv3-card:hover {
    z-index: 10;
    transform: translateY(-8px) scale(1.04) !important;
    box-shadow: 0 32px 80px rgba(31,26,20,.18);
    animation: none !important;
}
.hv3-card-media {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--cream-2), var(--butter));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hv3-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hv3-card-fallback {
    font-size: 60px;
    line-height: 1;
}
.hv3-card-body {
    padding: 12px 14px 14px;
}
.hv3-card-cat {
    font-size: 10px;
    color: var(--honey-2);
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.hv3-card-name {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 4px;
    color: var(--ink);
    /* Tek satır — taşma engelle */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hv3-card-price {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--earth);
}
.hv3-card-price small {
    font-size: 11px;
    color: var(--ink-soft);
    font-weight: 500;
    margin-left: 3px;
    font-family: var(--sans);
}

/* ─────────────── Slot pozisyonları + animasyonlar ─────────────── */
/* Slot 1 — sağ üst (büyük rol) */
.hv3-card--s1 {
    top: 20px;
    right: 0;
    width: 240px;
    animation: hv3-float-1 7s ease-in-out infinite;
}
/* Slot 2 — sol alt */
.hv3-card--s2 {
    bottom: 30px;
    left: 0;
    width: 200px;
    animation: hv3-float-2 6s ease-in-out infinite -1.5s;
}
/* Slot 3 — orta sağ */
.hv3-card--s3 {
    top: 40%;
    right: 50%;
    width: 180px;
    animation: hv3-float-3 8s ease-in-out infinite -3s;
}
/* Slot 4 — sağ alt */
.hv3-card--s4 {
    bottom: 70px;
    right: 60px;
    width: 170px;
    animation: hv3-float-4 5.5s ease-in-out infinite -2.5s;
}
/* Slot 5 — sol üst (5. ürün varsa) */
.hv3-card--s5 {
    top: 70px;
    left: 80px;
    width: 160px;
    animation: hv3-float-5 9s ease-in-out infinite -4s;
}

@keyframes hv3-float-1 {
    0%, 100% { transform: translateY(0) translateX(0) rotate(-1deg); }
    33%      { transform: translateY(-16px) translateX(-6px) rotate(-3deg); }
    66%      { transform: translateY(-6px) translateX(8px) rotate(0.5deg); }
}
@keyframes hv3-float-2 {
    0%, 100% { transform: translateY(0) translateX(0) rotate(2deg); }
    50%      { transform: translateY(-18px) translateX(4px) rotate(4deg); }
}
@keyframes hv3-float-3 {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    33%      { transform: translateY(12px) translateX(-10px) rotate(-2deg); }
    66%      { transform: translateY(-10px) translateX(6px) rotate(1deg); }
}
@keyframes hv3-float-4 {
    0%, 100% { transform: translateY(0) translateX(0) rotate(-2deg); }
    50%      { transform: translateY(-14px) translateX(-8px) rotate(-4deg); }
}
@keyframes hv3-float-5 {
    0%, 100% { transform: translateY(0) translateX(0) rotate(3deg); }
    50%      { transform: translateY(20px) translateX(-6px) rotate(5deg); }
}

/* ─────────────── Yapraklar ─────────────── */
.hv3-leaf {
    position: absolute;
    color: var(--earth-soft);
    opacity: .65;
    animation: hv3-leaf-float 8s ease-in-out infinite;
    pointer-events: none;
}
.hv3-leaf svg { width: 28px; height: 28px; }
.hv3-leaf--1 { top: 50px;  left: 50px;  animation-delay: -2s; }
.hv3-leaf--2 { bottom: 80px; left: 220px; animation-delay: -5s; color: var(--earth); }
.hv3-leaf--3 { top: 240px; right: 30px; animation-delay: -3s; opacity: .5; }
@keyframes hv3-leaf-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33%      { transform: translateY(-18px) rotate(15deg); }
    66%      { transform: translateY(-8px) rotate(-10deg); }
}

/* ─────────────── Bal ışıltıları ─────────────── */
.hv3-spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--honey);
    opacity: 0;
    pointer-events: none;
}
.hv3-spark--1 { top: 110px; right: 90px;  animation: hv3-sparkle 3s ease-in-out infinite; }
.hv3-spark--2 { top: 320px; left: 30px;   animation: hv3-sparkle 3s ease-in-out infinite 1s; }
.hv3-spark--3 { bottom: 140px; right: 200px; animation: hv3-sparkle 3s ease-in-out infinite 2s; }
@keyframes hv3-sparkle {
    0%, 100% { transform: scale(0) translateY(0);    opacity: 0; }
    40%      { transform: scale(1) translateY(-22px); opacity: .85; }
    60%      { transform: scale(1.2) translateY(-34px); opacity: .5; }
}

/* ─────────────── Fallback peynir tekerlekleri (ürün yoksa) ─────────────── */
.hv3-wheel {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FFFEFA 0%, var(--cream-2) 35%, var(--butter) 70%, var(--honey-2) 100%);
    box-shadow: var(--shadow-lg), inset -8px -16px 24px rgba(184,138,46,.3), inset 8px 8px 16px rgba(255,255,255,.4);
}
.hv3-wheel::before {
    content: '';
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    border: 1px dashed rgba(184,138,46,.25);
}
.hv3-wheel--lg { width: 280px; height: 280px; top: 20px;    right: 20px;  animation: hv3-float-1 7s ease-in-out infinite; }
.hv3-wheel--md { width: 200px; height: 200px; bottom: 30px; left: 10px;   animation: hv3-float-2 6s ease-in-out infinite -2s; }
.hv3-wheel--sm { width: 140px; height: 140px; bottom: 50px; right: 80px;  animation: hv3-float-4 5s ease-in-out infinite -1s; }

/* ─────────────── Erişilebilirlik: hareket azaltma ─────────────── */
@media (prefers-reduced-motion: reduce) {
    .hv3 *,
    .hv3 *::before,
    .hv3 *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ─────────────── Tablet ─────────────── */
@media (max-width: 1100px) {
    .hv3-inner { gap: 32px; }
    .hv3-stage { height: 480px; }
    .hv3-card--s1 { width: 200px; }
    .hv3-card--s2 { width: 170px; }
    .hv3-card--s3 { width: 150px; }
    .hv3-card--s4 { width: 145px; }
    .hv3-card--s5 { width: 140px; }
}

/* ─────────────── Mobil ─────────────── */
@media (max-width: 768px) {
    .hv3 { padding: 48px 0 32px; min-height: auto; }
    .hv3-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 20px;
    }
    .hv3-title { font-size: clamp(2.4rem, 9vw, 3.6rem); margin-bottom: 16px; }
    .hv3-sub { font-size: 16px; margin-bottom: 24px; }
    .hv3-search { padding: 5px; }
    .hv3-search input { padding: 12px 18px; font-size: 14px; }
    .hv3-search button { padding: 12px 20px; font-size: 13px; }
    .hv3-chips { gap: 6px; }
    .hv3-chip { padding: 8px 14px; font-size: 12px; }

    /* Mobilde sahne daha kompakt — kartlar daha yakın */
    .hv3-stage { height: 340px; }
    .hv3-card { width: 140px !important; border-radius: 18px; }
    .hv3-card-body { padding: 10px 12px 12px; }
    .hv3-card-name { font-size: 13px; }
    .hv3-card-price { font-size: 14px; }
    .hv3-card-cat { font-size: 9px; }

    /* Mobil pozisyon yeniden — sahne içinde dağıt */
    .hv3-card--s1 { top: 10px;    right: 10px;  }
    .hv3-card--s2 { bottom: 10px; left: 10px;   }
    .hv3-card--s3 { top: 45%;     right: 45%;   width: 120px !important; }
    .hv3-card--s4 { bottom: 40px; right: 50px;  width: 120px !important; }
    .hv3-card--s5 { display: none; }

    /* Yaprak ve ışıltıları küçült */
    .hv3-leaf svg { width: 20px; height: 20px; }
    .hv3-leaf--1 { top: 20px;    left: 20px;    }
    .hv3-leaf--2 { bottom: 40px; left: 160px;   }
    .hv3-leaf--3 { top: 180px;   right: 20px;   }

    /* Fallback peynir tekerlekleri küçük */
    .hv3-wheel--lg { width: 200px; height: 200px; }
    .hv3-wheel--md { width: 140px; height: 140px; }
    .hv3-wheel--sm { width: 100px; height: 100px; }
}

/* RTL */
[dir="rtl"] .hv3-inner { direction: rtl; }
[dir="rtl"] .hv3-title { text-align: right; }
