﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

.containerItems {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background-color: #21aa9a;
}

.item-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    border: Solid;
    border-color: white;
}

    .item-card:hover {
        transform: translateY(-5px);
    }

    .item-card img {
        width: 100%;
        height: 250px;
        object-fit: fill;
    }

.item-info {
    padding: 15px;
    min-height: 80px; /* Adjust height to fit longest expected product name */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* To keep price at bottom */
}


.item-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* limit lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
}


.item-price {
    color: #21aa9a;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: bolder;
}

.buttons {
    padding: 0 15px 15px 15px;
    flex-shrink: 0;
}


.add-cart {
    padding: 10px;
    width: 100%;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background-color: #21aa9a;
    color: white;
    margin-bottom: 10px;
}

.chat-buttons {
    display: flex;
    gap: 10px;
}

    .chat-buttons a,
    .chat-buttons button {
        flex: 1;
        padding: 10px;
        border: none;
        border-radius: 4px;
        font-size: 16px;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.whatsapp {
    background-color: #25D366;
}

.agent {
    background-color: #3498db;
}

/* Tablet */
@media (max-width: 992px) {
    .containerItems {
        grid-template-columns: repeat(2, 1fr);
    }

    .item-card img {
        height: 250px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .containerItems {
        grid-template-columns: 1fr;
    }

    .item-card img {
        height: 250px;
    }
}


/* Smooth transition */
.add-cart,
.chat-buttons a,
.chat-buttons button,
.chat-buttons i {
    transition: all 0.3s ease;
    transform: scale(1);
}

    /* Hover effect: scale and shadow */
    .add-cart:hover,
    .chat-buttons a:hover,
    .chat-buttons button:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    /* Active (click) effect */
    .add-cart:active,
    .chat-buttons a:active,
    .chat-buttons button:active {
        transform: scale(0.97);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    /* Icon pulse on hover */
    .chat-buttons a:hover i,
    .chat-buttons button:hover i {
        animation: pulse 0.6s ease-in-out;
    }

/* Pulse animation keyframes */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}



.item-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4757; /* default red for hot selling */
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 1;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.item-card {
    position: relative; /* required for badge positioning */
}

/* Optional: Style variants */
.item-badge.new {
    background-color: #1abc9c; /* teal */
}

.item-badge.hot {
    background-color: #e74c3c; /* red */
}

.item-badge.limited {
    background-color: #f39c12; /* orange */
}

.item-badge.themed {
    background-color: #21aa9a;
}
