/* ===================================================================
   Sunix Yeni Tema — home.css
   Ana sayfa (index.php): hero slider (Swiper), kategoriler grid, CTA
   Dark/Light mode aware
   =================================================================== */

/* ============ HERO SLIDER (Swiper) ============ */
.home-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 720px;
    max-height: 1100px;
    background: #000;
    overflow: hidden;
    color: var(--c-hero-text);
}
html[data-theme="light"] .home-hero {
    background: var(--g-dark-hero);
}

/* Swiper container */
.home-hero__swiper { width: 100%; height: 100%; }

/* Tek slide */
.th-hero-slide {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Slide inner container */
.th-hero-slide__inner {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad-desktop);
}

/* ========== LIFESTYLE SLIDE ========== */
.th-hero-slide--lifestyle .th-hero-slide__inner {
    display: block;
}

/* Metin — yumuşak radial glow ile okunabilirlik */
.th-hero-slide--lifestyle .home-hero__text {
    position: absolute;
    left: var(--container-pad-desktop);
    top: 50%;
    transform: translateY(-50%);
    max-width: 520px;
    z-index: 5;
    filter: drop-shadow(0 2px 12px rgba(0,0,0,.8)) drop-shadow(0 0 50px rgba(0,0,0,.5));
}
.th-hero-slide--lifestyle .home-hero__text::before {
    content: '';
    position: absolute;
    inset: -50px -70px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,.45) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}
html[data-theme="light"] .th-hero-slide--lifestyle .home-hero__text {
    filter: drop-shadow(0 2px 12px rgba(238,242,252,.95)) drop-shadow(0 0 50px rgba(238,242,252,.8));
}
html[data-theme="light"] .th-hero-slide--lifestyle .home-hero__text::before {
    background: radial-gradient(ellipse at center, rgba(238,242,252,.75) 0%, transparent 70%);
}

/* img_pos=left: metin sağda */
[data-img-pos="left"] .home-hero__text {
    left: auto;
    right: var(--container-pad-desktop);
    text-align: right;
}
[data-img-pos="left"] .home-hero__actions { justify-content: flex-end; }
[data-img-pos="left"] .home-hero__desc {
    border-left: none;
    padding-left: 0;
    border-right: 3px solid var(--c-red);
    padding-right: 18px;
}

/* Kişi görseli — viewport sağ kenarına yapışık, büyük */
.home-hero__hero-img {
    position: absolute;
    right: calc(-1 * (100vw - 100%) / 2);
    bottom: 0;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}
.home-hero__hero-img img {
    display: block;
    height: 88%;
    width: auto;
}

/* img_pos=left: resim solda */
[data-img-pos="left"] .home-hero__hero-img {
    right: auto;
    left: calc(-1 * (100vw - 100%) / 2);
    justify-content: flex-start;
}

/* ========== SLIDE GİRİŞ ANİMASYONLARI ========== */
.th-hero-slide--lifestyle .home-hero__title,
.th-hero-slide--lifestyle .home-hero__desc,
.th-hero-slide--lifestyle .home-hero__actions {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .65s ease, transform .65s ease;
}
.swiper-slide-active .home-hero__title {
    opacity: 1; transform: translateY(0); transition-delay: .15s;
}
.swiper-slide-active .home-hero__desc {
    opacity: 1; transform: translateY(0); transition-delay: .35s;
}
.swiper-slide-active .home-hero__actions {
    opacity: 1; transform: translateY(0); transition-delay: .55s;
}
.th-hero-slide--lifestyle .home-hero__hero-img img {
    transition: transform 1.2s ease;
    transform: scale(1.06);
}
.swiper-slide-active .home-hero__hero-img img {
    transform: scale(1);
}

