/* Products Styles - FarmaciaDG */

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.badget-off {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--offer-color);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
}

.product-gallery {
    position: relative;
    height: 200px;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.product-img-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease-in-out;
}

.placeholder-img {
    width: 50%;
    height: 50%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ddd"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 5;
    color: var(--brand-blue);
}

.product-gallery:hover .slider-btn {
    opacity: 1;
    pointer-events: auto;
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

.slider-btn:hover {
    background: white;
    color: var(--brand-dark);
}

.category {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 5px;
}

.product-info h3 {
    font-size: 1.1rem;
    margin: 5px 0 10px;
    color: var(--text-main);
    font-weight: 600;
    height: 50px;
    overflow: hidden;
    line-height: 1.4;
}

.price {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 15px;
}

.price .old {
    text-decoration: line-through;
    color: #adb5bd;
    font-size: 0.9rem;
}

.price .new {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--brand-blue);
}

/* Responsive Products */
@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-info h3 {
        font-size: 0.95rem;
        height: 40px;
    }

    .price .new {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}