/* Estilos adicionales para productos y administración */

/* Estilos para productos agotados y con poco stock */
.product-card {
    position: relative;
}

.product-card.out-of-stock {
    opacity: 0.7;
    border: 2px solid #dc3545;
}

.product-card.out-of-stock::before {
    content: "AGOTADO";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.stock-badge.low-stock {
    background: #ffc107;
    color: #212529;
}

.stock-badge.in-stock {
    background: #28a745;
    color: white;
}

.stock-badge.out-of-stock {
    background: #dc3545;
    color: white;
}

.product-stock {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 10px 0;
    font-weight: 500;
}

.btn-primary.disabled,
.btn-primary:disabled {
    background: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.6;
    border-color: #6c757d;
}

.btn-primary.disabled:hover,
.btn-primary:disabled:hover {
    background: #6c757d !important;
    transform: none;
    box-shadow: none;
}

/* Estilos para badges de productos */
.product-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
}

.badge.organic {
    background: #28a745;
    color: white;
}

.badge.stock.in-stock {
    background: #28a745;
    color: white;
}

.badge.stock.low-stock {
    background: #ffc107;
    color: #212529;
}

.badge.stock.out-of-stock {
    background: #dc3545;
    color: white;
}

/* Estilos para el emoji del producto */
.product-emoji {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Estilos para detalles del producto */
.product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
    margin: 10px 0;
    flex-wrap: wrap;
    gap: 5px;
}

.product-unit {
    font-weight: 600;
    color: #495057;
}

.product-origin {
    font-style: italic;
}

/* Estilos para acciones de productos */
.product-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.product-actions .btn-secondary,
.product-actions .btn-primary {
    flex: 1;
    min-width: 100px;
    font-size: 0.9rem;
    padding: 8px 12px;
}

/* Estilos para el modal de detalles del producto */
.product-detail-content {
    max-width: 600px;
    margin: 0 auto;
}

.product-detail-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.product-detail-image {
    flex-shrink: 0;
    text-align: center;
}

.product-emoji-large {
    font-size: 5rem;
    display: block;
}

.product-detail-info h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.product-detail-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.product-detail-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a7c59;
    margin: 10px 0;
}

.product-detail-stock {
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.detail-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-section h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    padding-left: 20px;
    color: #495057;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.product-detail-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    margin-top: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-controls button {
    background: #4a7c59;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.quantity-controls button:hover {
    background: #3d6b4a;
}

.quantity-controls input {
    border: none;
    width: 60px;
    text-align: center;
    padding: 8px;
    font-size: 1rem;
    background: white;
}

.btn-add-to-cart {
    flex: 1;
    min-width: 150px;
}

/* Responsive design */
@media (max-width: 768px) {
    .product-detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .product-detail-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .quantity-selector {
        justify-content: center;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn-secondary,
    .product-actions .btn-primary {
        min-width: auto;
    }
    
    .product-badges {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .product-emoji {
        font-size: 2.5rem;
    }
    
    .product-emoji-large {
        font-size: 4rem;
    }
    
    .product-detail-info h2 {
        font-size: 1.5rem;
    }
    
    .product-detail-price {
        font-size: 1.3rem;
    }
    
    .detail-section {
        padding: 10px;
    }
}
