/* =========================================================
   Bayer Otomotiv – main.css  (Light Theme)
   Zemin: kırık beyaz/krem  |  Aksan: kırmızı + siyah
   ========================================================= */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f0eb;
    color: #111111;
    overflow-x: hidden;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #ede8e1; }
::-webkit-scrollbar-thumb { background: #8a0000; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6b0000; }

/* ---------- Material Symbols ---------- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Header ---------- */
.site-header {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.site-header.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    background-color: rgba(245, 240, 235, 0.98) !important;
}

/* ---------- Hamburger ---------- */
.hamburger-line {
    display: block;
    background-color: #111111;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}
#mobile-menu-btn.is-open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#mobile-menu-btn.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#mobile-menu-btn.is-open .hamburger-line:nth-child(3) {
    width: 24px;
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu slide */
.mobile-menu {
    transition: max-height 0.35s ease, opacity 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}
.mobile-menu.is-open {
    max-height: 500px;
    opacity: 1;
}

/* ---------- Nav link ---------- */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #8a0000;
    border-radius: 1px;
    transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* ---------- Hero (ana sayfa - koyu zemin) ---------- */
.hero-section {
    background: linear-gradient(135deg, #111111 0%, #1a0a0a 60%, #2a0505 100%);
}
.hero-gradient {
    background: linear-gradient(105deg, rgba(17,17,17,0.95) 40%, rgba(17,17,17,0.6) 70%, transparent 100%);
}

/* ---------- Page hero (iç sayfalar - açık zemin) ---------- */
.page-hero {
    background: linear-gradient(135deg, #ede8e1 0%, #f5f0eb 60%, rgba(138,0,0,0.05) 100%);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* ---------- Section label ---------- */
.section-label {
    display: inline-block;
    color: #8a0000;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* ---------- Cards ---------- */
.product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.news-card-img {
    transition: transform 0.5s ease;
}
.news-card:hover .news-card-img {
    transform: scale(1.06);
}

/* ---------- Product image grid ---------- */
.product-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.product-img-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0.5rem;
    background: #ffffff;
    border: 1px solid #e0d9d2;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-img-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.product-img-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform 0.35s ease;
}
.product-img-item:hover img {
    transform: scale(1.08);
}

/* ---------- Lightbox ---------- */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
#lightbox.active {
    display: flex;
}
#lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6);
    animation: lb-in 0.2s ease;
}
@keyframes lb-in {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* ---------- Tab buttons ---------- */
.tab-btn {
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    color: #555;
}
.tab-btn.active {
    color: #8a0000;
    border-bottom-color: #8a0000;
    background-color: rgba(138, 0, 0, 0.07);
}
.tab-btn:hover:not(.active) {
    color: #111;
    background: rgba(0,0,0,0.04);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Form styles ---------- */
.form-input {
    background: #ffffff;
    border: 1px solid #d4cdc6;
    border-radius: 0.375rem;
    color: #111111;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}
.form-input::placeholder { color: #aaa; }
.form-input:focus {
    outline: none;
    border-color: rgba(138, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(138, 0, 0, 0.1);
    background: #fff;
}
select.form-input option { background: #fff; color: #111; }

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #555;
    margin-bottom: 0.4rem;
}

/* ---------- Buttons ---------- */
.btn-primary {
    background: #8a0000;
    color: #fff;
    font-weight: 700;
    border-radius: 0.375rem;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary:hover {
    background: #6b0000;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(138, 0, 0, 0.3);
}
.btn-outline {
    border: 2px solid #111111;
    color: #111111;
    font-weight: 700;
    border-radius: 0.375rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-outline:hover {
    background: #111111;
    color: #ffffff;
}

/* ---------- Stats ---------- */
.stat-card {
    border: 1px solid #e0d9d2;
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ---------- Footer (koyu - kontrast için) ---------- */
.site-footer {
    background-color: #111111;
    color: #e2e8f0;
    border-top: 3px solid #8a0000;
}

/* ---------- Category grid ---------- */
.category-card {
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.category-card:hover {
    background-color: #8a0000 !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(138,0,0,0.25);
}
.category-card:hover .cat-icon,
.category-card:hover .cat-label {
    color: #fff !important;
}

/* ---------- Alert ---------- */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #15803d; }
.alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #b91c1c; }

/* ---------- Page transition ---------- */
.page-fade {
    animation: pageFadeIn 0.35s ease both;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Ping animation ---------- */
@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}
.animate-ping { animation: ping 1.2s cubic-bezier(0,0,0.2,1) infinite; }

/* ---------- Divider line ---------- */
.divider { border-color: #e0d9d2; }

/* ---------- Shadow card ---------- */
.shadow-card {
    box-shadow: 0 2px 12px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05);
}
