/* Trending Products Tab Widget Styles */

.zendrop-tpt-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Tabs Navigation */
.zendrop-tpt-tabs {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: center;
    background-color: #ffffff;
    border-bottom: 1px solid #d8d9e3;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.zendrop-tpt-tabs::-webkit-scrollbar {
    display: none;
}

.zendrop-tpt-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 48px;
    height: 52px;
    padding: 16px 4px;
    overflow: hidden;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
    color: #74757e;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 1.6px solid transparent;
    transition: all 0.3s ease;
}

.zendrop-tpt-tab:hover {
    color: #2e2f39;
}

.zendrop-tpt-tab.active {
    color: #2e2f39;
    border-bottom-color: #222129;
}

/* Tab Content */
.zendrop-tpt-content {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.zendrop-tpt-panel {
    display: none;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.zendrop-tpt-panel.active {
    display: block;
}

/* Products Grid - Desktop */
.zendrop-tpt-products {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    row-gap: 40px;
    align-items: flex-start;
    width: 100%;
}

/* Product Card */
.zendrop-tpt-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 calc(25% - 12px);
    min-width: 220px;
    max-width: calc(25% - 12px);
    aspect-ratio: 252 / 338;
    padding: 12px 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    text-decoration: none;
    box-sizing: border-box;
}


/* Card Image Wrapper */
.zendrop-tpt-card-image-wrapper {
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.zendrop-tpt-card-image {
    width: 100%;
    aspect-ratio: 228 / 249;
    object-fit: cover;
    border-radius: 12px;
    background-color: #f5f5f5;
}

.zendrop-tpt-card-image-wrapper {
    border-radius: 12px;
    overflow: hidden;
}

/* Country Flag */
.zendrop-tpt-flag {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 17px;
    overflow: hidden;
}

.zendrop-tpt-flag img {
    width: 22px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

/* Card Info */
.zendrop-tpt-card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 12px 6px 8px;
}

.zendrop-tpt-card-title {
    margin: 0;
    width: 100%;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
    color: #2e2f39;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card Stats */
.zendrop-tpt-card-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    min-width: 160px;
    padding: 0 6px;
}

.zendrop-tpt-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    white-space: nowrap;
}

.zendrop-tpt-label {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: -0.24px;
    color: #565656;
}

.zendrop-tpt-value {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
    color: #030303;
}

/* Swiper Container - Hidden by default */
.zendrop-tpt-swiper-container {
    display: none;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.zendrop-tpt-swiper {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding-bottom: 10px;
}

.zendrop-tpt-swiper .swiper-slide {
    width: auto;
    height: auto;
}

.zendrop-tpt-swiper .zendrop-tpt-card {
    width: 252px;
    max-width: 252px;
    flex: none;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .zendrop-tpt-card {
        flex: 1 1 calc(33.333% - 11px);
        max-width: calc(33.333% - 11px);
    }
}

@media (max-width: 991px) {
    .zendrop-tpt-card {
        flex: 1 1 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
}

@media (max-width: 767px) {
    .zendrop-tpt-container {
        gap: 24px;
    }

    .zendrop-tpt-tabs {
        gap: 16px;
        justify-content: flex-start;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scroll-snap-type: x proximity;
    }

    .zendrop-tpt-tabs::before {
        content: '';
        flex-shrink: 0;
        width: 16px;
    }

    .zendrop-tpt-tabs::after {
        content: '';
        flex-shrink: 0;
        width: 16px;
    }

    .zendrop-tpt-tab {
        flex-shrink: 0;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.4;
        letter-spacing: -0.28px;
        padding: 12px 4px;
        height: 44px;
        scroll-snap-align: start;
    }

    /* Hide grid on mobile, show swiper */
    .zendrop-tpt-products {
        display: none;
    }

    .zendrop-tpt-swiper-container {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .zendrop-tpt-swiper {
        padding-left: 16px;
        padding-right: 16px;
        overflow: visible;
    }

    .zendrop-tpt-swiper .zendrop-tpt-card {
        width: 220px;
        max-width: 220px;
        aspect-ratio: 220 / 300;
        padding: 12px 12px 16px;
    }

    .zendrop-tpt-card-image {
        aspect-ratio: 196 / 200;
        border-radius: 12px;
    }

    .zendrop-tpt-card-title {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.4;
        letter-spacing: -0.28px;
    }

    .zendrop-tpt-label {
        font-size: 12px;
        font-weight: 400;
        line-height: 1.4;
        letter-spacing: -0.24px;
    }

    .zendrop-tpt-value {
        font-size: 14px;
        font-weight: 400;
        line-height: 1.4;
        letter-spacing: -0.28px;
    }

    .zendrop-tpt-card-stats {
        gap: 16px;
    }

    .zendrop-tpt-card-info {
        padding: 12px 6px 8px;
    }
}

@media (max-width: 480px) {
    .zendrop-tpt-swiper .zendrop-tpt-card {
        width: 200px;
        max-width: 200px;
    }

    .zendrop-tpt-tabs {
        gap: 12px;
    }

    .zendrop-tpt-tabs::before,
    .zendrop-tpt-tabs::after {
        width: 12px;
    }

    .zendrop-tpt-tab {
        font-size: 13px;
        font-weight: 600;
        line-height: 1.4;
        letter-spacing: -0.26px;
    }

    .zendrop-tpt-swiper {
        padding-left: 12px;
        padding-right: 12px;
        overflow: visible;
    }
}