/* Sri Lakshmi Group - New Card Design */
/* Based on uploaded product card design with custom requirements */

@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400;600&family=Roboto:wght@300;400;600;700&display=swap");

/* ===== CARD CONTAINER ===== */
.card-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: 20px;
    padding: 20px 0;
    box-sizing: border-box;
}

/* ===== MAIN CARD STYLING ===== */
.sri-card {
    width: 250px; /* Reduced width for 4 per row */
    transition: ease all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.sri-card:hover {
    text-decoration: none;
    color: inherit;
}

.sri-card .card-wrapper {
    margin: 30px 5px 5px 5px; /* Reduced margins */
    padding-top: 220px; /* Increased card height */
    box-sizing: border-box;
    position: relative;
    box-shadow: 0 0 20px 10px rgba(29, 29, 29, 0.1);
    transition: ease all 0.3s;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.sri-card .card-wrapper:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px 15px rgba(29, 29, 29, 0.15);
}

.sri-card .card-wrapper:hover .card-image {
    height: 240px; /* Increased hover height */
}

/* ===== TOP BACKGROUND COLOR - REMOVED ===== */
.sri-card .card-wrapper .card-color-bg {
    display: none; /* Background removed as requested */
}

/* ===== IMAGE CONTAINER ===== */
.sri-card .card-wrapper .card-image {
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    position: absolute;
    bottom: calc(100% - 220px); /* Adjusted for increased card height */
    width: 80%; /* Increased image width from 70% to 80% */
    left: 10%; /* Center the image horizontally (adjusted for 80% width) */
    height: 220px; /* Increased height */
    transition: ease all 0.3s;
}

/* For actual img tags */
.sri-card .card-wrapper .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

/* ===== CARD CONTENT ===== */
.sri-card .card-wrapper .card-info {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    align-content: center;
    height: 60px; /* Reduced title background height */
    padding: 8px; /* Reduced padding */
    box-sizing: border-box;
    background: #1c8097; /* Sri Lakshmi blue background */
}

.sri-card .card-wrapper .card-info p {
    width: 100%;
    font-size: 14px;
    text-align: center;
    margin: 0;
}

/* ===== CARD TITLE ===== */
.sri-card .card-wrapper .card-info .card-title {
    font-family: "Roboto", sans-serif;
    margin-bottom: 0; /* Removed margin */
    font-size: 13px; /* Slightly reduced font size for shorter background */
    font-weight: 600;
    color: white; /* White text color */
    text-align: center;
    line-height: 1.2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    min-height: 30px; /* Reduced height for shorter background */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .sri-cards-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for tablet */
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .sri-cards-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile */
        gap: 10px;
        padding: 15px;
    }

    .sri-card {
        width: 100%; /* Full width within grid */
    }

    .sri-card .card-wrapper {
        margin: 20px 5px 5px 5px;
        padding-top: 200px; /* Increased for mobile */
    }

    .sri-card .card-wrapper .card-image {
        height: 200px;
        bottom: calc(100% - 200px);
        width: 80%; /* Increased image width */
        left: 10%; /* Adjusted centering */
    }

    .sri-card .card-wrapper:hover .card-image {
        height: 220px;
    }

    .sri-card .card-wrapper .card-info {
        height: 55px; /* Reduced title background height */
        padding: 6px;
    }

    .sri-card .card-wrapper .card-info .card-title {
        font-size: 12px;
        margin-bottom: 0;
        min-height: 28px;
    }
}

@media (max-width: 480px) {
    .sri-cards-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 columns for small mobile */
        gap: 8px;
        padding: 10px;
    }

    .sri-card {
        width: 100%; /* Full width within grid */
    }

    .sri-card .card-wrapper {
        margin: 15px 3px 3px 3px;
        padding-top: 180px; /* Increased for small mobile */
    }

    .sri-card .card-wrapper .card-image {
        height: 180px;
        bottom: calc(100% - 180px);
        width: 80%; /* Increased image width */
        left: 10%; /* Adjusted centering */
    }

    .sri-card .card-wrapper:hover .card-image {
        height: 200px;
    }

    .sri-card .card-wrapper .card-info {
        height: 50px; /* Reduced title background height */
        padding: 5px;
    }

    .sri-card .card-wrapper .card-info .card-title {
        font-size: 11px;
        margin-bottom: 0;
        min-height: 25px;
        line-height: 1.1;
    }
}

/* ===== GRID LAYOUT FOR CARDS ===== */
.sri-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns for PC */
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .sri-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .sri-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 12px;
        padding: 12px;
    }
}
