/* =========================================================
   TGT Advanced WooCommerce Product Slider — base styles
   Per-instance colors/typography/spacing are injected by Elementor's
   own control "selectors" (see the widget PHP) — this file only
   covers structural layout, states, and responsiveness.
   ========================================================= */

.tgt-ws-wrapper {
    position: relative;
    box-sizing: border-box;
}

.tgt-ws-wrapper *,
.tgt-ws-wrapper *::before,
.tgt-ws-wrapper *::after {
    box-sizing: border-box;
}

.tgt-ws-wrapper.tgt-ws-arrows-outside {
    padding: 0 44px;
}

.tgt-ws-swiper {
    overflow: hidden;
    position: relative;
}

.tgt-ws-swiper .swiper-wrapper {
    height: auto;
}

.tgt-ws-swiper .swiper-slide {
    height: auto;
    display: flex;
}

/* ---------- Card ---------- */
.tgt-ws-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.tgt-ws-lift-yes .tgt-ws-card:hover {
    transform: translateY(-6px);
}

/* ---------- Image ---------- */
.tgt-ws-image-wrap {
    position: relative;
    display: block;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 6px;
    background: #f6f6f6;
}

.tgt-ws-img-ratio-1-1 .tgt-ws-image-wrap { aspect-ratio: 1 / 1; }
.tgt-ws-img-ratio-4-5 .tgt-ws-image-wrap { aspect-ratio: 4 / 5; }
.tgt-ws-img-ratio-3-2 .tgt-ws-image-wrap { aspect-ratio: 3 / 2; }
.tgt-ws-img-ratio-auto .tgt-ws-image-wrap { aspect-ratio: auto; }

.tgt-ws-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.tgt-ws-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tgt-ws-img-ratio-auto .tgt-ws-image {
    height: auto;
    object-fit: contain;
}

.tgt-ws-img-hover-zoom .tgt-ws-image-wrap:hover .tgt-ws-image {
    transform: scale(1.08);
}

/* ---------- Badges ---------- */
.tgt-ws-badges {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tgt-ws-badge-pos-left .tgt-ws-badges {
    left: 12px;
    align-items: flex-start;
}

.tgt-ws-badge-pos-right .tgt-ws-badges {
    right: 12px;
    align-items: flex-end;
}

.tgt-ws-badge {
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ---------- Card body / text ---------- */
.tgt-ws-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tgt-ws-category {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.tgt-ws-category a {
    color: inherit;
    text-decoration: none;
}

.tgt-ws-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.tgt-ws-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tgt-ws-excerpt {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.tgt-ws-rating {
    margin-bottom: 10px;
}

.tgt-ws-rating .star-rating {
    font-size: 14px;
    line-height: 1;
}

.tgt-ws-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 14px;
}

.tgt-ws-price del {
    font-weight: 400;
    font-size: 13px;
    opacity: 0.7;
    text-decoration: line-through !important;
}

.tgt-ws-price del,
.tgt-ws-price del * {
    text-decoration: line-through !important;
}

.tgt-ws-price ins {
    text-decoration: none;
}

.tgt-ws-add-to-cart {
    margin-top: auto;
}

.tgt-ws-add-to-cart a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    text-align: center;
    background: #222;
    color: #fff;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.tgt-ws-btn-full-yes .tgt-ws-add-to-cart a {
    width: 100%;
}

.tgt-ws-btn-hover-only .tgt-ws-add-to-cart {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.tgt-ws-card:hover .tgt-ws-add-to-cart {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tgt-ws-add-to-cart a.loading::after {
    margin-left: 6px;
}

/* ---------- Arrows ---------- */
.tgt-ws-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: #333;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tgt-ws-arrow svg {
    width: 40%;
    height: 40%;
    pointer-events: none;
}

.tgt-ws-arrow.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
}

.tgt-ws-arrows-outside .tgt-ws-arrow-prev { left: 0; }
.tgt-ws-arrows-outside .tgt-ws-arrow-next { right: 0; }

.tgt-ws-arrows-inside .tgt-ws-arrow-prev { left: 14px; }
.tgt-ws-arrows-inside .tgt-ws-arrow-next { right: 14px; }

/* ---------- Pagination ---------- */
.tgt-ws-pagination {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.tgt-ws-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    opacity: 1;
    margin: 0 !important;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.tgt-ws-pagination .swiper-pagination-bullet-active {
    background: #222;
    transform: scale(1.2);
}

.tgt-ws-pagination .swiper-pagination-progressbar {
    background: rgba(0, 0, 0, 0.1);
    height: 4px;
    border-radius: 4px;
    position: relative;
    width: 100%;
}

.tgt-ws-pagination .swiper-pagination-progressbar-fill {
    background: #222;
    border-radius: 4px;
}

.tgt-ws-pagination.swiper-pagination-fraction {
    font-size: 13px;
    color: #666;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 767px) {
    .tgt-ws-wrapper.tgt-ws-arrows-outside {
        padding: 0 34px;
    }

    .tgt-ws-arrow {
        width: 34px;
        height: 34px;
    }
}
