/* --- Hero Section Styling --- */
.hero-section {
    background-size: cover;
    background-position: center center;
    color: white;
    position: relative;
}

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

.hero-section .container {
    position: relative;
    z-index: 2;
    padding-top: 6rem;
    padding-bottom: 6rem;
}

/* --- Section Styling --- */
.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-weight: 700;
    position: relative;
    padding-bottom: 0.75rem;
    display: inline-block;
}

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

/* --- Feature Icon Styling --- */
.feature-icon-box {
    text-align: center;
    padding: 2rem 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-icon-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.feature-icon-box .icon-display {
    margin: 0 auto 1.5rem auto;
    width: 64px;
    height: 64px;
    background: rgba(111, 78, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-box .icon-display i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* --- Category Navigation Pills (REDESIGNED FOR READABILITY & ALIGNMENT) --- */
.category-nav .nav-pills .nav-link {
    border-radius: 50rem; /* pill shape */
    padding: 0.5rem 1.5rem;
    color: var(--primary-color); /* Coffee-colored text */
    font-weight: 500;
    background-color: transparent; /* Transparent background */
    border: 1px solid var(--primary-color); /* Coffee-colored border */
    margin: 0 0.25rem;
    transition: all 0.2s ease-in-out;
    /* --- FIX STARTS HERE --- */
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    /* --- FIX ENDS HERE --- */
}

.category-nav .nav-pills .nav-link.active,
.category-nav .nav-pills .nav-link:hover {
    background-color: var(--primary-color); /* Solid coffee background on hover/active */
    color: white !important; /* White text for high contrast */
    border-color: var(--primary-color);
}

/* --- Featured Product Card Hover Effect --- */
#featured-products .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#featured-products .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* --- Testimonials Section Styling --- */
.testimonials-section {
    background-color: #ffffff;
    padding: 5rem 0;
}

.testimonial-card {
    background-color: var(--bs-light);
    border: none;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
}

.testimonial-card .stars {
    color: #ffc107;
    margin-bottom: 1rem;
}

.testimonial-card .comment {
    font-style: italic;
    font-size: 1.1rem;
    color: #6c757d;
}

.testimonial-card .author {
    font-weight: 600;
    margin-top: 1.5rem;
    color: var(--primary-color);
}

/* --- Responsive styles for Category Navigation on Mobile --- */
@media (max-width: 767px) {
    .category-nav-scroll-container {
        overflow-x: auto; /* Enables horizontal scrolling */
        -ms-overflow-style: none; /* Hides scrollbar on IE and Edge */
        scrollbar-width: none; /* Hides scrollbar on Firefox */
    }

    /* Hides scrollbar on Chrome, Safari, and Opera */
    .category-nav-scroll-container::-webkit-scrollbar {
        display: none;
    }

    .category-nav-scroll-container .nav-pills {
        flex-wrap: nowrap; /* Prevents the buttons from wrapping to the next line */
        padding-bottom: 15px; /* Adds space for the (hidden) scrollbar */
        margin-bottom: -15px; /* Compensates for the padding to maintain layout */
    }
}

/* --- Discount Promotion Section --- */
.promo-section {
    background-color: var(--bs-light);
    border-top: 1px solid var(--bs-gray-200);
    border-bottom: 1px solid var(--bs-gray-200);
    padding: 5rem 0;
}

.promo-card {
    background-color: white;
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    text-align: center;
}

.promo-card h2 {
    font-weight: 700;
    color: var(--primary-color);
}

.promo-code-wrapper {
    margin: 1.5rem 0;
}

.promo-code {
    display: inline-block;
    background-color: #fffaf0;
    border: 2px dashed var(--accent-color);
    padding: 0.75rem 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    border-radius: 0.25rem;
    letter-spacing: 2px;
}