/**
 * CSS frontend para Ordine Privato Herbalife
 */
/* Reimpostazioni e variabili */
:root {
    --oph-primary-color: #076822; /* Verde Herbalife */
    --oph-secondary-color: #1eac46; /* Verde chiaro Herbalife */
    --oph-accent-color: #25D366; /* Verde WhatsApp */
    --oph-accent-dark-color: #128C7E; /* Verde scuro WhatsApp */
    --oph-light-color: #f9f9f9;
    --oph-gray-color: #f0f0f0;
    --oph-dark-color: #333333;
    --oph-border-color: #ddd;
    --oph-border-radius: 8px;
    --oph-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --oph-transition: all 0.3s ease;
    
    /* Colori personalizzabili dei bottoni */
    --oph-button-view-bg: #f8f9fa;
    --oph-button-view-text: #333333;
    --oph-button-add-bg: #076822;
    --oph-button-add-text: #ffffff;
    --oph-button-view-hover-bg: #e2e6ea;
    --oph-button-view-hover-text: #333333;
    --oph-button-add-hover-bg: #1eac46;
    --oph-button-add-hover-text: #ffffff;
}
/* Layout principal */
.oph-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--oph-dark-color);
}
.oph-columns {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}
.oph-column {
    flex: 1;
    min-width: 300px;
    padding: 10px;
    box-sizing: border-box;
}
.oph-column-products {
    flex: 2;
}
.oph-column-order {
    flex: 1;
}
@media (max-width: 768px) {
    .oph-column {
        flex: 100%;
    }
}
/* Sección búsqueda y categorías */
.oph-search-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--oph-light-color);
    border-radius: var(--oph-border-radius);
    box-shadow: var(--oph-box-shadow);
}
.oph-search-box {
    flex: 1;
    display: flex;
    min-width: 250px;
}
.oph-search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--oph-border-color);
    border-right: none;
    border-radius: var(--oph-border-radius) 0 0 var(--oph-border-radius);
    outline: none;
    font-size: 16px;
}
.oph-search-box button {
    padding: 10px 15px;
    background-color: var(--oph-primary-color);
    color: white;
    border: 1px solid var(--oph-primary-color);
    border-radius: 0 var(--oph-border-radius) var(--oph-border-radius) 0;
    cursor: pointer;
    transition: var(--oph-transition);
}
.oph-search-box button:hover {
    background-color: var(--oph-secondary-color);
}
.oph-categories {
    flex: 1;
    min-width: 250px;
}
.oph-categories select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--oph-border-color);
    border-radius: var(--oph-border-radius);
    outline: none;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
}
/* Cuadrícula de productos */
.oph-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.oph-product {
    background-color: white;
    border-radius: var(--oph-border-radius);
    box-shadow: var(--oph-box-shadow);
    overflow: hidden;
    transition: var(--oph-transition);
}
.oph-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}
.oph-product-image {
    height: 200px;
    overflow: hidden;
    background-color: var(--oph-light-color);
    display: flex;
    align-items: center;
    justify-content: center;
}
.oph-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--oph-transition);
}
.oph-product:hover .oph-product-image img {
    transform: scale(1.05);
}
.oph-product-info {
    padding: 15px;
}
.oph-product-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--oph-dark-color);
    height: 2.4em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.oph-product-price {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--oph-primary-color);
}
.oph-product-description {
    margin: 0 0 15px;
    font-size: 14px;
    color: #666;
    height: 3.6em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.oph-product-actions {
    display: flex;
    gap: 10px;
}
.oph-product-actions button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--oph-transition);
}
/* Bottoni - assicurati che questi stili abbiano priorità */
.oph-view-product {
    background-color: var(--oph-button-view-bg) !important;
    color: var(--oph-button-view-text) !important;
    border: 1px solid var(--oph-border-color) !important;
}
.oph-view-product:hover {
    background-color: var(--oph-button-view-hover-bg) !important;
    color: var(--oph-button-view-hover-text) !important;
}
.oph-add-to-cart {
    background-color: var(--oph-button-add-bg) !important;
    color: var(--oph-button-add-text) !important;
    border: none !important;
}
.oph-add-to-cart:hover {
    background-color: var(--oph-button-add-hover-bg) !important;
    color: var(--oph-button-add-hover-text) !important;
}
/* Paginación */
.oph-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}
.oph-pagination button {
    padding: 8px 15px;
    background-color: var(--oph-light-color);
    color: var(--oph-dark-color);
    border: 1px solid var(--oph-border-color);
    border-radius: var(--oph-border-radius);
    cursor: pointer;
    transition: var(--oph-transition);
}
.oph-pagination button:hover:not([disabled]) {
    background-color: var(--oph-gray-color);
}
.oph-pagination button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.oph-pagination-info {
    font-size: 14px;
    color: #666;
}
/* Carrito */
.oph-cart-widget {
    margin-bottom: 30px;
}
.oph-cart {
    background-color: white;
    border-radius: var(--oph-border-radius);
    box-shadow: var(--oph-box-shadow);
    overflow: hidden;
}
.oph-cart-header {
    padding: 15px;
    background-color: var(--oph-primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.oph-cart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.oph-cart-count {
    font-size: 14px;
    background-color: white;
    color: var(--oph-primary-color);
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
}
.oph-cart-empty {
    padding: 30px 15px;
    text-align: center;
    color: #666;
}
.oph-cart-items {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}
.oph-cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--oph-border-color);
}
.oph-cart-item:last-child {
    border-bottom: none;
}
.oph-cart-item-image {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
    background-color: var(--oph-light-color);
    display: flex;
    align-items: center;
    justify-content: center;
}
.oph-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.oph-cart-item-no-image {
    width: 100%;
    height: 100%;
    background-color: var(--oph-gray-color);
}
.oph-cart-item-info {
    flex: 1;
}
.oph-cart-item-title {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
}
.oph-cart-item-price {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--oph-primary-color);
}
.oph-cart-item-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.oph-cart-item-quantity {
    flex: 1;
}
.oph-cart-quantity {
    width: 60px;
    padding: 5px;
    border: 1px solid var(--oph-border-color);
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}
.oph-remove-from-cart {
    background-color: transparent;
    color: #cc0000;
    border: none;
    padding: 5px;
    cursor: pointer;
    transition: var(--oph-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 38.5px;
}
.oph-remove-from-cart:hover {
    color: #ff0000;
}
.oph-cart-item-subtotal {
    font-size: 14px;
    color: #666;
}

/* Stile per le sezioni di spedizione e subtotal */
.oph-cart-subtotal,
.oph-cart-shipping {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--oph-border-color);
}

