/* Global Styles */
:root {
    --primary-color: #0056b3;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --accent-color: #ffc107;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    text-align: justify;
    text-justify: inter-word;
    /*text-align-last: left;*/
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #003d82;
    text-decoration: none;
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dark-color);
}

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

.divider {
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0 auto 30px;
}

/* Navbar */
.navbar {
    transition: padding 0.3s ease, box-shadow 0.3s ease;
    padding: 12px 0;
}

.navbar.navbar-shrink {
    padding: 6px 0;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.navbar .nav-link {
    color: #333;
    font-weight: 500;
}

.navbar .nav-link.active,
.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}


@media (max-width: 767.98px) {
    .hero-carousel .carousel-item img { height: 260px; }
}

/* Brand Preview Images */
.brand-previews .img-fluid {
    width: 100%;
    height: 80px; /* Fixed height for all preview images */
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.brand-previews .img-fluid:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.brand-previews .col-3 {
    padding: 0 5px;
}

.brand-previews .row {
    margin: 0 -5px;
}

/* Image Card for Brand Covers */
.image-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    min-height: 250px;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px;
    text-align: left;
}

.image-overlay h5, 
.image-overlay p {
    margin: 0;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Index Page Image Collage */
.image-collage {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    height: 450px;
}

.image-collage a {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-collage a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.image-collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-collage a:hover img {
    transform: scale(1.05);
}

/* First image - larger */
.image-collage a:first-child {
    grid-row: span 2;
    height: 100%;
}

/* Last two images - smaller */
.image-collage a:nth-child(2),
.image-collage a:nth-child(3) {
    height: calc(100% - 0.2rem);
}

/* Gallery Styles */
.gallery .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.gallery .card-img-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
}

.gallery .card-img-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.gallery .card:hover .card-img-top {
    transform: scale(1.03);
}

.gallery .card-body {
    padding: 0.75rem;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 10px 25px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #004494;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    padding: 40px 0 20px;
    background-color: #343a40;
    color: #fff;
}

footer h5 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

footer h5:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

footer ul.contact-info {
    padding-left: 0;
    list-style: none;
}

footer ul.contact-info li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

footer ul.contact-info i {
    margin-top: 5px;
    min-width: 20px;
    color: var(--primary-color);
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 8px;
    color: #fff;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

footer .copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
}

/* Compact contact info */
.contact-info .fa-map-marker-alt,
.contact-info .fa-phone-alt,
.contact-info .fa-envelope {
    margin-top: 3px;
}

.contact-info div {
    flex: 1;
    line-height: 1.5;
}

.contact-info strong {
    display: block;
    margin-bottom: 3px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    /* Hide top bar on mobile */
    .top-bar {
        display: none;
    }
    
    /* Footer Styles */
    footer {
        text-align: center;
    }
    
    footer h5:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    footer ul.contact-info {
        margin-bottom: 30px;
    }
    
        /* Center align all footer columns on mobile */
    footer .col-md-3.col-6 {
        text-align: center;
        width: 100%;
        margin-bottom: 20px;
    }
    
    footer ul.contact-info li {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center !important;
        margin-bottom: 20px;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    overflow: hidden;
    display: flex;
    align-items: center;
    color: #fff;
    background-color: #f8f9fa; /* Light fallback background */
}

.hero-section .container {
    position: relative;
    z-index: 2;
    padding-top: 100px;
}

.hero-content {
    padding-left: 30px;
    max-width: 100%;
}

.hero-logo {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    width: auto;
    margin-bottom: 30px;
    display: block;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-carousel .carousel-item {
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    width: 100%;
}

.hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    z-index: 2;
}

.hero-carousel .carousel-indicators {
    z-index: 2;
    bottom: 50px;
}

@media (max-width: 992px) {
    .hero-section {
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        padding: 30px 20px 0;
        text-align: center;
    }
    
    .hero-logo {
        margin: 0 auto 20px;
        max-height: 150px;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
}

/* Page Header (hero on inner pages) */
.page-header {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,86,179,0.55), rgba(0,86,179,0.55));
}
.page-header > .container,
.page-header .container > * {
    position: relative;
    z-index: 1;
}
.page-header h1,
.page-header .display-4,
.page-header .display-5 {
    color: #fff;
}
.page-header .breadcrumb .breadcrumb-item a { color: rgba(255,255,255,0.95); }
.page-header .breadcrumb .breadcrumb-item.active { color: #fff; }
.page-header .breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.8); }

/* Hero logo badge */
.hero-logo {
    height: 350px;
    width: auto;
    margin: 0 auto;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}
@media (max-width: 767.98px) {
    .hero-logo { 
        max-height: 265px; 
        width: auto;
    }
    .hero-section .container {
        padding-top: 0;
    }
}

/* About collage images */
.collage-img {
    height: 180px;
    width: 100%;
    object-fit: cover;
}
@media (max-width: 767.98px) {
    .collage-img { height: 140px; }
}

/* Features Section */
.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(0, 86, 179, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.feature-box:hover .feature-icon {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
}

/* Brand Logos */
.brand-logo {
    background: #fff;
    border-radius: 8px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.brand-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.brand-logo img {
    max-width: 80%;
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.brand-logo:hover img {
    filter: grayscale(0);
    opacity: 1;
}

/* Infinite Scrolling Logo Carousel */
.logo-carousel-container {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
}

.logo-carousel-container::before,
.logo-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.logo-carousel-container::before {
    left: 0;
    background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0) 100%);
}

.logo-carousel-container::after {
    right: 0;
    background: linear-gradient(270deg, #fff 0%, rgba(255,255,255,0) 100%);
}

.logo-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.logo-track:hover {
    animation-play-state: paused;
}

.logo-track a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2rem;
    transition: transform 0.3s ease;
}

.logo-track img {
    height: 50px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.logo-track a:hover img {
    filter: grayscale(0) opacity(1);
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% / 2));
    }
}

/* Brand Card (used on Products page) */
.brand-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    height: 100%; /* Make card fill the column height */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    transition: all 0.3s ease;
    padding: 1rem;
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.brand-card img {
    max-width: 100%;
    max-height: 60px; /* Set a max-height */
    object-fit: contain; /* Ensure aspect ratio is maintained */
    margin-bottom: 0.5rem; /* Space between image and title */
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    bottom: 30px;
}

.back-to-top:hover {
    background: #004494;
    color: #fff;
    transform: translateY(-3px);
}

/* Product Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

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

/* Ensure consistent image heights */
.card-img-top {
    width: 100%;
    height: 200px; /* Fixed height for all product images */
    object-fit: cover; /* This will cover the area without distorting the image */
    object-position: center; /* Center the image within the container */
}

/* For the home page category cards */
.home-category .card-img-top {
    height: 220px; /* Slightly taller for the home page */
}

/* Image-first Cards */
.image-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

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

.image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.1));
    color: #fff;
}

.image-overlay h5,
.image-overlay p {
    color: #fff;
    margin: 0;
}

.image-overlay .btn {
    margin-top: 8px;
}

/* Utilities */
.object-fit-cover {
    object-fit: cover;
    object-position: center;
}

@media (max-width: 767.98px) {
    .image-card img {
        height: 180px;
    }
}

/* Product card specific styles */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-text {
    margin-bottom: 1rem;
}

.product-card .btn {
    margin-top: auto;
    align-self: center;
}

/* Product image container */
.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 86, 179, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

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

/* Responsive Styles */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 80px 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .btn {
        margin-bottom: 15px;
    }
    
    .navbar-nav {
        padding: 15px 0;
    }
    
    .navbar-nav .btn {
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .feature-box {
        margin-bottom: 30px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}