/* ========== PRODUCT SLIDE ========== */
.th-hero-slide--product .th-hero-slide__inner {
    display: grid;
    grid-template-columns: 0.95fr 1.1fr;
    gap: 50px;
    align-items: center;
}
.home-hero__visual {
    position: relative;
    height: 100%;
    max-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    perspective: 1200px;
}
.home-hero__visual::before {
    content: '';
    position: absolute;
    inset: 6% 10%;
    background:
        radial-gradient(ellipse at 50% 50%, var(--c-hero-visual-glow-1) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 55%, var(--c-hero-visual-glow-2) 0%, transparent 40%);
    filter: blur(48px);
    z-index: 1;
    pointer-events: none;
    animation: homeHeroGlow 8s ease-in-out infinite;
}
.home-hero__visual::after {
    content: '';
    position: absolute;
    inset: 6% 12%;
    border-radius: 20px;
    box-shadow: inset 0 0 60px 20px var(--c-hero-visual-inset), 0 0 80px 30px var(--c-hero-visual-outset);
    z-index: 2;
    pointer-events: none;
}
.home-hero__visual img {
    position: relative;
    z-index: 3;
    max-width: 82%;
    max-height: 92%;
    object-fit: contain;
    border-radius: 20px;
    filter: drop-shadow(0 40px 60px rgba(0,0,0,.55)) drop-shadow(0 10px 24px rgba(227,6,19,.15)) drop-shadow(0 0 80px rgba(25,20,55,.25));
    animation: homeHeroFloat 8s cubic-bezier(.45,.05,.55,.95) infinite;
    will-change: transform;
}
html[data-theme="light"] .home-hero__visual img {
    filter: drop-shadow(0 40px 60px rgba(13,30,58,.18)) drop-shadow(0 10px 24px rgba(227,6,19,.10));
}
@keyframes homeHeroFloat {
    0%   { transform: translateY(0) rotate(-1.8deg) scale(1); }
    25%  { transform: translateY(-10px) rotate(-0.4deg) scale(1.008); }
    50%  { transform: translateY(-22px) rotate(1.8deg) scale(1.015); }
    75%  { transform: translateY(-10px) rotate(0.4deg) scale(1.008); }
    100% { transform: translateY(0) rotate(-1.8deg) scale(1); }
}
@keyframes homeHeroGlow {
    0%, 100% { opacity: .75; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .home-hero__visual img, .home-hero__visual::before { animation: none; }
}

/* ========== METIN STİLLERİ ========== */
.home-hero__title {
    font-size: clamp(44px, 6.2vw, 86px);
    font-weight: 800;
    line-height: .98;
    letter-spacing: -.045em;
    margin-bottom: 22px;
    text-wrap: balance;
    color: var(--c-hero-text);
}
.home-hero__title-gradient {
    background: var(--g-hero-title);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.home-hero__desc {
    font-size: 17px;
    line-height: 1.8;
    color: var(--c-hero-text-soft);
    max-width: 500px;
    margin-bottom: 36px;
    padding-left: 18px;
    border-left: 3px solid var(--c-red);
}
.home-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.home-hero__actions .th-btn--primary {
    background: linear-gradient(135deg, var(--c-red), #a8040e);
    box-shadow: 0 18px 40px -12px rgba(227,6,19,.6);
}
.home-hero__actions .th-btn--primary:hover {
    background: linear-gradient(135deg, #a8040e, var(--c-red));
    box-shadow: 0 22px 44px -12px rgba(227,6,19,.7);
}

/* ========== NAV + DOTS ========== */
.home-hero__controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad-desktop);
    z-index: 20;
    pointer-events: none;
}
.home-hero__controls > * { pointer-events: all; }
.home-hero__nav {
    position: absolute;
    bottom: 48px;
    left: var(--container-pad-desktop);
    display: flex;
    align-items: center;
    gap: 16px;
}
.home-hero__nav button {
    width: 52px; height: 52px;
    background: var(--c-hero-nav-bg);
    border: 1px solid var(--c-hero-nav-border);
    backdrop-filter: blur(10px);
    color: var(--c-hero-text);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--dur) ease;
}
.home-hero__nav button:hover {
    background: var(--c-red);
    border-color: var(--c-red);
    color: var(--c-on-brand);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -8px var(--c-red-glow);
}
.home-hero__pager {
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--c-page-hero-bc-soft);
    letter-spacing: .08em;
}
.home-hero__pager strong { color: var(--c-hero-text); font-size: 17px; font-weight: 700; }
.home-hero__dots {
    position: absolute;
    bottom: 60px;
    right: var(--container-pad-desktop);
    display: flex;
    gap: 8px;
}
.th-hero-dot {
    width: 40px; height: 3px;
    background: var(--c-hero-dot-bg);
    border-radius: 2px;
    cursor: pointer;
    transition: background var(--dur-fast);
    position: relative;
    overflow: hidden;
}
.th-hero-dot:hover { background: var(--c-hero-dot-hover); }
.th-hero-dot.active { background: var(--c-hero-dot-active); }
.th-hero-dot.active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--c-red), #ff2e3e);
    box-shadow: 0 0 10px var(--c-red-glow);
    transform-origin: left;
    animation: heroFillBar 12s linear;
}
@keyframes heroFillBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ========== HERO RESPONSIVE ========== */
@media (max-width: 1024px) {
    .home-hero { height: 100svh; min-height: 600px; max-height: none; }
    .th-hero-slide--product .th-hero-slide__inner { grid-template-columns: 1fr; gap: 28px; }
    .th-hero-slide--lifestyle .home-hero__text { left: var(--container-pad-tablet); max-width: 420px; }
    .home-hero__hero-img img { height: 82%; }
    .home-hero__visual { max-height: 360px; }
    .home-hero__title { font-size: clamp(34px, 5.5vw, 58px); }
}
@media (max-width: 768px) {
    .home-hero { height: 100svh; min-height: 500px; max-height: none; }
    /* Lifestyle mobil: resim üstte alta fade, metin altta iç içe */
    .home-hero__hero-img {
        position: absolute;
        top: 70px; left: 0; right: 0;
        bottom: auto; height: 65%;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }
    .home-hero__hero-img img {
        height: 100%; width: auto;
        max-width: none; max-height: none;
    }
    .home-hero__hero-img::after {
        content: '';
        position: absolute;
        bottom: 0; left: 0; right: 0;
        height: 50%;
        background: linear-gradient(to bottom, transparent, #000);
        z-index: 2;
        pointer-events: none;
    }
    html[data-theme="light"] .home-hero__hero-img::after {
        background: linear-gradient(to bottom, transparent 20%, #eef2fc);
    }
    [data-img-pos="left"] .home-hero__hero-img { left: 0; right: 0; justify-content: center; }
    .th-hero-slide--lifestyle .home-hero__text {
        left: 20px; right: 20px; top: auto; bottom: 80px;
        transform: none; max-width: none;
    }
    .th-hero-slide--lifestyle .home-hero__text::before { inset: -30px -40px; }
    [data-img-pos="left"] .home-hero__text { text-align: left; }
    /* Product */
    .th-hero-slide--product .th-hero-slide__inner { padding: 90px 20px 100px; gap: 20px; }
    .home-hero__visual { max-height: 260px; }
    /* Metin */
    .home-hero__title { font-size: clamp(30px, 7.5vw, 40px); line-height: 1.06; }
    .home-hero__desc { font-size: 16px; margin-bottom: 24px; max-width: none; }
    .home-hero__actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .home-hero__actions .th-btn { width: 100%; justify-content: center; }
    /* Nav/dots */
    .home-hero__nav { left: 20px; bottom: 20px; gap: 10px; }
    .home-hero__nav button { width: 40px; height: 40px; }
    .home-hero__pager { font-size: 12px; }
    .home-hero__dots { right: 20px; bottom: 28px; gap: 6px; }
    .th-hero-dot { width: 28px; height: 2px; }
}
@media (max-width: 480px) {
    .th-hero-slide--product .th-hero-slide__inner { padding: 80px 14px 90px; }
    .th-hero-slide--lifestyle .home-hero__text { left: 12px; right: 12px; bottom: 70px; padding: 20px; }
    .home-hero__visual { max-height: 220px; }
    .home-hero__title { font-size: 28px; letter-spacing: -.035em; }
    .home-hero__nav { bottom: 16px; left: 14px; }
    .home-hero__nav button { width: 36px; height: 36px; }
    .home-hero__dots { right: 14px; bottom: 22px; }
    .th-hero-dot { width: 22px; }
    @keyframes homeHeroFloat {
        0%, 100% { transform: translateY(0) scale(1); }
        50%      { transform: translateY(-12px) scale(1.01); }
    }
}

/* ============ ÜRÜNLERİ KEŞFET ============ */
.home-cats {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
}
.home-cats__row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    color: var(--c-text);
    background: var(--c-surface);
    border-radius: var(--radius-md);
    transition: background var(--dur-fast), box-shadow var(--dur-fast);
}
.home-cats__row:hover {
    background: var(--c-surface-2);
    box-shadow: var(--shadow-card);
}
.home-cats__img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: var(--c-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.home-cats__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    transition: transform var(--dur) var(--easing);
}
.home-cats__row:hover .home-cats__img img { transform: scale(1.12); }
.home-cats__info {
    flex: 1;
    min-width: 0;
}
.home-cats__name {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.02em;
    margin-bottom: 3px;
}
.home-cats__count {
    font-size: 13px;
    color: var(--c-muted);
}
.home-cats__go {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--c-bg);
    color: var(--c-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: all var(--dur-fast);
}
.home-cats__row:hover .home-cats__go {
    background: var(--c-red);
    color: #ffffff;
    transform: translateX(3px);
}

/* Yeni Ürünler */
.home-cats__row--new .home-cats__img {
    background: var(--c-red);
    color: #ffffff;
    font-size: 22px;
}
.home-cats__row--new .home-cats__name {
    color: var(--c-red);
    font-weight: 800;
}

/* ============ BAYİLİK CTA BANDI ============
   NOT: CTA bandı her iki modda da navy (marka vurgu alanı). Text beyaz kalır. */
.home-cta {
    position: relative;
    padding: clamp(70px, 9vw, 120px) 0;
    color: var(--c-on-brand);
    overflow: hidden;
    background: var(--c-navy);
}
.home-cta__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 0%, rgba(25, 20, 55, 0.6) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 100%, rgba(227, 6, 19, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(18, 16, 40, 0.3) 0%, transparent 65%),
        linear-gradient(145deg, #07070b 0%, #0b0a12 40%, #0f0e16 70%, #12111a 100%);
    z-index: 0;
}
.home-cta__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse at 50% 100%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 100%, black 0%, transparent 70%);
}
.home-cta__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 60px;
    align-items: center;
}
.home-cta .th-h2 { color: var(--c-on-brand); }
.home-cta .th-lead { color: rgba(255, 255, 255, 0.78); }
.home-cta .th-eyebrow { color: rgba(255, 255, 255, 0.75); }
.home-cta__text .th-eyebrow { margin-bottom: 18px; }
.home-cta__text .th-h2 { margin-bottom: 18px; }
/* Bayilik CTA zemini her temada koyu — "Bayi Girişi" ghost butonu beyaz/okunur kalsın
   (light temada --c-hero-text koyuya döndüğü için metin koyu zeminde kayboluyordu) */
.home-cta .th-btn--ghost-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}
.home-cta .th-btn--ghost-light:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
    color: #fff;
}
.home-cta__actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-self: end;
}

/* ============ RESPONSIVE (non-hero) ============ */
@media (max-width: 1024px) {
    .home-cta__inner { grid-template-columns: 1fr; gap: 32px; }
    .home-cta__actions { justify-self: start; flex-direction: row; }
}
@media (max-width: 768px) {
    .home-cats { grid-template-columns: 1fr !important; gap: 10px; }
    .home-cats__row { padding: 16px; gap: 16px; }
    .home-cats__img { width: 56px; height: 56px; border-radius: 12px; }
    .home-cats__name { font-size: 15px; }
    .home-cats__go { width: 32px; height: 32px; }
    .home-cta__actions { flex-direction: column; align-items: stretch; }
}
