/* ===== VARIABLES ===== */
:root {
    --primary-blue: #1E3A8A;
    --secondary-red: #C62828;
    --accent-green: #2E7D32;
    --light-gray: #f8f9fa;
    --dark-text: #333333;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-md: 0 6px 12px rgba(0,0,0,0.15);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    background-color: var(--white);
    padding-top: 76px;
    overflow-x: hidden;
    width: 100%;
}

/* ===== LOADER ANIMATION ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-gray);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== NAVBAR STYLES ===== */
.navbar {
    background-color: var(--primary-blue) !important;
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
}

.navbar-brand {
    color: var(--white) !important;
    font-weight: bold;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.5);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.7rem 1rem !important;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--white) !important;
    background-color: rgba(255,255,255,0.1);
    border-radius: 5px;
}

/* Dropdown Menu */
.dropdown-menu {
    background-color: var(--primary-blue);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    color: rgba(255,255,255,0.9);
    padding: 0.7rem 1.5rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
}

.dropdown-divider {
    border-top-color: rgba(255,255,255,0.2);
}

/* ===== BUTTON STYLES ===== */
.btn-primary {
    background-color: var(--secondary-red) !important;
    border-color: var(--secondary-red) !important;
    color: var(--white);
    padding: 10px 25px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: #b71c1c !important;
    border-color: #b71c1c !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border-color: var(--secondary-red) !important;
    color: var(--secondary-red) !important;
}

.btn-outline-primary:hover {
    background-color: var(--secondary-red) !important;
    color: var(--white) !important;
}

/* ===== HERO CAROUSEL ===== */
.hero-carousel {
    margin-top: -76px;
}

.carousel-item {
    height: 600px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.carousel-caption {
    bottom: 50%;
    transform: translateY(50%);
    z-index: 2;
    padding: 0 20px;
}

.carousel-caption h1 {
    font-size: 3.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
}

.carousel-caption p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    margin-bottom: 2rem;
}

.carousel-indicators {
    z-index: 3;
}

.carousel-control-prev,
.carousel-control-next {
    z-index: 3;
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-bottom: 30px;
    height: 100%;
    background: var(--white);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-title {
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.product-card .card-text {
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ===== SECTION STYLES ===== */
section {
    padding: 60px 0;
}

.section-title {
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-red);
}

/* ===== WHY CHOOSE US ===== */
.why-choose-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    background: var(--white);
}

.why-choose-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.why-choose-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    background-color: var(--accent-green);
    color: var(--white);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.why-choose-card h4 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

/* ===== CATEGORY STYLES ===== */
.category-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 250px;
    margin-bottom: 30px;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(30, 58, 138, 0.95), transparent);
    color: white;
    padding: 20px;
    text-align: center;
}

.category-overlay h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    font-weight: bold;
}

.category-overlay p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-red);
    color: white;
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
}

/* Category Filter Buttons */
.category-filter {
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    background: white;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-blue);
    color: white;
}

/* Category Page Header */
.category-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
    color: white;
    padding: 80px 0;
    margin-bottom: 40px;
    text-align: center;
}

.category-header h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.category-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: block;
    padding: 12px 20px;
    background: var(--light-gray);
    color: var(--dark-text);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.category-list a:hover,
.category-list a.active {
    background: var(--primary-blue);
    color: white;
    transform: translateX(5px);
}

.category-list a i {
    margin-right: 10px;
    color: var(--accent-green);
}

.category-list a:hover i {
    color: white;
}

