/* ========================================================
   CATEGORY INDEX PAGE (Stacked Block Layout)
   ======================================================== */
.cat-index-banner {
    width: 100%;
    margin-bottom: 40px;
}
.cat-index-banner img {
    width: 100%;
    height: auto;
    display: block;
}
.cat-index-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px 20px;
}

/* Page Title */
.cat-page-title {
    text-align: center;
    font-size: 48px;
    font-weight: 800;
    color: #444;
    margin-bottom: 40px;
    font-family: 'Noto Sans Khmer', sans-serif;
}

/* --- THE NEW STACKED CATEGORY BLOCKS --- */
.cat-block {
    display: block;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 35px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eaeaea;
}
.cat-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* TOP BAR: Solid Color Title */
.cat-block-header {
    padding: 18px 20px;
    text-align: center;
}
.cat-block-header h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    font-family: 'Noto Sans Khmer', sans-serif;
}

/* BOTTOM BAR: Wrapped Product Rows */
.cat-block-content {
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: center; /* Centers the products beautifully */
    gap: 25px;
    
    /* THE FIX: Allows products to drop to new lines instead of scrolling */
    flex-wrap: wrap; 
}


.cat-block-content img {
    height: 130px; /* THE FIX: Increased from 85px so images boldly fill the box */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 8px rgba(0,0,0,0.12));
    flex: 0 0 auto; 
    transition: transform 0.3s ease;
}
.cat-block-content img:hover {
    transform: scale(1.1); /* Slight zoom on hover */
}


/* ================= THE 4 COLOR VARIANTS ================= */

/* 1. Green Block */
.cat-green .cat-block-header { background-color: var(--brand-green, #0fa153); color: #ffffff; }
.cat-green .cat-block-content { background-color: #e8f5e9; }

/* 2. Yellow Block */
.cat-yellow .cat-block-header { background-color: var(--brand-yellow, #ffb800); color: #000000; }
.cat-yellow .cat-block-content { background-color: #fffde7; }

/* 3. Blue Block */
.cat-blue .cat-block-header { background-color: #0b4a8f; color: #ffffff; }
.cat-blue .cat-block-content { background-color: #e3f2fd; }

/* 4. Dark Green Block */
.cat-dark-green .cat-block-header { background-color: var(--brand-dark-green, #064b17); color: #ffffff; }
.cat-dark-green .cat-block-content { background-color: #dcedc8; }


/* ================= MOBILE RESPONSIVE FIXES ================= */
@media (max-width: 900px) {
    .cat-block-header h3 {
        font-size: 26px;
        padding: 12px;
    }
    .cat-block-content {
        padding: 20px;
        gap: 15px;
    }
    .cat-block-content img {
        height: 95px; /* Slightly smaller bottles for phones */
    }
}