/* ================================================================
   ICE Elementor Addons — Frontend Styles
   ================================================================ */

.ice-product-card-widget {
    position: relative;
    display: block;
}

/* ── Wrapper ───────────────────────────────── */
.ice-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

/* ── Card ──────────────────────────────────── */
.ice-card-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8344e;
    transition: transform 0.4s cubic-bezier(.34,1.56,.64,1),
                box-shadow 0.4s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}



.ice-card-wrapper:hover .ice-card-inner {
    transform: translateY(-6px);
    box-shadow: 0 18px 48px rgba(0,0,0,0.22);
    overflow: visible;
    /* Allow cap to overflow top by 25%, clip sides and bottom */
    clip-path: inset(-25% 0 0 0 round 20px);
}

/* ── SVG Deco ──────────────────────────────── */
.ice-card-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.ice-deco-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
}

/* ── Floating accents ──────────────────────── */
.ice-card-floats {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
/* Floating accents stay visible on hover */
/* .ice-card-wrapper:hover .ice-card-floats { opacity: 0; } */

.ice-float {
    position: absolute;
    width: 55px;
    height: 55px;
    object-fit: contain;
    transition: transform 0.5s ease, opacity 0.4s ease;
    pointer-events: none;
}

/* Each corner gets a unique scattered position — not centered, not perfectly cornered */
.ice-float--tl {
    top: 4%;
    left: 3%;
    transform: rotate(-25deg) scale(0.9);
    width: 28%;
    height: 28%;
}
.ice-float--tr {
    top: 2%;
    right: 2%;
    transform: rotate(18deg) scale(0.85);
    width: 24%;
    height: 24%;
}
.ice-float--bl {
    bottom: 5%;
    left: 4%;
    transform: rotate(12deg) scale(1);
    width: 30%;
    height: 30%;
}
.ice-float--br {
    bottom: 3%;
    right: 3%;
    transform: rotate(-15deg) scale(0.8);
    width: 22%;
    height: 22%;
}

/* ── Hero ──────────────────────────────────── */
.ice-card-hero {
    position: relative;
    z-index: 3;
    width: 72%;
    height: 72%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.ice-hero-fruit,
.ice-hero-product {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.34,1.56,.64,1);
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
}

/* Default: fruit visible, product hidden */
.ice-hero-fruit   { opacity: 1; transform: scale(1);    }
.ice-hero-product {
    opacity: 0;
    transform: scale(0.9) translateX(-50%);
    position: absolute;
    top: 50%;
    left: 50%;
    translate: 0 -50%;
    width: 80%;
    height: auto;
    max-width: none;
    object-fit: contain;
}

/* Hover: swap */
.ice-card-wrapper:hover .ice-hero-fruit   { opacity: 0; transform: scale(1.1); }
.ice-card-wrapper:hover .ice-hero-product {
    opacity: 1;
    /* Shift up so cap exits top, bottle body fills card, base clips at bottom */
    transform: scale(1) translateX(-50%);
    top: 15%;
    translate: 0 0;
}

/* Remove the duplicate block added by mistake */

/* Placeholder when no images */
.ice-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-family: sans-serif;
}

/* ── Footer ────────────────────────────────── */
.ice-card-footer {
    width: 100%;
    padding: 14px 4px 4px;
    text-align: center;
}

.ice-card-flavor-name {
    font-family: 'Arial Black', 'Arial Bold', Arial, sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 1.25rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a3a8f;
    margin: 0 0 6px;
}

.ice-card-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #444;
    margin: 0;
    font-family: Arial, sans-serif;
}

/* ── Variants Popup ────────────────────────── */
.ice-variants-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.ice-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ice-popup-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 28px;
    padding: 56px 48px 40px;
    width: min(920px, 94vw);
    text-align: center;
    box-shadow: 0 40px 100px rgba(0,0,0,0.25);
    animation: ice-pop-in 0.35s cubic-bezier(.34,1.56,.64,1) forwards;
    overflow: hidden;
}

@keyframes ice-pop-in {
    from { transform: translate(-50%,-50%) scale(0.88); opacity: 0; }
    to   { transform: translate(-50%,-50%) scale(1);    opacity: 1; }
}

/* Close button */
.ice-popup-close {
    position: absolute;
    top: 16px; right: 20px;
    background: none; border: none;
    font-size: 22px; cursor: pointer;
    color: #bbb; line-height: 1;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.2s, background 0.2s;
}
.ice-popup-close:hover { color: #333; background: #f3f4f6; }

/* ── Carousel ──────────────────────────────── */
.ice-popup-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    position: relative;
}

.ice-carousel-track {
    position: relative;
    height: 420px;
    width: 100%;
    overflow: hidden;
}

