/* ═══════════════════════════════════════════════════════════════
 *  AMD 3D Cotizador — Hero Header & Slider
 * ═══════════════════════════════════════════════════════════════ */

.amd3d-hero {
    position: relative;
    width: 100%;
    border-radius: var(--amd3d-radius-xl, 16px);
    overflow: hidden;
    margin-bottom: var(--amd3d-sp-8, 32px);
    background-color: #F1F5F9;
}

/* ── Base Image & Slide Image ── */
.amd3d-hero__bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ══════════════════════════════════════════════
 *  SLIDER TRACK & SLIDES
 * ══════════════════════════════════════════════ */
.amd3d-hero__track {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.amd3d-hero__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.75s ease-in-out, visibility 0.75s ease-in-out;
    z-index: 1;
}

.amd3d-hero__slide--active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.amd3d-hero__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ── Slider Arrows (Desktop only) ── */
.amd3d-hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #334155;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
}

.amd3d-hero:hover .amd3d-hero__arrow {
    opacity: 1;
}

.amd3d-hero__arrow:hover {
    background: #FFFFFF;
    color: #5a53a0;
    box-shadow: 0 6px 20px rgba(90, 83, 160, 0.25);
    transform: translateY(-50%) scale(1.08);
}

.amd3d-hero__arrow--prev { left: 18px; }
.amd3d-hero__arrow--next { right: 18px; }

/* ── Slider Dots ── */
.amd3d-hero__dots {
    position: absolute;
    bottom: 84px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.amd3d-hero__dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}

.amd3d-hero__dot--active,
.amd3d-hero__dot:hover {
    width: 24px;
    background: #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ══════════════════════════════════════════════
 *  SEARCH BAR OVERLAY
 * ══════════════════════════════════════════════ */
.amd3d-hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 24px 28px 24px;
    background: linear-gradient(
        to bottom,
        transparent 35%,
        rgba(255, 255, 255, 0.10) 65%,
        rgba(255, 255, 255, 0.55) 100%
    );
    z-index: 4;
    pointer-events: none; /* Allows swipe gestures to reach slider */
}

.amd3d-hero__search {
    pointer-events: auto;
    width: 100%;
}

/* ── Search Sizes ── */
.amd3d-hero__search--sm { max-width: 440px; }
.amd3d-hero__search--md { max-width: 600px; }
.amd3d-hero__search--lg { max-width: 760px; }
.amd3d-hero__search--xl { max-width: 920px; }

.amd3d-hero__search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 9999px;
    box-shadow: 0 10px 30px -4px rgba(90, 83, 160, 0.22), 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 2px solid rgba(90, 83, 160, 0.16);
    transition: all 0.25s ease;
}

.amd3d-hero__search-wrap:focus-within {
    border-color: #5a53a0;
    box-shadow: 0 12px 36px -4px rgba(90, 83, 160, 0.32), 0 0 0 4px rgba(90, 83, 160, 0.12);
}

.amd3d-hero__search-icon {
    position: absolute;
    left: 18px;
    width: 20px;
    height: 20px;
    color: #5a53a0;
    pointer-events: none;
    flex-shrink: 0;
}

.amd3d-hero__search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-family: inherit;
    font-size: 15px !important;
    color: #1E293B !important;
    padding: 14px 16px 14px 50px !important;
    min-width: 0;
    height: auto !important;
    box-shadow: none !important;
}

.amd3d-hero__search-input::placeholder {
    color: #94A3B8;
}

.amd3d-hero__search-btn {
    flex-shrink: 0;
    border: none;
    background: #5a53a0;
    color: #FFFFFF !important;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    padding: 11px 24px;
    margin: 4px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.amd3d-hero__search-btn:hover {
    background: #49428c;
    box-shadow: 0 2px 8px rgba(90, 83, 160, 0.3);
}

/* ── Size-Specific Inputs ── */
.amd3d-hero__search--sm .amd3d-hero__search-input { font-size: 13.5px !important; padding: 11px 14px 11px 44px !important; }
.amd3d-hero__search--sm .amd3d-hero__search-btn   { padding: 9px 18px; font-size: 12.5px; }
.amd3d-hero__search--sm .amd3d-hero__search-icon  { width: 17px; height: 17px; left: 15px; }

.amd3d-hero__search--lg .amd3d-hero__search-input { font-size: 17px !important; padding: 18px 20px 18px 56px !important; }
.amd3d-hero__search--lg .amd3d-hero__search-btn   { padding: 15px 32px; font-size: 15px; }

.amd3d-hero__search--xl .amd3d-hero__search-input { font-size: 19px !important; padding: 20px 24px 20px 62px !important; }
.amd3d-hero__search--xl .amd3d-hero__search-btn   { padding: 17px 36px; font-size: 16px; }
.amd3d-hero__search--xl .amd3d-hero__search-icon  { width: 24px; height: 24px; left: 20px; }

/* ══════════════════════════════════════════════
 *  TABLET & MOBILE OPTIMIZATIONS
 * ══════════════════════════════════════════════ */
/* Tablet Portrait & Mobile (<= 1024px) */
@media (max-width: 1024px) {
    /* Focal point: Align to left so the "Tinita Lab" logo is never cut */
    .amd3d-hero__bg,
    .amd3d-hero__slide img {
        object-position: left center !important;
    }

    .amd3d-hero__arrow {
        width: 38px;
        height: 38px;
    }
    .amd3d-hero__arrow--prev { left: 10px; }
    .amd3d-hero__arrow--next { right: 10px; }
}

/* Mobile Devices (<= 640px) */
@media (max-width: 640px) {
    /* Hide bulky desktop arrows on touch screens */
    .amd3d-hero__arrow {
        display: none !important;
    }

    /* Adjust overlay and dots on mobile */
    .amd3d-hero__overlay {
        padding: 0 12px 14px 12px;
    }

    .amd3d-hero__dots {
        bottom: 58px;
    }

    .amd3d-hero__search-wrap {
        box-shadow: 0 6px 20px rgba(90, 83, 160, 0.2);
    }

    .amd3d-hero__search-input {
        font-size: 13.5px !important;
        padding: 10px 12px 10px 42px !important;
    }

    .amd3d-hero__search-icon {
        left: 14px;
        width: 17px;
        height: 17px;
    }

    .amd3d-hero__search-btn {
        padding: 9px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .amd3d-hero {
        border-radius: 12px;
    }
}
