/* S:\tienda\b2b\assets\css\pages\product.css */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700;800&display=swap');

/* --- SHARED / GLOBAL PRODUCT STYLES --- */
body {
    font-family: 'Outfit', sans-serif;
}

/* Image mix-blend-mode for white backgrounds */
.product-cover img,
.product-thumbs .thumb-item img,
.product-miniature .thumbnail-container img {
    mix-blend-mode: multiply;
}

/* --- LIST VIEW (list.php) --- */

.products-grid {
    display: grid;
    /* Force 4 columns as requested ("4 images full width") */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-miniature {
    background: #fff;
    /* Reset inherited layout blocked */
    width: 100%;
    max-width: 100%;
    flex: none;
    /* Defined border as requested */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-miniature:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #b0b0b0;
}

.thumbnail-container {
    position: relative;
    text-align: center;
    margin-bottom: 15px;
    height: 200px;
    /* Standard height */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
    /* Ensure image fits inside */
}

.thumbnail-container img {
    /* Restore standard responsive image behavior */
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-miniature:hover .thumbnail-container img {
    transform: scale(1.05);
}

.product-description {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: center;
    width: 100%;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.35;
    color: #333;
    /* Clean text block */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

.product-title a:hover {
    color: #0066cc;
}

/* Prices Wrapper */
.product-prices {
    margin-top: auto;
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* BIG GREEN PRICE */
.price-primary {
    color: #28a745;
    font-weight: 800;
    font-size: 1.8rem;
    line-height: 1;
    letter-spacing: -0.5px;
}

/* "Tu Precio" */
.price-secondary {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.price-secondary strong {
    color: #000;
    font-weight: 800;
}

/* Button Add Styles */
.btn-add {
    width: 100%;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    color: #333;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

.btn-add.added {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* BADGES */
.thumbnail-container span.offer-badge,
.badge-new {
    position: absolute;
    top: 10px;
    /* Spacing from edge */
    left: 10px;
    background: #0099cc;
    color: white;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 4px;
    /* Standard badge */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 10;
    text-transform: uppercase;
}

.badge-offer {
    background: #ff4c4c;
}

/* DETAIL VIEW FIXES */
.product-card-main {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 30px;
    grid-template-columns: 45% 1fr;
    gap: 30px;
    border: 1px solid #eee;
}

.product-title-h1 {
    font-weight: 800;
}