.ice-carousel-slide {
    position: absolute;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 40%;
    height: 100%;
    transform-origin: center bottom;
    will-change: left, transform, opacity;
}

.ice-carousel-slide img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 16px 32px rgba(0,0,0,0.15));
    display: block;
}

/* Nav buttons — floating on sides */
.ice-carousel-prev,
.ice-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #1a3a8f;
    color: #fff;
    border: none;
    font-size: 30px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(26,58,143,0.35);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    line-height: 1;
}
.ice-carousel-prev { left: -10px; }
.ice-carousel-next { right: -10px; }
.ice-carousel-prev:hover,
.ice-carousel-next:hover {
    background: #e8344e;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 8px 24px rgba(232,52,78,0.4);
}

/* ── Popup footer ──────────────────────────── */
.ice-popup-title {
    font-family: 'Arial Black', 'Arial Bold', Arial, sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 2.2rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a3a8f;
    margin: 0 0 16px;
}

.ice-popup-variant-name {
    display: inline-block;
    background: #f3f4f6;
    border-radius: 50px;
    padding: 10px 32px;
    font-size: 1rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 0;
    min-width: 120px;
    transition: all 0.3s ease;
}



@media (max-width: 768px) {
    .ice-card-flavor-name { font-size: 1rem; }
    .ice-card-description { font-size: 0.78rem; }
}

/* ================================================================
   ICE Data Table Widget
   ================================================================ */

.ice-table-wrap {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 40px 36px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 24px rgba(0,0,0,0.07);
}

/* Use a real table with border-spacing for row gaps */
.ice-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 3px; /* vertical gap between rows */
    font-family: inherit;
    table-layout: auto;
}

/* ── Header ─────────────────────────────── */
/* Reset ALL browser default table borders first */
.ice-table,
.ice-table thead,
.ice-table tbody,
.ice-table tr,
.ice-table th,
.ice-table td {
    border: none;
    border-collapse: inherit;
}

.ice-table-head th {
    font-size: 1rem;
    font-weight: 700;
    color: #111111;
    padding: 0 24px 22px 24px;
    vertical-align: bottom;
    line-height: 1.3;
    white-space: normal;
    background: transparent;
    /* ONLY a bottom border — nothing else */
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1.5px solid #e5e7eb !important;
    box-shadow: none;
    outline: none;
}

.ice-table-head th:first-child {
    padding-left: 20px;
}

/* Spacer row — completely invisible */
.ice-table-head-spacer td {
    height: 16px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* ── Body cells ─────────────────────────── */
.ice-table-body td {
    font-size: 0.975rem;
    color: #111111;
    padding: 20px 24px;
    vertical-align: middle;
    line-height: 1.4;
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    transition: background 0.15s;
}

.ice-table-body td:first-child {
    padding-left: 20px;
    text-align: left;
}

/* ── Normal rows ────────────────────────── */
.ice-table-row td {
    background: transparent;
}

/* ── Highlighted rows ───────────────────── */
.ice-table-row.is-highlighted td {
    background-color: #f3f4f6;
}

.ice-table-row.is-highlighted td:first-child {
    border-radius: 12px 0 0 12px;
    padding-left: 20px;
}

.ice-table-row.is-highlighted td:last-child {
    border-radius: 0 12px 12px 0;
    padding-right: 20px;
}

/* First cell of every row is always bold */
.ice-table-row td:first-child {
    font-weight: 700;
}

/* is-bold makes ALL cells in the row bold */
.ice-table-row.is-bold td {
    font-weight: 700;
}

/* ── Footer Note ────────────────────────── */
.ice-table-note {
    margin-top: 28px;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 0;
    padding-left: 4px;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 768px) {
    .ice-table-wrap {
        padding: 24px 16px 20px;
        border-radius: 14px;
        overflow-x: auto;
    }
    .ice-table {
        min-width: 420px;
    }
    .ice-table-head th,
    .ice-table-body td {
        padding: 14px 12px;
        font-size: 0.85rem;
    }
}

/* ================================================================
   ICE Timeline Widget
   ================================================================ */

.ice-timeline {
    position: relative;
    box-sizing: border-box;
    padding: 0;
}

/* ── Vertical spine ────────────────────── */
.ice-tl-spine {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 7px; /* center of dot (dot=14px, so 7px) */
    width: 2px;
    background-color: #e5e7eb;
    border-radius: 2px;
    z-index: 0;
}

/* Hide the inner div — spine IS the line now */
.ice-tl-line { display: none; }

/* ── Each item ─────────────────────────── */
.ice-tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 14px 1fr;
    column-gap: 24px;
    align-items: start;
    margin-bottom: 40px;
    z-index: 1;
}

