/**
 * Aromë Product Configurator - Styles
 * Color principal: #eaa2b1
 */

/* Main Container - Sin recuadro */
.arome-product-configurator {
    padding: 0;
    margin: 20px 0;
    background: transparent;
}

.arome-product-configurator h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-family: inherit; /* Use theme font, not Playfair Display */
    font-weight: 600;
    color: #333;
}

/* Option Lists */
.arome-option-list {
    margin-bottom: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: visible; /* Changed from hidden for sticky */
}

.arome-list-title {
    font-size: 1.1em;
    font-family: inherit; /* Use theme font, not Playfair Display */
    background-color: #fafafa; /* Changed from #f9f9f9 */
    border-radius: 5px;
    margin: 0;
    padding: 12px 15px;
    cursor: pointer;
    position: sticky;
    top: 100px; /* Sticky title: align with desktop for mobile/tablet */
    z-index: 8; /* Below progress bar (10) but above content */
    padding-right: 40px;
    transition: background-color 0.2s ease, border 0.2s ease;
    border: 2px solid transparent;
}

@media (min-width: 1024px) {
    .arome-list-title {
    top: 100px; /* Desktop position, below progress bar */
    }
}

.arome-list-title:hover {
    background-color: #f0f0f0;
}

/* Active/expanded list title */
.arome-list-title:not(.collapsed) {
    background-color: #f7dede;
    border-color: #eaa2b1;
}

.arome-list-title::after {
    content: '▼';
    font-size: 0.8em;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.arome-list-title.collapsed::after {
    transform: translateY(-50%) rotate(-90deg);
}

/* List Items Container */
.arome-list-items {
    padding: 15px;
    display: block;
}

.arome-list-items.collapsed {
    display: none;
}

/* Option Item */
.arome-option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #fafafa;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.arome-option-item:hover {
    background: #f5f5f5;
}

.arome-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.arome-item-name {
    font-weight: 600;
    font-size: 15px;
}

.arome-item-price {
    color: #666;
    font-size: 14px;
}

/* Item Controls */
.arome-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.arome-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #eaa2b1;
    background: #fff;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    color: #eaa2b1;
}

.arome-btn:hover:not(:disabled) {
    background: #eaa2b1;
    color: #fff;
    border-color: #eaa2b1;
}

.arome-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.arome-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.arome-item-quantity {
    width: 45px;
    height: 32px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    background: #fff;
    padding: 0 5px;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .arome-option-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .arome-item-controls {
        width: 100%;
        justify-content: flex-end;
    }
    
    .arome-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .arome-item-quantity {
        width: 40px;
        height: 28px;
        font-size: 14px;
    }
}

/* Summary - Sticky Box with Progress Bar */
.arome-configurator-summary {
    position: sticky;
    top: 10px; /* Unified sticky position (mobile/tablet/desktop) */
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 2px solid #eaa2b1;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(234, 162, 177, 0.15);
    z-index: 10;
}

/* Asegurar que el contenedor padre no corte el sticky */
.product .summary.entry-summary,
.product .entry-summary,
.product form.cart {
    overflow: visible !important;
}

@media (min-width: 1024px) {
    .arome-configurator-summary {
    top: 10px; /* Desktop position */
    }
}

.summary-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.summary-units {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.summary-price {
    font-size: 1.3em;
    font-weight: bold;
    color: #eaa2b1;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: #eaa2b1;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.progress-bar-fill.completed {
    background: #10b981;
}

/* Remove old styles */
.total-unidades {
    display: none;
}

.resumen-total {
    display: none;
}

/* Error Message */
#arome-error-msg {
    margin-bottom: 15px;
}

/* Hide native WooCommerce price if configurator is active */
.product.has-arome-configurator p.price {
    display: none !important;
}

/* Hide native quantity selector if configurator is active */
.product.has-arome-configurator form.cart .quantity {
    display: none !important;
}

/* Spread/Untado Selector */
.arome-spread-selector {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.arome-spread-title {
    font-size: 1.3em; /* Same as h3 */
    font-family: inherit; /* Use theme font, not Playfair Display */
    font-weight: 600; /* Same as h3 */
    margin-bottom: 15px;
    color: #333;
}

.arome-spread-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.arome-spread-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fafafa;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.arome-spread-option:hover {
    background: #f5f5f5;
    border-color: #eaa2b1;
}

.arome-spread-option.selected {
    background: #f7dede;
    border-color: #eaa2b1;
}

.arome-spread-option input[type="radio"] {
    margin-right: 12px;
    accent-color: #eaa2b1;
    width: 15px; /* Reduced from 18px */
    height: 15px; /* Reduced from 18px */
    cursor: pointer;
    border: 2px solid #eaa2b1; /* Pink border instead of dark */
}

/* Custom radio button styling for better control */
.arome-spread-option input[type="radio"]:checked {
    background-color: #eaa2b1;
    border-color: #eaa2b1;
}

.arome-spread-label {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.arome-spread-price {
    color: #eaa2b1;
    font-weight: 600;
    font-size: 14px;
}

