@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- PREMIUM TEMA RENK DEĞİŞKENLERİ --- */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #0f172a;
    --secondary-hover: #1e293b;
    --accent: #f59e0b;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --font-family: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- TEMEL AYARLAR --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
    outline: none;
}

/* --- HEADER VE NAVİGASYON --- */
.header-wrapper {
    background-color: var(--secondary);
    color: #ffffff;
    position: relative;
    z-index: 1001;
}

.top-bar {
    background-color: #020617;
    font-size: 0.75rem;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo-area {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-area span {
    color: var(--accent);
}

.search-bar-form {
    flex: 0 1 500px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1.25rem;
    padding-right: 3rem;
    border: none;
    border-radius: var(--radius-lg);
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.875rem;
    transition: var(--transition);
}

.search-input:focus {
    background-color: #ffffff;
    color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4);
}

.search-button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-input:focus+.search-button {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.action-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.action-item i {
    font-size: 1.35rem;
    transition: var(--transition);
}

.action-item:hover i {
    color: var(--accent);
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    top: -6px;
    right: 2px;
    background-color: var(--accent);
    color: var(--secondary);
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-auth-login {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-auth-login:hover {
    background-color: #ffffff;
    color: var(--secondary);
}

.btn-auth-reg {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    background-color: var(--primary);
}

.btn-auth-reg:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* --- KATEGORİ MENÜSÜ --- */
.category-nav-bar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.category-menu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.category-main-list {
    display: flex;
    align-items: center;
}

.category-item {
    position: relative;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 2px solid transparent;
}

.category-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Alt Kategori Açılır Menüsü (Dropdown) */
.sub-category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 999;
}

.category-item:hover .sub-category-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-category-dropdown li a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
}

.sub-category-dropdown li:last-child a {
    border-bottom: none;
}

.sub-category-dropdown li a:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    padding-left: 1.5rem;
}

/* --- FLASH MESAJ KUTULARI --- */
.flash-container {
    max-width: 1400px;
    margin: 1rem auto 0;
    padding: 0 2rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.4s ease;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* --- ANA KONTEYNER VE FOOTER --- */
.main-wrapper {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 400px);
}

.main-footer {
    background-color: var(--secondary);
    color: #94a3b8;
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-col p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 0.25rem;
}

.footer-bottom {
    max-width: 1400px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

/* --- DİNAMİK SLIDER ALANI --- */
.hero-slider-section {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 480px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
}

.slider-container {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 50%, rgba(15, 23, 42, 0.1) 100%);
    z-index: 2;
}

.slide-content {
    position: relative;
    z-index: 3;
    color: #ffffff;
    max-width: 600px;
    padding: 0 4rem;
}

.slide-content h2 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s var(--transition);
}

.slide-content p {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    font-weight: 300;
}

.btn-slider {
    display: inline-block;
    padding: 0.875rem 2rem;
    background-color: var(--primary);
    color: #ffffff;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-slider:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.75rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: #ffffff;
    transform: scale(1.3);
    width: 25px;
    border-radius: 5px;
}

/* --- KATEGORİ GRID ALANI --- */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title span {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.category-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.category-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.category-card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* --- ÜRÜN KARTLARI VE GRID YAPISI --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-card-img-area {
    position: relative;
    padding-top: 100%;
    /* Square aspect-ratio */
    background-color: #f1f5f9;
    overflow: hidden;
}

.product-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-img {
    transform: scale(1.08);
}

.badge-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.badge-tag-discount {
    background-color: var(--danger);
    color: #ffffff;
}

.badge-tag-free {
    background-color: var(--success);
    color: #ffffff;
}

.fav-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.fav-btn:hover {
    color: var(--danger);
    transform: scale(1.1);
}

.fav-btn.active {
    color: var(--danger);
}

.product-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-cat {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.product-rating span {
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price-block {
    display: flex;
    flex-direction: column;
}

.price-old {
    font-size: 0.8rem;
    text-decoration: line-through;
    color: var(--text-muted);
}

.price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.price-vat-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.add-to-cart-btn {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* --- PROMOSYON BANNER ALANLARI --- */
.promo-banners-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.promo-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 280px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
}

.promo-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.promo-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.85) 0%, rgba(15, 23, 42, 0.7) 100%);
    z-index: 2;
}

.promo-banner-content {
    position: relative;
    z-index: 3;
    padding: 3rem;
    color: #ffffff;
    max-width: 700px;
}

.promo-banner-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.promo-banner-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.btn-promo {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: #ffffff;
    color: var(--primary);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
}

.btn-promo:hover {
    background-color: var(--accent);
    color: var(--secondary);
    transform: translateY(-2px);
}

/* --- DİNAMİK SEKMELİ KATEGORİ GRUPLARI --- */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: block;
}

/* --- ANİMASYONLAR --- */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- RESPONSIVE TASARIM --- */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .search-bar-form {
        width: 100%;
        flex: 1 1 auto;
    }

    .category-menu-container {
        padding: 0 1rem;
        overflow-x: auto;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .promo-banners-container {
        grid-template-columns: 1fr;
    }

    .hero-slider-section {
        height: 320px;
    }

    .slide-content h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================ */
/* YAN YANA DUAL BANNER                                         */
/* ============================================================ */
.dual-banner-section {
    margin-bottom: 4rem;
}

.dual-banner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dual-banner-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 7;
    background: var(--secondary);
}

.dual-banner-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.dual-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.dual-banner-item:hover .dual-banner-img {
    transform: scale(1.07);
}

.dual-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(7, 10, 22, 0.82) 0%,
            rgba(7, 10, 22, 0.35) 55%,
            transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem 1.75rem;
    transition: background 0.35s ease;
}

.dual-banner-item:hover .dual-banner-overlay {
    background: linear-gradient(to top,
            rgba(7, 10, 22, 0.92) 0%,
            rgba(7, 10, 22, 0.5) 60%,
            transparent 100%);
}

.dual-banner-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.35rem;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transform: translateY(4px);
    transition: transform 0.35s ease;
}

.dual-banner-item:hover .dual-banner-title {
    transform: translateY(0);
}

.dual-banner-sub {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 0.9rem;
    font-weight: 400;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.dual-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.45rem 1.1rem;
    border-radius: 2rem;
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    width: fit-content;
}

.dual-banner-item:hover .dual-banner-cta {
    opacity: 1;
    transform: translateY(0);
}

.dual-banner-cta:hover {
    background: var(--primary-hover);
}

@media (max-width: 768px) {
    .dual-banner-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1rem;
    }

    .dual-banner-item {
        aspect-ratio: 16 / 7;
    }

    .dual-banner-title {
        font-size: 1.1rem;
    }
}