.ice-tl-item:last-child { margin-bottom: 0; }

/* ── Dot ───────────────────────────────── */
.ice-tl-dot-wrap {
    position: relative;
    width: 14px;
    display: flex;
    justify-content: center;
    padding-top: 10px; /* align dot with middle of year text */
}

.ice-tl-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #1a3a8f;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #1a3a8f;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
    position: relative;
    z-index: 2;
}

.ice-tl-item:hover .ice-tl-dot {
    transform: scale(1.4);
}

/* ── Body ──────────────────────────────── */
.ice-tl-body {
    min-width: 0;
}

.ice-tl-card {
    background: transparent;
}

/* ── Year ──────────────────────────────── */
.ice-tl-year {
    display: block;
    font-size: 1.75rem;
    font-weight: 900;
    color: #111111;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: inherit;
}

.ice-tl-year.is-badge {
    display: inline-block;
    background: #1a3a8f;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 10px;
    letter-spacing: 0.03em;
}

.ice-tl-year.is-box {
    display: inline-block;
    background: #1a3a8f;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
    letter-spacing: 0.04em;
}

/* ── Title ─────────────────────────────── */
.ice-tl-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111111;
    margin-bottom: 6px;
    line-height: 1.3;
}

/* ── Content text ──────────────────────── */
.ice-tl-content {
    font-size: 0.975rem;
    color: #444444;
    line-height: 1.7;
    margin: 0;
}

/* ══════════════════════════════════════════
   Layout: Alternate
══════════════════════════════════════════ */
.ice-tl-layout--alternate {
    padding: 0 0 0 0;
}

.ice-tl-layout--alternate .ice-tl-spine {
    left: 50%;
    transform: translateX(-50%);
}

.ice-tl-layout--alternate .ice-tl-item {
    grid-template-columns: 1fr 14px 1fr;
    column-gap: 20px;
}

.ice-tl-layout--alternate .ice-tl-item.ice-tl-side--left .ice-tl-dot-wrap {
    order: 2;
}
.ice-tl-layout--alternate .ice-tl-item.ice-tl-side--left .ice-tl-body {
    order: 1;
    text-align: right;
}

.ice-tl-layout--alternate .ice-tl-item.ice-tl-side--right .ice-tl-dot-wrap {
    order: 1;
}
.ice-tl-layout--alternate .ice-tl-item.ice-tl-side--right .ice-tl-body {
    order: 3;
}

/* ══════════════════════════════════════════
   Scroll Animation
══════════════════════════════════════════ */
.ice-tl-animate {
    opacity: 0;
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(.2,.8,.3,1);
}

.ice-tl-animate[data-anim="fade-up"]   { transform: translateY(28px); }
.ice-tl-animate[data-anim="fade-left"] { transform: translateX(-28px); }
.ice-tl-animate[data-anim="zoom"]      { transform: scale(0.95); }

.ice-tl-animate.is-visible {
    opacity: 1;
    transform: none;
}

.ice-tl-item:nth-child(1)  { transition-delay: 0ms; }
.ice-tl-item:nth-child(2)  { transition-delay: 100ms; }
.ice-tl-item:nth-child(3)  { transition-delay: 200ms; }
.ice-tl-item:nth-child(4)  { transition-delay: 300ms; }
.ice-tl-item:nth-child(5)  { transition-delay: 400ms; }
.ice-tl-item:nth-child(6)  { transition-delay: 500ms; }
.ice-tl-item:nth-child(7)  { transition-delay: 600ms; }
.ice-tl-item:nth-child(8)  { transition-delay: 700ms; }
.ice-tl-item:nth-child(9)  { transition-delay: 800ms; }
.ice-tl-item:nth-child(10) { transition-delay: 900ms; }

/* ── Responsive ────────────────────────── */
@media (max-width: 768px) {
    .ice-tl-layout--alternate .ice-tl-item {
        grid-template-columns: 14px 1fr;
    }
    .ice-tl-layout--alternate .ice-tl-spine {
        left: 7px;
        transform: none;
    }
    .ice-tl-layout--alternate .ice-tl-item.ice-tl-side--left .ice-tl-dot-wrap,
    .ice-tl-layout--alternate .ice-tl-item.ice-tl-side--right .ice-tl-dot-wrap {
        order: 1;
    }
    .ice-tl-layout--alternate .ice-tl-item.ice-tl-side--left .ice-tl-body,
    .ice-tl-layout--alternate .ice-tl-item.ice-tl-side--right .ice-tl-body {
        order: 2;
        text-align: left;
    }
    .ice-tl-year { font-size: 1.4rem; }
}
