/* Container for the 3-column layout */
.cp-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

/* Individual Card Styling */
.cp-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    /* Keeps image inside rounded corners */
    text-align: center;
}

/* Card Image */
.cp-image-wrapper img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Content spacing */
.cp-content-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 25px 30px 30px 30px;
}

/* Typography */
.cp-title {
    font-size: 22px;
    line-height: 1.3;
    margin: 0 0 10px 0;
    color: #000;
    font-family: sans-serif;
    font-weight: bold;
}

.cp-price {
    font-size: 20px;
    color: #12723a;
    font-weight: bold;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Reusable Green Button Styling */
.cp-button {
    display: block;
    text-align: center;
    padding: 12px;
    border: 2px solid #12723a;
    color: #12723a;
    text-decoration: none;
    font-weight: 600;
    background-color: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 16px;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

.cp-button:hover {
    background-color: #12723a !important;
    color: #fff !important;
    border-color: #12723a !important;
}

/* MODAL / POPUP STYLING */
.cp-modal-overlay {
    display: none;
}

.cp-modal-overlay[style*="display: block"] {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.cp-modal-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    /* Centered layout for modal */
    max-height: 90vh;
    overflow-y: auto;
}

.cp-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.cp-close-btn:hover {
    color: #000;
}

/* Modal Image Styling */
.cp-modal-image-container img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cp-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: left;
    /* Keep description left-aligned for reading */
}

.cp-shop-now-btn {
    background-color: #12723a;
    color: #fff;
}

/* Responsive design for smaller screens */
@media (max-width: 992px) {
    .cp-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cp-grid-container {
        grid-template-columns: 1fr;
    }
}