/* Products page specific styles */
:root {
    --primary-color: #791111;
    --secondary-color: #f8f9fa;
    --accent-color: #770a0a;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Main container for all content */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Section Title */
.section-title {
    color: var(--primary-color);
    text-align: center;
    margin: 2rem 0;
    font-weight: 700;
    position: relative;
    padding-bottom: 12px;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--primary-color);
}

/* Products Container replaced by Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0 50px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
}

/* Page Header (from yedek-parca) */
.page-header {
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

/* Search and Filter Container */
.search-filter-container {
    max-width: 900px;
    margin: -80px auto 40px; /* Pulls it up into the header bottom */
    background: var(--glass-bg, rgba(255, 255, 255, 0.95));
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.search-box {
    position: relative;
    margin-bottom: 25px;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 15px 15px 15px 55px;
    border: 2px solid #eee;
    border-radius: 50px;
    outline: none;
    transition: 0.3s;
    font-size: 16px;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(121, 17, 17, 0.1);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 25px;
    border: none;
    background: white;
    border-radius: 50px;
    color: #666;
    font-weight: 500;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(121, 17, 17, 0.2);
}

.tab-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Product Card (Grid Based to match yedek-parca.html aesthetic) */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%; /* Fill grid tracks */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 0;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Product Image */
.product-image {
    width: 100%;
    height: 220px;
    padding: 20px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid #f9f9f9;
}

.product-image img {
    transition: transform 0.5s ease;
    max-height: 90%;
    max-width: 90%;
    object-fit: contain;
    margin: 0 auto;
}

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

.video-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    background-color: var(--primary-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-icon:hover {
    background-color: #5e0e0e;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.video-icon i {
    font-size: 1.5rem;
}

/* Card Body */
.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 10px 0;
    line-height: 1.4;
    text-align: center;
    border-bottom: none;
}

.product-description {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    font-size: 0.9rem;
    color: #666;
    overflow-y: visible; /* Adjust as needed */
}

.product-description ul {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
    flex-grow: 1;
    margin-bottom: 0;
}

.product-description li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.5;
    color: #444;
    text-align: start;
}

.product-description p {
    margin-top: 10px;
    color: #444;
    line-height: 1.6;
    text-align: start;
}

.product-description li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Product Buttons */
.product-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f9f9f9;
}

.product-btn {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: none;
    border: 1px solid transparent;
}

.youtube-btn,
.watch-video-btn {
    background-color: #ff0000;
    color: white;
}

.watch-video-btn:hover {
    background-color: #cc0000;
    color: white;
    transform: translateY(-3px);
}

.pdf-btn,
.view-pdf-btn {
    background-color: #4285F4;
    color: white;
}

.view-pdf-btn:hover {
    background-color: #3367d6;
    color: white;
    transform: translateY(-3px);
}

.whatsapp-btn {
    background-color: #25d366;
    color: white;
}

.whatsapp-btn:hover {
    background-color: #128c7e;
    color: white;
    transform: translateY(-3px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header {
        padding: 40px 0;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 10px;
    }
    
    .search-filter-container {
        margin-top: -30px;
        padding: 20px 15px;
        border-radius: 12px;
    }

    .tab-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

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

    .product-image {
        height: 200px;
    }
}