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

:root {
    --primary-color: #18717d; /* Deep Teal */
    --primary-light: rgba(24, 113, 125, 0.1);
    --accent-color: #ff5e1f;  /* Vibrant Orange */
    --text-color: #1e293b;
    --text-muted: #64748b;
    --light-bg: #f8fafc;
    --white: #ffffff;
    
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Premium Shadows (Layers) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-premium: 0 30px 60px -12px rgba(24, 113, 125, 0.15);
    
    --radius-md: 12px;
    --radius-lg: 30px;
    --glass: rgba(255, 255, 255, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header-sticky-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.main-header {
    background: var(--white);
    border-top: 4px solid var(--primary-color);
    border-bottom: 4px solid var(--accent-color);
    padding: 1.5rem 0;
    transition: var(--transition);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Sub Header & Secondary Nav */
.sub-header {
    background: #e4f5f4;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sub-nav-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    list-style: none;
    margin: 0;
}

.sub-nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.sub-nav-links a:hover {
    color: var(--accent-color);
}

/* Top Bar */
.top-bar {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1001;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-bar-info i {
    color: var(--accent-color);
    margin-right: 5px;
}

.top-bar-social {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-bar-auth {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white !important;
}

.top-bar-auth:hover {
    color: var(--accent-color) !important;
    background: transparent;
}

.top-bar-social a:hover {
    color: var(--accent-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Search Bar */
.nav-search {
    flex: 1;
    max-width: 600px;
    margin: 0 50px;
}

.nav-search form {
    display: flex;
    width: 100%;
    border: 1px solid #ddd;
    background: #fff;
}

.nav-search input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
}

.nav-search input:focus {
    outline: none;
}

.nav-search button {
    background: #eeeeee;
    color: #333;
    border: none;
    border-left: 1px solid #ddd;
    padding: 0 25px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-search button:hover {
    background: #e0e0e0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.05rem;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Cart & User Section (Right) */
.nav-meta {
    display: flex;
    align-items: center;
    gap: 30px;
}

.user-login-link {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.user-login-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-color);
    transition: var(--transition);
}

.cart-icon-wrapper {
    position: relative;
    font-size: 2.2rem;
    color: var(--primary-color);
}

.cart-badge {
    position: absolute;
    top: 15px;
    right: -8px;
    background: var(--accent-color);
    color: var(--white);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.cart-total-text {
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    color: #888;
}

.cart-total-text span {
    white-space: nowrap;
}

.main-hero-slider {
    position: relative;
    width: 100%;
    height: 600px !important; /* Yüksekliği kesin kilitle */
    background: #0f172a;
    overflow: hidden !important;
    z-index: 1;
}

.hero-slide-item {
    height: 600px !important; /* Yüksekliği kesin kilitle */
    max-height: 600px !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
}

/* Bulanık Arka Plan Katmanı */
.slide-bg-blur {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.6);
    z-index: 1;
}

.slide-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 40px;
}

/* Orantılı Görsel Kutusu (Büyütüldü - Taşıma Önleyici) */
.slide-image-box {
    flex: 1.3;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0; /* Artık taşma riski yok */
    max-width: 60%;
    position: relative;
    overflow: hidden;
}

.main-slide-img {
    max-width: 100%;
    max-height: 100% !important; /* Slider yüksekliğini (600px) asla aşma */
    object-fit: contain; /* Resmi kesmeden sığdır */
    filter: drop-shadow(0 25px 60px rgba(0,0,0,0.6));
    border-radius: 12px;
}

.main-hero-slider .hero-glass {
    flex: 0.8; /* Yazı alanına daha az alan */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: left;
    max-width: 500px; /* Daha dar yazı kutusu */
}

.main-hero-slider h1 {
    font-size: 2.6rem; /* Yazılar küçültüldü */
    color: white;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.main-hero-slider .swiper-button-next,
.main-hero-slider .swiper-button-prev {
    color: white;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10;
}

.main-hero-slider .swiper-button-next:hover,
.main-hero-slider .swiper-button-prev:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.main-hero-slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: white;
    opacity: 0.3;
}

.main-hero-slider .swiper-pagination-bullet-active {
    background: var(--accent-color);
    opacity: 1;
    width: 35px;
    border-radius: 5px;
}

/* Mobil Uyumluluk */
@media (max-width: 992px) {
    .hero-slide-item {
        height: auto !important; /* Mobilde dikey akışa izin ver */
        min-height: 500px;
        max-height: none !important;
        padding: 60px 0;
    }
    .slide-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .slide-image-box {
        justify-content: center;
        height: 300px;
    }
    .main-hero-slider .hero-glass {
        text-align: center;
        padding: 2.5rem;
        width: 90%;
    }
    .main-hero-slider h1 {
        font-size: 2.5rem;
    }
}

.hero {
    padding: 10rem 0;
    background: linear-gradient(rgba(24, 113, 125, 0.6), rgba(24, 113, 125, 0.6)), url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: var(--white);
}

.hero-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 4rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    display: inline-block;
    max-width: 900px;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    letter-spacing: -2px;
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1.2rem 3rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(24, 113, 125, 0.3);
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(24, 113, 125, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--accent-color);
    box-shadow: 0 10px 20px rgba(255, 94, 31, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 20px 40px rgba(255, 94, 31, 0.4);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-glass:hover {
    background: white;
    color: var(--primary-color);
}

/* Book Grid & Cards (Modern Layered Design) */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    padding: 4rem 0;
}

.book-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.6);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-light);
}

.book-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.book-image {
    width: 100%;
    height: 380px;
    object-fit: cover;
    transition: var(--transition);
}

.book-card:hover .book-image {
    transform: scale(1.1);
}

.book-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.book-favorite-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.book-favorite-btn:hover {
    transform: scale(1.1);
    color: #ef4444;
}

.book-favorite-btn.active {
    color: #ef4444;
    background: white;
}

.book-info {
    padding: 1.7rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-color);
}

.book-author {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.book-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.2rem;
    margin-top: auto; /* Push to the very bottom */
}

.book-price {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.35rem;
    font-family: 'Outfit', sans-serif;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 5rem 0 2rem;
    margin-top: 0;
}

/* Bülten Formu Placeholder Rengi */
.footer-col input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 3rem;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

/* Mobile Adjustments */
/* ==========================================================================
   MOBILE MENU & HAMBURGER STYLES
   ========================================================================== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1002;
    transition: var(--transition);
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: var(--white);
    z-index: 1001;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.mobile-menu.active {
    left: 0;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    text-align: center;
}

.mobile-nav-links li {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.mobile-menu.active .mobile-nav-links li {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for links */
.mobile-nav-links li:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav-links li:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav-links li:nth-child(3) { transition-delay: 0.3s; }
.mobile-nav-links li:nth-child(4) { transition-delay: 0.4s; }
.mobile-nav-links li:nth-child(5) { transition-delay: 0.5s; }
.mobile-nav-links li:nth-child(6) { transition-delay: 0.6s; }
.mobile-nav-links li:nth-child(7) { transition-delay: 0.7s; }

.mobile-nav-links a {
    font-size: 1.8rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    padding: 10px;
}

.mobile-nav-links a:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   MEDIUM SCREENS & TABLETS ( < 1024px )
   ========================================================================== */
@media (max-width: 1024px) {
    .nav-search {
        margin: 0 20px;
    }
    
    .nav-meta {
        gap: 15px;
    }

    .hero-slide-item {
        height: 550px;
    }

    .main-hero-slider h1 {
        font-size: 2.2rem;
    }

    .slide-image-box {
        min-width: 350px;
    }
}

/* ==========================================================================
   MOBILE & SMALL TABLET ( < 992px )
   ========================================================================== */
@media (max-width: 992px) {
    /* Header Changes */
    .sub-header, .top-bar-social, .top-bar-info {
        display: none !important; /* Mobilde iletişim bilgilerini gizle */
    }

    .top-bar-auth-section {
        display: flex !important;
        justify-content: center;
        width: 100%;
        padding: 5px 0;
    }

    .top-bar {
        padding: 2px 0;
    }

    .top-bar .container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .top-bar-promo {
        font-size: 0.7rem;
        padding: 0;
    }

    .nav {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: space-between !important;
        align-items: center;
        padding: 15px 0;
        gap: 10px;
    }

    .logo {
        flex: 0 0 auto;
        display: flex;
        justify-content: flex-start;
        font-size: 1.5rem !important;
        margin: 0;
    }

    .logo img {
        height: 52px !important;
    }

    .nav-right {
        flex: 1;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .nav-meta {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 16px !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        position: static !important;
        transform: none !important;
        margin: 0 0 0 8px !important;
        width: 26px;
        height: 17px;
    }

    .nav-search {
        order: 5;
        margin: 15px 0 0;
        max-width: 100%;
        width: 100%;
    }

    .cart-total-text {
        display: none;
    }

    .cart-icon-wrapper {
        font-size: 1.6rem;
    }

    /* Grid System - 2 columns for mobile */
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 2rem 0;
    }

    .book-image {
        height: 240px;
    }

    .book-info {
        padding: 1rem;
    }

    .book-title {
        font-size: 0.95rem;
    }

    .book-price {
        font-size: 1.1rem;
    }

    .book-badge, .book-favorite-btn {
        top: 10px;
        right: 10px;
        padding: 3px 8px;
        font-size: 0.65rem;
    }
    
    .book-favorite-btn {
        left: 10px;
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-col p {
        text-align: center;
    }

    .footer-col form {
        margin: 0 auto;
    }
}

/* ==========================================================================
   SMALL MOBILE ( < 480px ) - DAR EKRAN FİX
   ========================================================================== */
@media (max-width: 576px) {
    .stat-number {
        font-size: 2.5rem;
    }
}

/* Swiper Slider Equal Height Fix */
.swiper-slide {
    height: auto !important;
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.1rem;
        max-width: 140px;
    }
    
    .logo img {
        height: 35px !important;
    }

    .nav-meta {
        gap: 8px !important;
    }
    
    .user-login-link {
        font-size: 1.3rem !important;
        margin-right: 5px !important;
    }

    .cart-icon-wrapper {
        font-size: 1.4rem !important;
    }

    .mobile-menu-btn {
        width: 24px;
        height: 16px;
    }
}

/* ÇOK KÜÇÜK EKRANLAR ( < 360px ) */
@media (max-width: 360px) {
    .logo {
        max-width: 110px;
    }
    .nav-meta {
        gap: 5px !important;
    }
}

.main-hero-slider h1 {
    font-size: 1.5rem;
}
