/* ====================
   General Styles
   ==================== */

:root {
    --primary-color: #B91C1C;
    /* Deep Corporate Red */
    --secondary-color: #1F2937;
    /* Dark Slate/Charcoal */
    --accent-color: #991B1B;
    /* Darker Red for hovers */
    --success-color: #059669;
    --danger-color: #DC2626;
    --warning-color: #D97706;
    --info-color: #0284C7;
    --light-color: #F3F4F6;
    /* Light Gray Background */
    --dark-color: #111827;
    --text-color: #374151;
    /* Gray-700 */
    --border-color: #E5E7EB;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-weight: 700;
}

/* ====================
   Navigation
   ==================== */

.navbar {
    padding: 0.25rem 0 !important;
}

.navbar-brand {
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1;
}

.navbar-brand img {
    max-height: 250px;
    width: auto;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* ====================
   Hero Section
   ==================== */

.hero-section {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    /* min-height: 500px; */
    /* Removed fixed height/bg to strictly follow slider height */
    position: relative;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
}

.hero-section img {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.card {
    border: none;
    border-radius: 0.75rem;
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.card-img-top {
    height: 250px;
    object-fit: cover;
}

.hover-shadow {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-3px);
}

/* ====================
   Buttons
   ==================== */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    /* Slightly more square */
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.2s ease;
    letter-spacing: 0.025em;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(185, 28, 28, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(185, 28, 28, 0.3);
}

/* ====================
   Sections
   ==================== */

section {
    padding: 4rem 0;
}

section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

/* ====================
   Footer
   ==================== */

footer {
    background-color: var(--dark-color);
}

footer h5,
footer h6 {
    color: #fff;
    margin-bottom: 1rem;
}

footer a {
    color: #adb5bd;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
    text-decoration: none;
}

footer .social-links a {
    display: inline-block;
    margin-right: 1rem;
    transition: transform 0.3s ease;
}

footer .social-links a:hover {
    transform: scale(1.1);
}

/* ====================
   Breadcrumb
   ==================== */

.breadcrumb {
    background-color: var(--light-color);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--secondary-color);
}

/* ====================
   Product Grid
   ==================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    position: relative;
}

.product-card .card-img-top {
    object-fit: contain !important;
    padding: 1rem;
    background-color: #fff;
    height: 250px !important;
    /* Ensure height persists */
    width: 100%;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--danger-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ====================
   Image Gallery
   ==================== */

.product-gallery {
    position: relative;
}

.product-gallery img {
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-gallery img:hover {
    transform: scale(1.05);
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.25rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.gallery-thumbnails img:hover,
.gallery-thumbnails img.active {
    opacity: 1;
}

/* ====================
   Pagination
   ==================== */

.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ====================
   Loading Animation
   ==================== */

.loading {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ====================
   Responsive
   ==================== */

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .card-img-top {
        height: 200px;
    }
}

/* ====================
   Utilities
   ==================== */

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.text-justify {
    text-align: justify;
}

/* SEO image optimization */
/* ====================
   New Homepage Layout
   ==================== */

/* Category Sidebar */
.category-sidebar .list-group-header {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-radius: 6px 6px 0 0;
}

.category-sidebar .list-group {
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

.category-sidebar .list-group-item {
    border: none;
    border-bottom: 1px solid #edf2f7;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: all 0.2s ease;
    background-color: white;
}

.category-sidebar .list-group-item:last-child {
    border-bottom: none;
}

.category-sidebar .list-group-item:hover {
    background-color: #f8fafc;
    color: var(--primary-color);
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary-color);
}

/* Feature Boxes (Center Top) */
.feature-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    background-color: white;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.feature-box a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
}

.feature-box i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.feature-box:hover i {
    color: var(--primary-color);
}

/* Detailed Content Area */
.content-area h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.content-area p {
    color: #6c757d;
    text-align: justify;
}

/* Announcement Sidebar (Right) */
.announcement-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.announcement-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #adb5bd;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed #dee2e6;
    padding-bottom: 0.5rem;
}

.announcement-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #e9ecef;
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-item a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.2s ease;
}

.announcement-item a:hover {
    color: var(--dark-color);
    text-decoration: underline;
}

/* Markalar / Search Box (Left Top) */
.sidebar-box {
    background-color: #e9ecef;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
}

.sidebar-box h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.sidebar-box small {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
}