/* Empaques Participantes Styles */

.empaques-container {
    width: 100%;
    min-height: 100vh;
    padding: 80px 20px 60px;
    position: relative;
    z-index: 2;
    box-sizing: border-box !important;
}

.empaques-container * {
    box-sizing: border-box !important;
}

.empaques-title {
    width: 40%;
    max-width: 1320px;
    margin: 0 auto;
    display: block;
}

.tipos-carnes {
    width: 60%;
    margin: 30px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.tipos-carnes-img {
    width: clamp(120px, 35%, 250px);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tipos-carnes-img:hover {
    transform: scale(1.05);
}

/* Main Columns Wrapper */
.empaques-columns-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(18px, 2vw, 24px);
    padding: clamp(16px, 2.2vw, 26px);
    align-items: start;
    justify-content: center;
}

/* Individual Column - No longer used in HTML but kept for safety */
.empaque-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: center;
}

.empaque-column-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    align-items: center;
}

/* Interaction classes for Category Buttons */
.tipos-carnes-img.active {
    transform: scale(1.05);
    opacity: 1;
    filter: brightness(1.1);
}

.tipos-carnes-img.inactive {
    transform: scale(0.95);
    opacity: 0.5;
    filter: grayscale(0.5);
}

.empaque-card {
    background: #ffffff;
    width: 100%;
    /* Reduce width to create visual separation between columns */
    max-width: 220px; 
    border-radius: 18px;
    padding: clamp(14px, 1.4vw, 18px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: visible;
    border: 3px solid #622E1A;
    margin: 5px auto;
}

.empaque-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.2),
        0 6px 15px rgba(0, 0, 0, 0.15);
}

.empaque-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.empaque-image {
    width: 100%;
    height: 100%;
    max-width: clamp(150px, 12vw, 190px);
    max-height: clamp(150px, 12vw, 190px);
    object-fit: contain;
    object-position: center;
    display: block;
}

.empaque-nombre {
    text-align: center;
    font-size: clamp(12px, 1.4vw, 15px);
    font-weight: 600;
    color: #333333;
    margin: 0;
    line-height: 1.4;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Responsive Design */

/* Desktop - 3 columns if needed (but requirement is strict 4 categories) -> reduce gap or scale down */
/* If screen is too small for 4 columns, we might need to scroll or stack 2x2 */
@media (max-width: 1199px) {
    .empaques-columns-wrapper {
        grid-template-columns: repeat(2, 1fr); /* 2 columns of categories */
        justify-items: center;
    }
}


/* Tablet - 2 columns */
@media (max-width: 899px) {
    .empaques-columns-wrapper {
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
    }

    .empaques-container {
        padding: 70px 20px 50px;
    }
}

/* Mobile - 1 column */
@media (max-width: 639px) {
    .empaques-columns-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 16px;
    }

    .empaque-column {
        width: 100%;
        align-items: center;
        box-sizing: border-box !important;
    }

    .empaques-container {
        padding: 110px 16px 40px;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }
    
    .empaques-title {
        width: 90%;
        max-width: 360px;
        margin: 0 auto 20px;
    }
    
    .tipos-carnes {
        width: 100%;
        max-width: 300px;
        gap: 15px;
        margin: 0 auto 30px;
        padding: 0;
        box-sizing: border-box !important;
        flex-direction: column;
        align-items: center;
    }

    .tipos-carnes-img {
        width: 75%;
        max-width: 220px;
        box-sizing: border-box !important;
    }

    .empaque-card {
        width: 100%;
        max-width: 280px; /* Revert to a smaller proportional width to look good */
        margin: 0 auto;
        border-width: 2px;
        box-sizing: border-box !important;
    }

    .empaque-image-wrapper {
        min-height: 180px; /* Keep consistent height */
        width: 100%;
        box-sizing: border-box !important;
    }
    
    .empaque-image {
        max-width: 80%; /* Ensure image doesn't overflow or look too massive */
        box-sizing: border-box !important;
    }
}

/* Extra small mobile */
@media (max-width: 400px) {
    .empaques-title {
        width: 85%;
        max-width: 300px;
    }
    
    .empaques-columns-wrapper {
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box !important;
    }
    
    .tipos-carnes {
        width: 100%;
        gap: 12px;
    }
    
    .tipos-carnes-img {
        width: 85%;
    }
    
    .empaque-card {
        width: 90%;
        max-width: 240px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Ensure proper spacing with header/footer */
@media (min-width: 768px) {
    .empaques-container {
        padding-top: 100px;
    }
}