/* Afina — Muestras gratis */

#acp-samples-section {
    position: relative;
    margin: 16px 0 6px;
    background: #f8f9fc;
    border: 2px solid #e0e6f0;
    border-radius: 10px;
    padding: 10px 12px 8px;
}

/* ── Botón cerrar sección ── */
#acp-samples-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #1d3461;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
    z-index: 10;
}
#acp-samples-close:hover { background: #f5c200; }

/* Cabecera */
.acp-samples-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-right: 32px;
}
.acp-samples-icon { font-size: 1.3em; line-height: 1; flex-shrink: 0; }
.acp-samples-header h3 { margin: 0; font-size: 1em; color: #1d3461; }
.acp-samples-subtitle  { margin: 0; color: #555; font-size: 0.83em; }

/* ── WRAPPER carrusel + flechas ── */
#acp-carousel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Flechas estilo "Promociones" ── */
.acp-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1d3461;
    color: #fff;
    border: none;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.18s;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.acp-arrow:hover   { background: #f5c200; }
.acp-arrow:disabled { background: #c5cdd9; cursor: default; box-shadow: none; }

/* ── CARRUSEL ── */
#acp-samples-carousel {
    flex: 1;
    display: flex;
    align-items: stretch;
    gap: 12px;
    overflow: hidden;          /* ocultar scroll — se controla con flechas */
    scroll-behavior: smooth;
}

/* ── TARJETA ── exactamente 4 visibles */
.acp-sample-card {
    flex: 0 0 calc(25% - 9px); /* 4 tarjetas · gap 12px → (12*3)/4 = 9px */
    min-width: 0;
    background: #fff;
    border: 1px solid #dde3ee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s;
}
.acp-sample-card:hover { box-shadow: 0 3px 12px rgba(29,52,97,0.1); }

/* Imagen con badge */
.acp-sample-img-wrap { position: relative; line-height: 0; flex-shrink: 0; }
.acp-sample-img-wrap img {
    width: 100%;
    height: 105px;
    object-fit: cover;
    display: block;
}
.acp-gratis-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #1d3461;
    color: #fff;
    font-size: 0.68em;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 4px;
    letter-spacing: 0.07em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Info */
.acp-sample-info {
    padding: 5px 7px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 3px;
}
.acp-sample-name {
    margin: 0;
    font-size: 0.75em;
    font-weight: 600;
    color: #222;
    line-height: 1.15;
}

.acp-attrs-wrap { display: flex; flex-direction: column; gap: 2px; }

/* Diámetro fijo */
.acp-attr-fixed-row {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f0f3f9;
    border: 1px solid #dde3ee;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 0.69em;
}
.acp-attr-fixed-label { color: #777; flex-shrink: 0; }
.acp-attr-fixed-val   { font-weight: 700; color: #1d3461; }

/* Select granulometría */
.acp-attr-select-row { display: flex; flex-direction: column; gap: 1px; }
.acp-attr-select-label { font-size: 0.67em; color: #666; font-weight: 600; }
.acp-attr-choosable {
    width: 100%;
    font-size: 0.73em;
    padding: 3px 4px;
    border: 1px solid #cdd4e0;
    border-radius: 3px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
}
.acp-attr-choosable:focus   { outline: 2px solid #1d3461; border-color: #1d3461; }
.acp-attr-choosable.acp-err { border-color: #e74c3c !important; }

/* Footer */
.acp-card-footer { margin-top: auto; padding: 4px 7px 7px; }

/* Botón */
.acp-add-sample-btn {
    width: 100% !important;
    background: #1d3461 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 8px 6px !important;
    font-size: 0.74em !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    transition: background 0.18s !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    display: block !important;
    margin: 0 !important;
}
.acp-add-sample-btn:hover:not(:disabled) { background: #f5c200 !important; color: #fff !important; }
.acp-add-sample-btn:disabled { background: #b0b8c9 !important; color: #fff !important; cursor: not-allowed !important; }
.acp-add-sample-btn.acp-btn-added { background: #1e7e34 !important; }

/* Feedback */
.acp-sample-feedback {
    margin: 4px 0 0;
    font-size: 0.72em;
    min-height: 0.9em;
    color: #c0392b;
    font-weight: 500;
    line-height: 1.2;
}
.acp-sample-feedback.ok { color: #1e7e34; }

/* Contador */
#acp-samples-counter {
    text-align: right;
    font-size: 0.83em;
    color: #666;
    padding-top: 5px;
    border-top: 1px solid #dde3ee;
    margin-top: 6px;
}
#acp-counter-num { font-weight: 700; color: #1d3461; }

/* Badge GRATIS tabla carrito */
.acp-gratis-cart-badge {
    display: inline-block;
    background: #1d3461;
    color: #fff;
    font-size: 0.72em;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

/* ── Degradado borde derecho (indica contenido fuera de vista) ── */
#acp-carousel-wrap {
    position: relative;
}
#acp-carousel-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 44px; /* deja espacio a la flecha */
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, transparent, #f8f9fc);
    pointer-events: none;
    z-index: 1;
}

/* ── Hint deslizar: oculto en desktop, visible en móvil ── */
.acp-swipe-hint {
    display: none;
}

/* ── RESPONSIVE: móvil — 1 tarjeta visible, scroll táctil ── */
@media (max-width: 600px) {
    .acp-arrow { display: none; }          /* flechas ocultas; se desliza con el dedo */

    #acp-samples-carousel {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;                  /* scroll táctil activo */
    }

    .acp-sample-card {
        flex: 0 0 calc(100% - 0px);        /* 1 tarjeta ocupa todo el ancho */
        scroll-snap-align: start;
    }

    /* Ocultar degradado en móvil (con scroll snap no hace falta) */
    #acp-carousel-wrap::after { display: none; }

    /* Mostrar hint deslizar */
    .acp-swipe-hint {
        display: block;
        text-align: center;
        font-size: 0.78em;
        color: #888;
        margin: 5px 0 0;
        letter-spacing: 0.03em;
    }
}

/* Animación desaparición */
#acp-samples-section.acp-hiding {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}
