/* Auxi - Agrupador de productos: opciones en la ficha.
   Las opciones se muestran como pastillas, en la linea de los botones que ya
   usa la web en otras partes del catalogo. */

.agp-selector {
    margin: 0 0 1.4em;
    padding: 16px 18px 14px;
    border: 1px solid #e6dfe2;
    border-radius: 12px;
    background: #fff;
}

.agp-selector:empty {
    display: none;
}

.agp-attribute {
    margin-bottom: 0.9em;
}

.agp-attribute__label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.45em;
    font-size: 0.95em;
}

.agp-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.45em;
    align-items: stretch;
}

.agp-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45em;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    padding: 0.5em 1.05em;
    border: 1px solid #e3dcdf;
    border-radius: 999px;
    background: #fbf8f9;
    color: #6d2b4c;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.25;
    font-size: 0.95em;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.agp-option:hover,
.agp-option:focus-visible {
    border-color: #6d2b4c;
    background: #fff;
}

.agp-option.is-selected {
    border-color: #6d2b4c;
    background: #6d2b4c;
    color: #fff;
    font-weight: 600;
}

.agp-option.is-selected .agp-option__price {
    color: #fff;
}

.agp-option__name {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .agp-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.agp-option__price {
    font-size: 0.9em;
    opacity: 0.85;
    white-space: nowrap;
}

.agp-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.agp-option.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.agp-option.is-disabled,
.agp-option[aria-disabled="true"] {
    opacity: 0.4;
    text-decoration: line-through;
    cursor: not-allowed;
}

.agp-state {
    margin-top: 0.65em;
    font-size: 0.9em;
    min-height: 1.4em;
}

.agp-state__sku {
    margin-right: 0.9em;
    opacity: 0.8;
}

.agp-state .stock {
    margin: 0;
    display: inline;
    padding: 0;
    background: none;
    font-weight: 600;
}

.agp-state .stock.in-stock {
    color: #2e7d32;
}

.agp-state .stock.out-of-stock {
    color: #b3261e;
}

.agp-message {
    margin-top: 0.5em;
    font-weight: 600;
    color: #b3261e;
}

.agp-elementor-hint {
    padding: 10px 12px;
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
    color: #50575e;
    font-size: 0.9em;
}

/* Panel del editor de producto */
.agp-panel-box__status {
    font-size: 14px;
}

.agp-panel-box__status--empty {
    color: #50575e;
}

.agp-panel-box__link {
    margin-left: 8px;
}

.agp-panel-section {
    margin: 18px 0;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.agp-panel-section h4 {
    margin: 0 0 4px;
    font-size: 14px;
}

.agp-attr-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.agp-attr-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}

.agp-attr-option em {
    font-style: normal;
    font-size: 11px;
    color: #6b7280;
}

.agp-options-table {
    margin-top: 10px;
}

.agp-options-table td {
    vertical-align: middle;
}

.agp-option-photo .agp-image-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    cursor: pointer;
    padding: 0;
}

.agp-option-photo img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.agp-option-photo .agp-image-placeholder {
    color: #8c8f94;
}

.agp-remove-option {
    color: #b32d2e;
}
