/* ---------- Currency chart card (compact row + expandable detail) ---------- */

.zew-chart-card{
    background:#fff;
    border-radius:18px;
    box-shadow:0 5px 20px rgba(0,0,0,.05);
    position:relative;
    direction:rtl;
    font-family:inherit;
    overflow:hidden;
}

.zew-chart-card + .zew-chart-card{
    margin-top:10px;
}

.zew-chart-card__label{
    display:none;
    color:#8c8f94;
    font-size:12px;
    margin-bottom:4px;
}

/* --- compact row (always visible) --- */

.zew-chart-card__row{
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    padding:8px 6px !important;
    background:none;
    border:0;
    margin:0;
    cursor:pointer;
    font:inherit;
    direction:rtl;
    text-align:right;
    color:inherit;
    -webkit-tap-highlight-color:transparent;
}

.zew-chart-card__row-info{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:4px;
    flex:0 0 auto;
    min-width:0;
}

.zew-chart-card__row-name{
    font-size:13px;
    font-weight:600;
    color:#1d2327;
    white-space:nowrap;
}

.zew-chart-card__row-price{
    font-size:15px;
    font-weight:700;
    color:#1d2327;
    white-space:nowrap;
}

.zew-chart-card__row-price .unit{
    font-size:11px;
    font-weight:400;
    color:#8c8f94;
    margin-inline-start:3px;
}

.zew-chart-card__row-chart{
    flex:1 1 auto;
    height:42px;
    min-width:0;
    position:relative;
}

.zew-chart-card__row-chart canvas,
.zew-chart-card__chart canvas{
    display:block;
    width:100% !important;
    height:100% !important;
}

.zew-chart-card__row-aside{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:6px;
    flex:0 0 auto;
}

.zew-chart-card__icon{
    display:flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    border-radius:12px;
    background:#f0f0f1;
    color:#8c8f94;
}

.zew-chart-card[data-type="gold"] .zew-chart-card__icon{
    background:#fdf3dc;
    color:#c8912b;
}

.zew-chart-card[data-type="silver"] .zew-chart-card__icon{
    background:#eef0f3;
    color:#8a94a3;
}

.zew-chart-card[data-type="dollar"] .zew-chart-card__icon{
    background:#e4f7ea;
    color:#1a9c4b;
}

.zew-chart-card__pct{
    display:flex;
    align-items:center;
    gap:2px;
    font-size:11px;
    font-weight:700;
    padding:2px 6px;
    border-radius:20px;
    color:#8c8f94;
    background:#f0f0f1;
    white-space:nowrap;
}

.zew-chart-card__pct .arrow{
    transition:transform .15s ease;
}

.zew-chart-card__pct.up{
    color:#00a32a;
    background:#e4f7ea;
}

.zew-chart-card__pct.down{
    color:#d63638;
    background:#fbe6e6;
}

.zew-chart-card__pct.down .arrow{
    transform:rotate(180deg);
}

.zew-chart-card__pct.flat .arrow{
    display:none;
}

.zew-chart-card__chevron{
    flex:0 0 auto;
    color:#c3c4c7;
    transition:transform .25s ease;
}

.zew-chart-card.is-expanded .zew-chart-card__chevron{
    transform:rotate(-90deg);
}

/* --- expandable detail panel --- */

.zew-chart-card__detail{
    display:grid;
    grid-template-rows:0fr;
    transition:grid-template-rows .28s ease;
}

.zew-chart-card.is-expanded .zew-chart-card__detail{
    grid-template-rows:1fr;
}

.zew-chart-card__detail-inner{
    overflow:hidden;
    min-height:0;
}

.zew-chart-card__detail-head{
    padding:0 16px;
    border-top:1px solid #f0f0f1;
    padding-top:14px;
    margin:0 16px;
    text-align:center;
}

.zew-chart-card__name{
    color:#1d2327;
    font-size:14px;
    font-weight:700;
}

.zew-chart-card__desktop-price{
    display:none;
}

.zew-chart-card__tabs{
    display:flex;
    gap:4px;
    background:#f4f5f7;
    border-radius:999px;
    padding:4px;
    margin:14px 16px 0;
}

.zew-chart-card__tab{
    flex:1;
    border:0;
    background:none;
    padding:6px 8px !important;
    border-radius:999px !important;
    font:inherit;
    font-size:12px;
    font-weight:600;
    color:#6b7280;
    cursor:pointer;
    transition:background .15s ease, color .15s ease;
}

.zew-chart-card__tab.is-active{
    background:#d2d2d2;
    color:#fff;
}

.zew-chart-card__chart{
    height:150px;
    margin:14px 6px 8px;
    padding:0 10px;
    position:relative;
}

.zew-chart-card.is-loading .zew-chart-card__chart{
    opacity:.45;
}

.zew-chart-card__chart-empty{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#c3c4c7;
    font-size:12px;
}

.zew-chart-card__range{
    display:flex;
    justify-content:space-between;
    font-size:12px;
    color:#8c8f94;
    border-top:1px solid #f0f0f1;
    padding:12px 16px 0;
}

.zew-chart-card__range b{
    color:#1d2327;
    font-weight:600;
}

.zew-chart-card__range .max b{
    color:#00a32a;
}

.zew-chart-card__range .min b{
    color:#d63638;
}

@media (min-width:480px) and (max-width:767px){
    .zew-chart-card__row{
        padding:16px 18px;
    }

    .zew-chart-card__row-name{
        font-size:14px;
    }

    .zew-chart-card__row-price{
        font-size:17px;
    }
}

/* --- desktop/tablet: classic single, always-open card (no compact row) --- */

