﻿/* Page Header */
.page-header {
    background: linear-gradient(rgba(20, 20, 35, 0.8), rgba(188, 24, 24, 0.8)), url('photos/hero-bg.jpg') center/cover;
    padding: 100px 0 60px;
    margin-top: 0;
    margin-bottom: 60px;
}

.page-header-content {
    background: white;
    padding: 3rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.page-header h1 {
    color: #141423;
    font-size: 2.5rem;
    text-transform: uppercase;
    margin: 0;
}

/* Products Section */
.products-section {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.7);
    min-height: 70vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==================== PRODUCT NAVIGATION BAR ==================== */
.product-navigation {
    background: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 12px rgba(20, 20, 35, 0.1);
    position: sticky;
    top: 86px;
    z-index: 99;
    border-bottom: 3px solid rgba(188, 24, 24, 0.25);
    width: 100%;
    margin-bottom: 3rem;
}

.nav-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    list-style: none;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.4s ease;
    opacity: 1;
}

/* Nav Button */
.nav-button {
    background: rgba(248, 249, 250, 0.8);
    padding: 1rem 0.75rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 0.9rem;
    color: #141423;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 95px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

    .nav-button:hover {
        background: linear-gradient(135deg, #bc1818, #8b1313);
        color: white;
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(188, 24, 24, 0.25);
        text-decoration: none;
        border-color: transparent;
    }

/* Icon/Image Wrapper */
.nav-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.3s ease;
}

.nav-button:hover .nav-icon-wrapper {
    transform: scale(1.15);
}

/* Image styling */
.nav-icon-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    transition: all 0.3s ease;
}

.nav-button:hover .nav-icon-image {
    filter: brightness(0) invert(1);
}

/* FontAwesome icon styling */
.nav-icon-font {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: all 0.3s ease;
}

/* Fallback icon styling */
.nav-icon-fallback {
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
}

/* Nav button text */
.nav-button span {
    font-weight: 500;
    color: inherit;
    text-decoration: none;
    text-overflow: ellipsis;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
    line-height: 1.3;
    max-height: 2.6em;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    background: linear-gradient(135deg, #bc1818, #8b1313);
    color: white;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(188, 24, 24, 0.3);
}

    .nav-toggle:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(188, 24, 24, 0.4);
    }

    .nav-toggle i {
        margin-left: 0.5rem;
        transition: transform 0.3s ease;
    }

    .nav-toggle.active i {
        transform: rotate(180deg);
    }

/* ==================== LOADING ==================== */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    text-align: center;
}

    .loading-spinner i {
        font-size: 3rem;
        color: #bc1818;
    }

    .loading-spinner p {
        margin-top: 1rem;
        font-size: 1.1rem;
        font-weight: 500;
        color: rgba(20, 20, 35, 0.7);
    }

/* ==================== PRODUCT CARDS ==================== */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.product-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 35px rgba(20, 20, 35, 0.1);
    transition: all 0.4s ease;
    display: grid;
    grid-template-columns: 380px 1fr;
    min-height: 280px;
    scroll-margin-top: 250px;
    animation: fadeInUp 0.5s ease backwards;
}

    .product-card:hover {
        box-shadow: 0 15px 50px rgba(20, 20, 35, 0.15);
        transform: translateX(5px);
    }

    .product-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .product-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .product-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .product-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .product-card:nth-child(5) {
        animation-delay: 0.5s;
    }

    .product-card:nth-child(6) {
        animation-delay: 0.6s;
    }