/* Product Count Badge */
.count-badge {
    float: right;
    background: var(--secondary-red);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ===== CONTACT FORM ===== */
.contact-form {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.contact-info {
    background: var(--primary-blue);
    color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    height: 100%;
}

.contact-info i {
    color: var(--accent-green);
    margin-right: 10px;
    font-size: 1.25rem;
}

.contact-info a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.contact-info a:hover {
    color: var(--accent-green);
    padding-left: 5px;
}

/* ===== FLOATING WHATSAPP BUTTON ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    line-height: 60px;
    z-index: 999;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: var(--white);
    background-color: #128C7E;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    text-align: center;
    line-height: 50px;
    z-index: 998;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: none;
    padding: 0;
}

#back-to-top:hover {
    background: var(--secondary-red);
    transform: translateY(-5px);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer a:hover {
    color: var(--white);
    transform: translateX(5px);
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-red);
}

.footer ul {
    padding-left: 0;
}

.footer ul li {
    margin-bottom: 0.8rem;
    list-style: none;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-red);
    transform: translateY(-3px);
}

/* ===== ADMIN PANEL STYLES ===== */
.admin-sidebar {
    background-color: var(--primary-blue);
    min-height: 100vh;
    padding: 20px;
    color: var(--white);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 15px;
    margin: 5px 0;
    border-radius: 5px;
    transition: var(--transition);
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    transform: translateX(5px);
}

.admin-sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

.admin-content {
    padding: 30px;
    background: var(--light-gray);
    min-height: 100vh;
}

/* ===================================================== */
/* ===== RESPONSIVE DESIGN - COMPLETE MEDIA QUERIES ===== */
/* ===================================================== */

/* Extra Large Devices (Desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Large Devices (Desktops, 992px to 1199px) */
@media (max-width: 1199px) {
    .carousel-item {
        height: 500px;
    }
    
    .carousel-caption h1 {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

/* Medium Devices (Tablets, 768px to 991px) */
@media (max-width: 991px) {
    body {
        padding-top: 70px;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-collapse {
        background-color: var(--primary-blue);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 0.5rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .dropdown-menu {
        background-color: rgba(0,0,0,0.2);
        border: none;
        margin-left: 1rem;
    }
    
    .carousel-item {
        height: 450px;
    }
    
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
    
    .carousel-caption p {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .product-card .card-img-top {
        height: 220px;
    }
    
    .category-card {
        height: 220px;
    }
    
    .why-choose-card {
        padding: 1.5rem;
    }
    
    .why-choose-icon {
        width: 70px;
        height: 70px;
        line-height: 70px;
        font-size: 1.8rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer h5::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .category-header {
        padding: 60px 0;
    }
    
    .category-header h1 {
        font-size: 2.5rem;
    }
}

/* Small Devices (Landscape Phones, 576px to 767px) */
@media (max-width: 767px) {
    section {
        padding: 40px 0;
    }
    
    .carousel-item {
        height: 400px;
    }
    
    .carousel-caption {
        padding: 0 15px;
    }
    
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .carousel-caption .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .product-card .card-img-top {
        height: 200px;
    }
    
    .product-card .card-body {
        padding: 1.2rem;
    }
    
    .product-card .card-title {
        font-size: 1.1rem;
    }
    
    .category-card {
        height: 200px;
    }
    
    .category-overlay h4 {
        font-size: 1.1rem;
    }
    
    .filter-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 25px;
        line-height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    #back-to-top {
        width: 40px;
        height: 40px;
        line-height: 40px;
        bottom: 80px;
        right: 20px;
        font-size: 0.9rem;
    }
    
    .category-header {
        padding: 40px 0;
    }
    
    .category-header h1 {
        font-size: 2rem;
    }
    
    .category-header p {
        font-size: 1rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
}

/* Extra Small Devices (Portrait Phones, up to 575px) */
@media (max-width: 575px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .carousel-item {
        height: 350px;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    .carousel-caption .btn {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-title::after {
        width: 60px;
    }
    
    .product-card .card-img-top {
        height: 180px;
    }
    
    .product-card .card-body {
        padding: 1rem;
    }
    
    .product-card .card-title {
        font-size: 1rem;
    }
    
    .product-card .btn {
        padding: 6px 15px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .category-card {
        height: 180px;
        margin-bottom: 20px;
    }
    
    .category-overlay {
        padding: 15px;
    }
    
    .category-overlay h4 {
        font-size: 1rem;
    }
    
    .category-overlay p {
        font-size: 0.8rem;
    }
    
    .category-badge {
        padding: 3px 10px;
        font-size: 0.8rem;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 0.8rem;
        margin: 3px;
    }
    
    .why-choose-card {
        padding: 1.2rem;
    }
    
    .why-choose-icon {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .why-choose-card h4 {
        font-size: 1.1rem;
    }
    
    .why-choose-card p {
        font-size: 0.9rem;
    }
    
    .contact-form,
    .contact-info {
        padding: 1rem;
    }
    
    .contact-info h3 {
        font-size: 1.3rem;
    }
    
    .contact-info h5 {
        font-size: 1rem;
    }
    
    .contact-info p {
        font-size: 0.9rem;
    }
    
    .footer h5 {
        font-size: 1.2rem;
    }
    
    .footer p,
    .footer a {
        font-size: 0.9rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 1rem;
    }
    
    .category-header h1 {
        font-size: 1.8rem;
    }
    
    .admin-sidebar {
        min-height: auto;
        padding: 15px;
    }
    
    .admin-content {
        padding: 20px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Height-based media queries for very short screens */
@media (max-height: 600px) {
    .carousel-item {
        height: 300px;
    }
    
    .category-header {
        padding: 30px 0;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .whatsapp-float,
    #back-to-top,
    .btn {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-accent {
    color: var(--accent-green) !important;
}

.bg-accent {
    background-color: var(--accent-green) !important;
}

.text-red {
    color: var(--secondary-red) !important;
}

.bg-blue {
    background-color: var(--primary-blue) !important;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Fix for Bootstrap grid on mobile */
.row {
    margin-right: -15px;
    margin-left: -15px;
}

.row > [class*="col-"] {
    padding-right: 15px;
    padding-left: 15px;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for AOS animations on mobile */
[data-aos] {
    pointer-events: auto !important;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Fix for sticky hover on mobile */
@media (hover: none) {
    .product-card:hover,
    .category-card:hover,
    .why-choose-card:hover,
    .btn-primary:hover {
        transform: none;
    }
    
    .product-card:hover .card-img-top {
        transform: none;
    }
}