@media (min-width:768px){
    .zew-chart-card{
        padding:16px 16px 14px !important;
        text-align:center;
    }

    .zew-chart-card__row,
    .zew-chart-card__row-chart,
    .zew-chart-card__chevron{
        display:none !important;
    }

    .zew-chart-card__detail{
        display:block !important;
        grid-template-rows:unset;
        transition:none;
    }

    .zew-chart-card__detail-inner{
        overflow:visible;
    }

    .zew-chart-card__detail-head{
        border-top:0;
        margin:0;
        padding:0;
    }

    .zew-chart-card__label{
        display:block;
        font-size:11px;
        margin-bottom:2px;
    }

    .zew-chart-card__name{
        font-size:13px;
        margin-bottom:6px;
    }

    .zew-chart-card__desktop-price{
        display:flex;
        align-items:center;
        justify-content:center;
        gap:8px;
        margin-bottom:10px;
    }

    .zew-chart-card__desktop-price .value{
        font-size:21px;
        font-weight:700;
        color:#1d2327;
    }

    .zew-chart-card__desktop-price .unit{
        font-size:12px;
        font-weight:400;
        color:#8c8f94;
    }

    /* minimal, compact range tabs */
    .zew-chart-card__tabs{
        display:flex;
        justify-content:center;
        gap:2px;
        background:none;
        border-radius:0;
        padding:0;
        margin:0 0 10px;
        border-bottom:1px solid #f0f0f1;
        padding-bottom:8px;
    }

    .zew-chart-card__tab{
        flex:0 1 auto;
        padding:3px 8px;
        font-size:11px;
        font-weight:500;
        color:#9aa0a8;
        border-radius:6px;
    }

    .zew-chart-card__tab.is-active{
        background:#d2d2d2;
        color:#1d2327;
        font-weight:600;
    }

    .zew-chart-card__chart{
        height:90px;
        margin:0 -6px 10px;
        padding:0;
    }

    .zew-chart-card__range{
        margin:0;
        padding-top:10px;
        font-size:11px;
    }

    .zew-chart-card__meta{
        margin:12px 0 0;
        padding:10px;
    }

    .zew-chart-card__updated{
        font-size:12px;
    }

    .zew-chart-card__notice p{
        font-size:11px;
        line-height:1.7;
    }
}

/* ---------- Product slider ---------- */

.zew-slider-widget{
    direction:rtl;
    font-family:inherit;
}

.zew-slider-widget__title{
    font-size:18px;
    font-weight:700;
    color:#1d2327;
    margin:0 0 16px;
}

.zew-slider{
    position:relative;
    padding-bottom:38px;
}

.zew-slider .swiper-wrapper{
    align-items:stretch;
}

.zew-product-card{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    background:#fff;
    border-radius:16px;
    padding:16px;
    box-shadow:0 5px 20px rgba(0,0,0,.05);
    text-decoration:none;
    color:inherit;
    height:100%;
    box-sizing:border-box;
    transition:transform .2s ease, box-shadow .2s ease;
}

.zew-product-card:hover{
    transform:translateY(-4px);
    box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.zew-product-card__image{
    width:100%;
    aspect-ratio:1/1;
    border-radius:12px;
    overflow:hidden;
    background:#f6f7f7;
    margin-bottom:12px;
}

.zew-product-card__image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.zew-product-card__title{
    font-size:14px;
    font-weight:600;
    color:#1d2327;
    margin-bottom:6px;
    line-height:1.5;
}

.zew-product-card__price{
    font-size:14px;
    color:#2271b1;
    font-weight:700;
    margin-bottom:12px;
}

.zew-product-card__price del{
    color:#8c8f94;
    font-weight:400;
    margin-inline-end:6px;
}

.zew-product-card__button{
    margin-top:auto;
    font-size:12px;
    padding:8px 18px;
    border-radius:20px;
    background:#f0f0f1;
    color:#1d2327;
    transition:background .2s ease, color .2s ease;
}

.zew-product-card:hover .zew-product-card__button{
    background:#2271b1;
    color:#fff;
}

.zew-slider .swiper-pagination{
    bottom:0;
}

.zew-slider .swiper-pagination-bullet{
    background:#c3c4c7;
    opacity:1;
}

.zew-slider .swiper-pagination-bullet-active{
    background:#2271b1;
}

.zew-slider .swiper-button-prev,
.zew-slider .swiper-button-next{
    width:34px;
    height:34px;
    background:#fff;
    border-radius:50%;
    box-shadow:0 3px 12px rgba(0,0,0,.1);
    color:#1d2327;
    top:calc(50% - 19px);
}

.zew-slider .swiper-button-prev::after,
.zew-slider .swiper-button-next::after{
    font-size:14px;
}

/* ==============================
   Footer Info
============================== */

.zew-chart-card__meta{
    background:#f8f9fb;
    border:1px solid #eef0f4;
    border-radius:16px;
    padding:14px;
}

.zew-chart-card__updated{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    color:#40464d;
    font-size:13px;
    font-weight:600;
}

.zew-chart-card__updated svg{
    width:18px;
    height:18px;
    color:#7a8594;
    flex-shrink:0;
}

.zew-chart-card__updated .update-time{
    margin-right:auto;
    color:#1d2327;
    font-size:14px;
}

.zew-chart-card__notice{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin-top:12px;
    padding-top:12px;
    border-top:1px dashed #dfe4ea;
}

.zew-chart-card__notice svg{
    width:18px;
    height:18px;
    color:#2271b1;
    flex-shrink:0;
    margin-top:2px;
}

.zew-chart-card__notice p{
    margin:0;
    color:#6b7280;
    font-size:12px;
    line-height:1.9;
    text-align:right;
}
