/* ====================
   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 p {
    font-size: 0.8rem;
    color: #6c757d;
}

/* ====================
   DataTables & Technical Tables Custom Styles
   ==================== */

/* ====================
   DataTables & Technical Tables Custom Styles
   ==================== */

.table-container {
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
    margin-bottom: 2rem;
    border: 1px solid #cbd5e1;
    width: 100%;
}

.post-content .table-responsive {
    margin: 1.5rem 0;
}

table.datatable {
    border-collapse: collapse !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
    font-size: 0.9rem;
    border: 1px solid #cbd5e1 !important;
}

table.datatable thead th,
.table-dark th {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%) !important;
    color: #ffffff !important;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.825rem;
    letter-spacing: 0.5px;
    padding: 12px 14px !important;
    border-bottom: 3px solid #0284C7 !important;
    border-top: none !important;
    border-left: 1px solid #334155 !important;
    border-right: 1px solid #334155 !important;
    vertical-align: middle;
}

table.datatable tbody td {
    padding: 10px 14px !important;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0 !important;
    border-right: 1px solid #f1f5f9 !important;
    color: #1e293b;
}

table.datatable.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8fafc;
}

table.datatable tbody tr:hover {
    background-color: #f1f5f9 !important;
}

.dataTables_wrapper {
    font-size: 0.9rem;
    color: #475569;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    margin-left: 8px;
    outline: none;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #0284C7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.page-item.active .page-link {
    background-color: #0F172A !important;
    border-color: #0F172A !important;
}

.page-link {
    color: #0F172A;
    border-radius: 6px;
    margin: 0 2px;
}

.dataTables_info {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 12px;
}

/* DataTables Enhancements */
.column-filter {
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px;
    width: 100%;
    margin-top: 5px;
    background: #ffffff;
    color: #1e293b;
}

.column-filter:focus {
    background: #ffffff;
    border-color: #0284C7 !important;
    outline: none;
}

.filters th {
    padding: 6px 10px !important;
    background: #ffffff !important;
    border-top: 1px solid #d0e3f4 !important;
    border-bottom: 1px solid #d0e3f4 !important;
}

/* Fixed Column Styling */
.DTFC_LeftBodyLiner {
    overflow-x: hidden !important;
}

.DTFC_LeftWrapper, 
.DTFC_LeftBodyWrapper,
.DTFC_LeftHeadWrapper {
    box-shadow: 5px 0 10px rgba(0,0,0,0.05);
    z-index: 10;
    background: #fff !important;
}

table.dataTable thead tr.filters th input::placeholder {
    color: #94a3b8;
    font-weight: normal;
    font-style: italic;
}

/* Adjust table responsive wrapper for mobile sticky headers/columns */
.dataTables_scroll {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
}

/* ==========================================
   Header Advanced Search & Autocomplete (Compact & Sleek)
   ========================================== */

.header-search-nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-wrapper {
    position: relative;
    width: 190px;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-search-wrapper:focus-within {
    width: 240px;
}

.header-search-form {
    margin: 0;
    width: 100%;
}

.search-input-group {
    height: 34px;
    border: 1px solid #D1D5DB;
    border-radius: 50px !important;
    background-color: #F9FAFB;
    padding: 2px 4px 2px 2px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.search-input-group:focus-within {
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 2.5px rgba(185, 28, 28, 0.12);
}

.search-icon-addon {
    background: transparent !important;
    border: none !important;
    padding: 0 4px 0 10px !important;
    color: #9CA3AF;
    font-size: 11.5px;
    display: flex;
    align-items: center;
}

.search-input-group:focus-within .search-icon-addon {
    color: var(--primary-color);
}

.search-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 12.5px !important;
    padding: 0 4px !important;
    height: 28px !important;
    color: #1F2937 !important;
    font-weight: 500;
}

.search-input:focus,
.search-input:focus-visible,
.search-input:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.search-input::placeholder {
    color: #9CA3AF;
    font-size: 12px;
    font-weight: 400;
}

.search-clear-btn {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #9CA3AF !important;
    padding: 0 5px !important;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease;
}

.search-clear-btn:hover {
    color: var(--primary-color) !important;
}

.search-submit-btn {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    padding: 0 !important;
    font-size: 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease !important;
}

.search-submit-btn:hover {
    background-color: var(--accent-color) !important;
    transform: scale(1.08);
}

/* Dropdown Results Box */
.search-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-width: 92vw;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.14), 0 8px 12px -5px rgba(0, 0, 0, 0.04);
    z-index: 1060;
    overflow: hidden;
    animation: searchDropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.search-dropdown-header {
    padding: 8px 14px;
    background: #F9FAFB;
    border-bottom: 1px solid #F3F4F6;
}

.search-header-title {
    font-size: 11px;
    font-weight: 700;
    color: #4B5563;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.search-count-badge {
    font-size: 10.5px;
    background: #E5E7EB;
    color: #374151;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 15px;
}

.search-results-list {
    max-height: 360px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Slim scrollbar for results list */
.search-results-list::-webkit-scrollbar {
    width: 4px;
}
.search-results-list::-webkit-scrollbar-track {
    background: #F9FAFB;
}
.search-results-list::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}
.search-results-list::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none !important;
    color: inherit !important;
    border-bottom: 1px solid #F3F4F6;
    transition: all 0.15s ease;
    gap: 10px;
    border-left: 3px solid transparent;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background-color: #FEF2F2;
    border-left-color: var(--primary-color);
    padding-left: 11px;
}

.search-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.search-item-content {
    min-width: 0;
}

.search-item-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 1px;
    line-height: 1.25;
}

.search-result-item:hover .search-item-title,
.search-result-item.active .search-item-title {
    color: var(--primary-color);
}

.search-item-category {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
    max-width: 140px;
}

.search-match-tag {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.search-item-snippet {
    font-size: 11px;
    color: #6B7280;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-highlight {
    background: #FEF08A;
    color: #854D0E;
    font-weight: 700;
    padding: 0 2px;
    border-radius: 2px;
}

.search-arrow-icon {
    font-size: 11px;
    color: #9CA3AF;
    transition: transform 0.2s ease, color 0.2s ease;
}

.search-result-item:hover .search-arrow-icon,
.search-result-item.active .search-arrow-icon {
    transform: translateX(2px);
    color: var(--primary-color);
}

.search-dropdown-footer {
    padding: 8px 12px;
    background: #F9FAFB;
    border-top: 1px solid #F3F4F6;
}

.search-view-all-btn {
    font-weight: 600;
    border-radius: 50px !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    padding: 5px 12px !important;
    font-size: 11.5px !important;
    transition: all 0.2s ease !important;
}

.search-view-all-btn:hover {
    background-color: var(--accent-color) !important;
    box-shadow: 0 2px 6px rgba(185, 28, 28, 0.3);
}

/* Mobile responsive styles */
@media (max-width: 991.98px) {
    .header-search-nav-item {
        margin-top: 8px !important;
        margin-bottom: 8px !important;
        width: 100%;
    }
    
    .header-search-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }

    .header-search-wrapper:focus-within {
        width: 100% !important;
    }

    .search-autocomplete-dropdown {
        position: static;
        width: 100%;
        max-width: 100%;
        margin-top: 6px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
}