@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Poppins:wght@400;600;800&display=swap');

:root {
    --primary-color: #0a2558; /* Deep Blue - Pro Look */
    --secondary-color: #f39c12; /* Gold/Orange Accent */
    --accent-color: #e74c3c; /* Red for badges/alerts */
    --text-color: #333333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Open Sans', 'Roboto', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Poppins', sans-serif;
}

/* Navbar Pro Style */
.navbar {
    background-color: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--primary-color) !important;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 15px !important;
    transition: all 0.3s;
    border-radius: 5px;
    margin: 0 5px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(10, 37, 88, 0.05);
}

/* Custom Pro Toggler */
.navbar-toggler {
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar-toggler:hover {
    background-color: var(--primary-color);
    transform: rotate(90deg);
}

.navbar-toggler:hover .fas {
    color: #fff;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler .fas {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

#back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

#back-to-top i {
    font-size: 1.2rem;
}

/* Hero Section Pro */
.hero-section {
    /* Background handled by carousel */
    color: white;
    padding: 120px 0;
    text-align: center;
    position: relative;
    /* Ensure content is readable */
}

.carousel-item::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.4); /* Additional darken for images */
}

.hero-content h1 {
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content .lead {
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}

.tracking-wider {
    letter-spacing: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #0d3475;
    border-color: #0d3475;
    transform: translateY(-2px);
}

/* Sidebar Accordion */
.sidebar-category {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}

.sidebar-category .list-group-item {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.sidebar-category .list-group-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    padding-left: 25px; /* Slight movement on hover */
}

.sidebar-category .list-group-item.active-category {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}
/* Ensure icon color changes on active/hover */
.sidebar-category .list-group-item.active-category i {
    color: var(--white) !important;
}

.sub-category-list {
    background-color: #f8f9fa;
}

.sub-category-list a {
    display: block;
    padding: 8px 15px 8px 10px; /* Minimal left padding */
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
    transition: all 0.2s;
    text-align: left; /* Ensure left alignment */
}

.sub-category-list a:hover {
    color: var(--primary-color);
    padding-left: 15px; /* Slight movement */
    background-color: #fff;
}
.sub-category-list a.active-category {
    color: var(--primary-color);
    font-weight: 700;
    background-color: #fff;
    padding-left: 15px;
}

/* Product Card Pro */
.product-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    position: relative;
    border: 1px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--border-color);
}

.product-img-wrapper {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background-color: #f9f9f9;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.5s;
}

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

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

.product-card .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-color);
}

.product-unit {
    font-size: 0.8rem;
    color: #888;
}

.halal-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Product Card Pro Hover */
.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
    border-color: var(--primary-color) !important;
}

.transition-all {
    transition: all 0.3s ease;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-white {
    background-color: #fff;
    color: #333;
    border-color: #dee2e6;
}
.btn-white:hover {
    background-color: #f8f9fa;
    border-color: #c6c7c8;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer h5 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 20px;
}

.footer hr {
    border-color: #333;
}

/* Home Page Pro Improvements */
.tracking-wider {
    letter-spacing: 2px;
}

.opacity-90 {
    opacity: 0.9;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.hover-translate:hover {
    transform: translateY(-5px);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10,37,88,0.9) 0%, rgba(10,37,88,0.7) 100%);
    z-index: 0;
}

/* Feature Cards */
.feature-card {
    background: #fff;
    border-color: #f0f0f0 !important;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-color) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0 !important;
}

.category-card:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
}

.category-card i {
    transition: all 0.3s ease;
}

.category-card:hover i {
    opacity: 1 !important;
    transform: scale(1.1);
}

/* Background Utility */
.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.1);
}
.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.1);
}
.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.1);
}
