/* ==========================================================================
   CE Plus Widgets — Product Overlay Interactive v1.1.1
   ========================================================================== */

/* --------------------------------------------------------------------------
   RESET CONTAINER CE
   -------------------------------------------------------------------------- */
.elementor-widget-product-overlay > .elementor-widget-container {
    padding: 0 !important;
}

/* --------------------------------------------------------------------------
   CSS CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
/* Solo se mantienen las que se usan en el CSS: zoom y transition */
.poi-item {
    --poi-zoom:       1.04;
    --poi-transition: 0.35s;
}

/* --------------------------------------------------------------------------
   CONTENEDOR RAÍZ
   -------------------------------------------------------------------------- */
.poi-item {
    display: block;
    /*
     * cursor: el valor depende del click_mode:
     * - 'button-only': cursor default en el card, pointer solo en el botón
     * - 'full-card': cursor pointer cuando existe data-poi-href
     */
    cursor: default;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Full-card: toda la tarjeta es clickeable */
.poi-item[data-poi-href] {
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   WRAPPER DE IMAGEN
   -------------------------------------------------------------------------- */
.poi-image-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 3 / 4; /* fallback; CE lo sobreescribe con el valor del control */
}

/* --------------------------------------------------------------------------
   IMAGEN
   -------------------------------------------------------------------------- */
.poi-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition-property: transform;
    transition-timing-function: ease;
    transition-duration: var(--poi-transition, 0.35s);
}

.poi-no-image {
    width: 100%;
    height: 100%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.poi-no-image::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: .5;
}

/* --------------------------------------------------------------------------
   OVERLAY
   -------------------------------------------------------------------------- */
.poi-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background var(--poi-transition, 0.35s) ease;
    z-index: 2;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   ÍCONO INDICADOR
   La posición (top/bottom/left/right) se aplica como inline style desde PHP
   (función buildIndicatorStyle). Las clases de esquina son referencia visual.
   -------------------------------------------------------------------------- */
.poi-indicator {
    position: absolute;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.75);
    background-color: transparent;
    opacity: 1;
    transition: opacity var(--poi-transition, 0.35s) ease;
}

.poi-indicator i,
.poi-indicator svg,
.poi-indicator img {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1;
}

/* --------------------------------------------------------------------------
   PANEL INFORMATIVO
   -------------------------------------------------------------------------- */
.poi-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1rem;
    transform: translateY(100%);
    transition: transform var(--poi-transition, 0.35s) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 4;
    pointer-events: none;
}

.poi-label {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.poi-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.poi-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;        /* El botón siempre tiene cursor pointer */
    pointer-events: auto;
    border-style: solid;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* --------------------------------------------------------------------------
   ESTADOS ACTIVOS
   Los colores por defecto se definen aquí.
   CE sobreescribe con mayor especificidad via .elementor-{id} wrapper.
   -------------------------------------------------------------------------- */

/* Desktop hover */
@media (hover: hover) {
    .poi-item:hover .poi-overlay   { background: rgba(0, 0, 0, 0.48); }
    .poi-item:hover .poi-image     { transform: scale(var(--poi-zoom, 1.04)); }
    .poi-item:hover .poi-panel     { transform: translateY(0); pointer-events: auto; }
    .poi-item:hover .poi-indicator { opacity: 0; }
    .poi-item:hover .poi-cta {
        background-color: rgba(255, 255, 255, 0.15);
        border-color:     rgba(255, 255, 255, 0.65);
    }
}

/* Mobile tap (.active inyectado por JS) */
.poi-item.active .poi-overlay   { background: rgba(0, 0, 0, 0.48); }
.poi-item.active .poi-image     { transform: scale(var(--poi-zoom, 1.04)); }
.poi-item.active .poi-panel     { transform: translateY(0); pointer-events: auto; }
.poi-item.active .poi-indicator { opacity: 0; }
.poi-item.active .poi-cta {
    background-color: rgba(255, 255, 255, 0.15);
    border-color:     rgba(255, 255, 255, 0.65);
}