.oph-cart-shipping {
    flex-wrap: wrap;
}

.oph-cart-shipping-label {
    font-weight: 600;
    width: 30%;
}

.oph-cart-shipping-method {
    width: 70%;
    text-align: right;
    font-size: 13px;
    color: #666;
}

.oph-cart-shipping-amount {
    width: 100%;
    text-align: right;
    margin-top: 5px;
    font-weight: 600;
}

.oph-cart-subtotal-label,
.oph-cart-total-label {
    font-weight: 600;
}

.oph-cart-footer {
    padding: 15px;
    background-color: var(--oph-light-color);
    border-top: 1px solid var(--oph-border-color);
}

.oph-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--oph-border-color);
}

.oph-cart-total-amount {
    font-weight: 700;
    color: var(--oph-primary-color);
    font-size: 18px;
}

/* Formulario de pedido */
.oph-order-form {
    background-color: white;
    border-radius: var(--oph-border-radius);
    box-shadow: var(--oph-box-shadow);
    overflow: hidden;
}
.oph-order-form-intro {
    padding: 15px;
    background-color: var(--oph-primary-color);
    color: white;
}
.oph-order-form-intro p:first-child {
    margin-top: 0;
}
.oph-order-form-intro p:last-child {
    margin-bottom: 0;
}
#oph-customer-info-form {
    padding: 20px;
}
.oph-form-field {
    margin-bottom: 15px;
}
.oph-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}
.oph-form-field input,
.oph-form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--oph-border-color);
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}
.oph-form-field textarea {
    resize: vertical;
    min-height: 100px;
}
/* Campos de dirección */
.oph-address-fields {
    margin-bottom: 15px;
    padding: 15px;
    background-color: var(--oph-light-color);
    border-radius: 4px;
}
.oph-address-fields h4 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--oph-border-color);
    font-size: 16px;
    color: var(--oph-dark-color);
}
/* Modificato per rimuovere il display flex dalla riga degli indirizzi */
.oph-address-row {
    display: block;
    margin-bottom: 0;
}
/* Rimozione delle proprietà di larghezza per i campi all'interno della riga */
.oph-address-row .oph-form-field {
    width: 100%;
    min-width: unset;
}
.oph-address-field-full {
    width: 100%;
}
.oph-form-submit {
    margin-top: 20px;
    text-align: center;
}
/* Sistemato per mantenere i colori del pulsante anche durante focus/active */
button#oph-send-order {
    color: #076822 !important;
    border: 1px solid #076822 !important;
    background-color: transparent !important;
}
button#oph-send-order:hover,
button#oph-send-order:focus,
button#oph-send-order:active {
    color: #fff !important;
    background-color: #1eac46 !important;
    border-color: #1eac46 !important;
}
.oph-whatsapp-button {
    display: flex;
    width: 100%;
    padding: 12px 20px;
    background-color: var(--oph-accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--oph-transition);
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.oph-whatsapp-button:hover,
.oph-whatsapp-button:focus,
.oph-whatsapp-button:active {
    background-color: var(--oph-accent-dark-color);
    color: white !important;
}
.oph-whatsapp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}
.oph-whatsapp-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}
/* Modal de producto */
.oph-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 5px;
    box-sizing: border-box;
}
.oph-modal-content {
    position: relative;
    background-color: white;
    border-radius: var(--oph-border-radius);
    box-shadow: var(--oph-box-shadow);
    margin: 50px auto;
    max-width: 800px;
    overflow: hidden;
}
.oph-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: var(--oph-transition);
    z-index: 1;
}
.oph-modal-close:hover {
    color: #000;
}
.oph-modal-body {
    padding: 25px;
}
.oph-modal-product {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.oph-modal-product-image {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    height: 300px;
    overflow: hidden;
    background-color: var(--oph-light-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.oph-modal-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.oph-modal-product-info {
    flex: 1;
    min-width: 300px;
}
.oph-modal-product-title {
    margin: 0 0 15px;
    font-size: 24px;
    font-weight: 600;
}
.oph-modal-product-description {
    margin: 0 0 20px;
    line-height: 1.5;
    color: #666;
}
.oph-modal-product-price {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--oph-primary-color);
}
.oph-modal-variations {
    margin-bottom: 20px;
}
.oph-variations-selectors {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}
.oph-variation-selector {
    margin-bottom: 15px;
}
.oph-variation-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.oph-variation-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--oph-border-color);
    border-radius: 4px;
    background-color: white;
}
.oph-modal-product-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}
.oph-modal-product-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}
.oph-modal-product-quantity label {
    font-weight: 600;
}
.oph-modal-product-quantity input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid var(--oph-border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}
.oph-modal-add-to-cart {
    padding: 10px 20px;
    background-color: var(--oph-button-add-bg) !important;
    color: var(--oph-button-add-text) !important;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--oph-transition);
}
.oph-modal-add-to-cart:hover {
    background-color: var(--oph-button-add-hover-bg) !important;
}
.oph-modal-add-to-cart:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
}
/* Loading y notificaciones */
.oph-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: #666;
    font-size: 16px;
    gap: 10px;
}
.oph-loading .dashicons {
    animation: spin 1.5s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.oph-error,
.oph-no-products {
    padding: 30px;
    text-align: center;
    color: #666;
    font-size: 16px;
}
.oph-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    display: none;
    max-width: 300px;
}
.oph-notification-success {
    background-color: var(--oph-secondary-color);
}
.oph-notification-error {
    background-color: #cc0000;
}
/* Responsividad */
@media (max-width: 768px) {
    .oph-columns {
        flex-direction: column;
    }
    
    .oph-column {
        width: 100%;
        min-width: 100%;
    }
    
    .oph-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .oph-modal-product {
        flex-direction: column;
    }
    
    .oph-modal-product-image {
        max-width: 100%;
    }
}
/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
/* Estilo para el botón de pedido privado */
.oph-private-order-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #25D366;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    margin: 0; /* Eliminado el margin-top por defecto */
    width: 100%;
}
.oph-private-order-button:hover {
    background-color: #128C7E;
    color: #ffffff !important;
}
.oph-private-order-button-wrapper {
    margin: 0;
}
/* Estilo para el combo de variaciones */
.oph-variation-summary {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.oph-variation-summary-text {
    font-weight: 600;
}
.oph-variation-summary-price {
    color: var(--oph-primary-color);
    font-weight: 700;
}