/* Packs Podero Frontend Styles - v1.0.15 */

.packs-podero-widget {
    margin: 30px 0;
    font-family: inherit;
}

/* Section Title */
.pp-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 25px 0;
    text-align: center;
}

/* Packs Container */
.pp-packs-container {
    display: grid;
    gap: 25px;
}

.pp-packs-container.pp-columns-1 {
    grid-template-columns: 1fr;
}

.pp-packs-container.pp-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pp-packs-container.pp-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pp-packs-container.pp-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Pack Card */
.pp-pack-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

/* Pack Header */
.pp-pack-header {
    margin-bottom: 20px;
}

.pp-pack-title-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pp-pack-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
    min-width: 0;
}

/* Discount Badge */
.pp-discount-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Pack Content - Layout similar a Amazon FBT */
.pp-pack-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.pp-products-section {
    flex: 1;
}

.pp-pack-sidebar {
    flex-shrink: 0;
    width: 280px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

/* Products Grid */
.pp-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 0;
}

/* Pack Summary */
.pp-pack-summary {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 20px;
    text-align: left;
}

.pp-price-comparison {
    display: block;
    gap: 0;
    margin-bottom: 10px;
}

.pp-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pp-price-label {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.pp-pack-summary .pp-original-price {
    font-size: 16px;
    text-decoration: line-through;
    color: #999;
}

.pp-pack-summary .pp-pack-price {
    font-size: 20px;
    font-weight: 700;
    color: #b12704;
}

.pp-pack-price-row .pp-pack-price {
    font-size: 24px;
}

.pp-savings {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    background: #e91e63;
    border: none;
    padding: 8px 16px;
    text-align: center;
    margin-bottom: 15px;
    border-radius: 20px;
    display: inline-block;
    width: auto;
    white-space: nowrap;
}

/* Pack Actions - Estilo Amazon */
.pp-pack-actions {
    text-align: left;
}

.pp-add-pack-btn {
    background: #ff9900;
    color: #000;
    border: 1px solid #ff9900;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: center;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 2px 5px rgba(213, 217, 217, 0.5);
}

.pp-add-pack-btn:hover {
    background: #e88900;
    border-color: #e88900;
    transform: none;
    box-shadow: 0 2px 5px rgba(213, 217, 217, 0.8);
}

/* Product Card */
.pp-product-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Product Image */
.pp-product-image {
    position: relative;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.pp-product-image img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.pp-quantity-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #007cba;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 124, 186, 0.4);
}

/* Product Info */
.pp-product-info {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pp-product-name {
    font-size: 12px;
    font-weight: 500;
    margin: 0 0 6px 0;
    line-height: 1.2;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
}

.pp-product-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

/* Product Prices */
.pp-product-prices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}

.pp-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 11px;
}

.pp-pack-price {
    color: #e74c3c;
    font-weight: 600;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pp-packs-container.pp-columns-2,
    .pp-packs-container.pp-columns-3,
    .pp-packs-container.pp-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .pp-section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .pp-pack-card {
        padding: 20px;
    }
    
    .pp-pack-title {
        font-size: 20px;
    }
    
    .pp-pack-title-container {
        justify-content: center;
        text-align: center;
    }
    
    /* Stack layout en móvil */
    .pp-pack-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .pp-pack-sidebar {
        width: 100%;
        order: 2;
    }
    
    .pp-products-section {
        order: 1;
    }
    
    .pp-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .pp-product-image img {
        height: 70px;
    }
    
    .pp-product-name {
        font-size: 11px;
        min-height: 25px;
    }
}

@media (max-width: 480px) {
    .pp-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .pp-pack-card {
        padding: 15px;
    }
    
    .pp-section-title {
        font-size: 20px;
    }
    
    .pp-pack-title {
        font-size: 18px;
    }
    
    .pp-discount-badge {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .pp-product-image img {
        height: 60px;
    }
    
    .pp-product-name {
        font-size: 10px;
        min-height: 20px;
    }
    
    .pp-pack-sidebar {
        padding: 15px;
    }
}

/* Estados de carga */
.pp-pack-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.pp-pack-card.loading .pp-add-pack-btn {
    background: #ccc;
    cursor: not-allowed;
}

/* Animaciones */
.pp-pack-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados de foco para accesibilidad */
.pp-add-pack-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.pp-product-name a:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Soporte para modo de alto contraste */
@media (prefers-contrast: high) {
    .pp-pack-card {
        border-width: 2px;
    }
    
    .pp-discount-badge {
        border: 2px solid #fff;
    }
    
    .pp-add-pack-btn {
        border: 2px solid #fff;
    }
}