/* ===== Global ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
}

/* ===== Navbar ===== */
.navbar {
    padding: 0.8rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    background: #fff !important;
}
.navbar-brand img {
    height: 40px;
}
.nav-link {
    font-weight: 500;
    color: #333 !important;
    margin: 0 0.3rem;
    transition: color 0.3s;
}
.nav-link:hover {
    color: #007bff !important;
}
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
}
.dropdown-item:hover {
    background-color: #f1f1f1;
    color: #007bff;
}

/* Cart badge */
#cart-count {
    font-size: 0.7rem;
    padding: 3px 6px;
}

.carousel-control-prev,
.carousel-control-next {
    z-index: 4;
}
.carousel-inner > .carousel-item {
    transition: transform 0.6s ease-in-out;
}
.carousel-item-next,
.carousel-item-prev,
.carousel-item.active {
    display: block;
}


/* Hero Slider – auto-fit images */
.hero-slider .carousel-item {
    position: relative;
    max-height: 500px;          /* optional: limit height on desktop */
    overflow: hidden;
}
.slide-img {
    width: 100%;
    height: auto;
    object-fit: cover;          /* crop instead of stretch */
    /* fallback for browsers that don't support object-fit */
    font-family: 'object-fit: cover;';
    max-height: 500px;          /* consistent height */
}
.slide-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3); /* dark overlay for text readability */
    z-index: 2;
}
.hero-slider .carousel-caption {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 10%;
    right: 10%;
    bottom: 0;
    text-align: left;
    color: #fff;
}
/* Responsive: smaller screens */
@media (max-width: 768px) {
    .hero-slider .carousel-item {
        max-height: 350px;
    }
    .slide-img {
        max-height: 350px;
    }
    .carousel-caption h1 {
        font-size: 1.8rem;
    }
}

/* ===== Cards ===== */
.category-card, .product-card {
    border: none;
    border-radius: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.category-card:hover, .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}
.card-title a {
    font-weight: 600;
}
.price .text-primary {
    font-size: 1.1rem;
}

/* ===== Buttons ===== */
.btn {
    border-radius: 0.4rem;
    font-weight: 500;
}


/* Product tabs */
.nav-tabs .nav-link {
    color: #555;
    border: none;
    padding: 12px 24px;
    border-radius: 0;
}
.nav-tabs .nav-link.active {
    color: #007bff;
    border-bottom: 3px solid #007bff;
    background: transparent;
}
.tab-content {
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
}
.product-description ul, .specs-content ul {
    padding-left: 20px;
}
/* ===== Footer ===== */
footer {
    background: #212529;
    color: #ccc;
}
footer a {
    color: #aaa;
    text-decoration: none;
}
footer a:hover {
    color: #fff;
}

/* Category card alignment */
.category-card .category-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-card img {
    transition: transform 0.2s;
}
.category-card:hover img {
    transform: scale(1.05);
}

/* ===== Main content spacing ===== */
.main-content {
    min-height: 70vh;
    padding-bottom: 2rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-slider .carousel-item {
        min-height: 280px;
    }
    .navbar-brand img {
        height: 32px;
    }
}