.product-image {
    position: relative;
    height: 100%;
    min-height: 280px;
    overflow: hidden;
    background: #f8f9fa;
}

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: transform 0.4s ease;
        padding: 1.5rem;
    }

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(188, 24, 24, 0.92), rgba(20, 20, 35, 0.92));
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-title {
    font-size: 1.75rem;
    color: #141423;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.product-description {
    color: rgba(20, 20, 35, 0.7);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn-detail {
    flex: 0 0 auto;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #bc1818, #8b1313);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(188, 24, 24, 0.25);
}

    .btn-detail:hover {
        background: linear-gradient(135deg, #8b1313, #6b0f0f);
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(188, 24, 24, 0.35);
        color: white;
        text-decoration: none;
    }

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

    .empty-state i {
        font-size: 4rem;
        margin-bottom: 1rem;
        opacity: 0.3;
    }

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 968px) {
    .page-header {
        margin-top: 0;
        padding: 80px 0 50px;
    }

    .product-navigation {
        top: 70px;
    }

    .nav-grid-layout {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }

    .nav-button {
        padding: 0.9rem 0.65rem;
        font-size: 0.85rem;
        min-height: 90px;
    }

    .nav-icon-wrapper {
        width: 30px;
        height: 30px;
    }

    .nav-icon-font,
    .nav-icon-fallback {
        font-size: 1.4rem;
    }

    .product-card {
        grid-template-columns: 320px 1fr;
        scroll-margin-top: 200px;
    }

    .product-image {
        min-height: 260px;
    }

    .product-content {
        padding: 2rem;
    }

    .product-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        margin-top: 0;
        padding: 60px 0 40px;
    }

    .product-navigation {
        top: 70px;
        padding: 1rem 0;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header-content {
        padding: 2rem 1.5rem;
    }

    .nav-toggle {
        display: block;
    }

    /* Mobilde varsayılan KAPALI */
    .nav-grid-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0 1rem;
        max-height: 0;
        opacity: 0;
        margin-top: 0 !important;
    }

        /* Tıklanınca açılır */
        .nav-grid-layout.open {
            max-height: 2000px;
            opacity: 1;
            margin-top: 1rem !important;
        }

    .nav-button {
        padding: 0.85rem 0.55rem;
        font-size: 0.8rem;
        min-height: 85px;
        gap: 0.5rem;
    }

    .nav-icon-wrapper {
        width: 28px;
        height: 28px;
    }

    .nav-icon-font,
    .nav-icon-fallback {
        font-size: 1.3rem;
    }

    .product-card {
        grid-template-columns: 1fr;
        scroll-margin-top: 180px;
    }

    .product-image {
        min-height: 240px;
        max-height: 240px;
    }

    .product-content {
        padding: 1.75rem;
    }

    .product-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .product-description {
        font-size: 1rem;
        margin-bottom: 1.75rem;
    }

    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        margin-top: 0;
        padding: 40px 0 30px;
    }

    .product-navigation {
        top: 58px;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .page-header-content {
        padding: 1.5rem 1rem;
    }

    .nav-toggle {
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
    }

    /* Mobilde varsayılan KAPALI */
    .nav-grid-layout {
        padding: 0 0.75rem;
        gap: 0.6rem;
        max-height: 0;
        opacity: 0;
        margin-top: 0 !important;
    }

        /* Tıklanınca açılır */
        .nav-grid-layout.open {
            max-height: 2000px;
            opacity: 1;
            margin-top: 0.875rem !important;
        }

    .nav-button {
        padding: 0.75rem 0.45rem;
        font-size: 0.75rem;
        min-height: 80px;
        border-radius: 8px;
        gap: 0.4rem;
    }

    .nav-icon-wrapper {
        width: 24px;
        height: 24px;
    }

    .nav-icon-font,
    .nav-icon-fallback {
        font-size: 1.15rem;
    }

    .product-image {
        min-height: 220px;
        max-height: 220px;
    }

    .product-content {
        padding: 1.5rem;
    }

    .product-title {
        font-size: 1.3rem;
    }

    .product-description {
        font-size: 0.95rem;
    }

    .btn-detail {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .products-section {
        padding: 40px 0;
    }

    .products-list {
        gap: 2rem;
    }
}

@media (max-width: 360px) {
    .nav-button {
        min-height: 75px;
        padding: 0.65rem 0.35rem;
    }

    .nav-icon-wrapper {
        width: 22px;
        height: 22px;
    }

    .nav-icon-font,
    .nav-icon-fallback {
        font-size: 1.05rem;
    }

    .product-content {
        padding: 1.25rem;
    }

    .product-title {
        font-size: 1.2rem;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .nav-icon-image {
        filter: brightness(0.9);
    }

    .nav-button:hover .nav-icon-image {
        filter: brightness(0) invert(1);
    }
}
