/* ============================================================
   WooCommerce Bestsellers – Kadence / Splide Carousel Style
   Matches cubeweld.com product carousel layout
   ============================================================ */

/* Section wrapper – dark background */
.woo-bs-section {
    /* background: #2a2a2a; */
    padding: 40px 50px;
    margin: 0;
    max-width: 100%;
}

.woo-bs-heading {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 1.5rem 0;
    color: #fff;
}

/* Error message (admin only) */
.woo-bs-error {
    padding: 1rem 1.5rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    text-align: center;
    margin: 1rem 0;
}

/* ============================================================
   Carousel Container
   ============================================================ */

.kt-blocks-product-carousel-block.bestsellers-products {
    position: relative;
    max-width: 1290px;
    margin: 0 auto;
}

.kt-blocks-product-carousel-block .splide {
    position: relative;
    visibility: visible;
}

/* ============================================================
   Splide Arrows – Dark outline circles
   ============================================================ */

.kt-blocks-product-carousel-block .splide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    padding: 0;
}

.kt-blocks-product-carousel-block .splide__arrow:hover {
    opacity: 1;
}

.kt-blocks-product-carousel-block .splide__arrow svg {
    fill: rgba(255, 255, 255, 0.6);
    width: 14px;
    height: 14px;
}

.kt-blocks-product-carousel-block .splide__arrow:hover svg {
    fill: rgba(255, 255, 255, 0.9);
}

.kt-blocks-product-carousel-block .splide__arrow--prev {
    left: -50px;
}

.kt-blocks-product-carousel-block .splide__arrow--next {
    right: -50px;
}

.kt-blocks-product-carousel-block .splide__arrow--prev svg {
    transform: rotate(180deg);
}

/* ============================================================
   Splide Pagination Dots
   ============================================================ */

.kt-blocks-product-carousel-block .splide__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding: 0;
    list-style: none;
}

.kt-blocks-product-carousel-block .splide__pagination__page {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.kt-blocks-product-carousel-block .splide__pagination__page.is-active {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.kt-blocks-product-carousel-block .splide__pagination__page:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   Product List
   ============================================================ */

.kt-blocks-product-carousel-block ul.products {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kt-blocks-product-carousel-block ul.products li.product {
    list-style: none;
}

/* ============================================================
   Product Card – White card on dark background
   ============================================================ */

.kt-blocks-product-carousel-block li.entry.content-bg.loop-entry.product {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
}

/* ============================================================
   Product Image – Orange border frame
   ============================================================ */

.kt-blocks-product-carousel-block .woocommerce-loop-image-link {
    display: block;
    position: relative;
    overflow: hidden;
    padding: 15px;
    background: #fff;
}

.kt-blocks-product-carousel-block .product-image-border {
    display: block;
    padding: 10px;
    background: #fff;
}

.kt-blocks-product-carousel-block .woocommerce-loop-image-link img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    aspect-ratio: 4 / 3;
    transition: transform 0.3s ease;
    background: #fff;
}

.kt-blocks-product-carousel-block .woocommerce-loop-image-link:hover img {
    transform: scale(1.04);
}

.woo-bs-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
    font-size: 2.5rem;
}

/* ============================================================
   Product Details
   ============================================================ */

.kt-blocks-product-carousel-block .product-details.content-bg.entry-content-wrap {
    display: flex;
    flex-direction: column;
    padding: 15px 20px 20px;
    flex: 1;
}

/* Product title – bold */
.kt-blocks-product-carousel-block .woocommerce-loop-product__title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px 0;
    padding: 0;
}

.kt-blocks-product-carousel-block .woocommerce-loop-product__title a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s ease;
}

.kt-blocks-product-carousel-block .woocommerce-loop-product__title a:hover {
    color: #e8951d;
}

/* ============================================================
   Variation Tags
   ============================================================ */

.kt-blocks-product-carousel-block .product-variations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.kt-blocks-product-carousel-block a.variation-tag {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 0.82rem;
    color: #444;
    background: #fff;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.kt-blocks-product-carousel-block a.variation-tag:hover {
    border-color: #e8951d;
    color: #e8951d;
}

/* ============================================================
   Bottom row: Price + Cart button
   ============================================================ */

.kt-blocks-product-carousel-block .product-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 10px;
}

/* Price */
.kt-blocks-product-carousel-block .price {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin: 0;
}

.kt-blocks-product-carousel-block .price .woocommerce-Price-amount {
    color: inherit;
}

.kt-blocks-product-carousel-block .price .woocommerce-Price-currencySymbol {
    font-size: 0.9em;
}

.kt-blocks-product-carousel-block .price del {
    opacity: 0.5;
    font-weight: 400;
    text-decoration: line-through;
    margin-right: 6px;
}

.kt-blocks-product-carousel-block .price ins {
    text-decoration: none;
    color: #c0392b;
    font-weight: 700;
}

/* ============================================================
   Cart Button – Orange square
   ============================================================ */

.kt-blocks-product-carousel-block .product-action-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.kt-blocks-product-carousel-block .product-action-wrap .button:hover {
    background: #d4840f;
    transform: scale(1.05);
}

.kt-blocks-product-carousel-block .product-action-wrap .button svg {
    fill: currentColor;
    width: 20px;
    height: 20px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1440px) {
    .kt-blocks-product-carousel-block .splide__arrow--prev {
        left: -15px;
    }
    .kt-blocks-product-carousel-block .splide__arrow--next {
        right: -15px;
    }
}

@media (max-width: 767px) {
    .woo-bs-section {
        padding: 30px 20px;
    }

    .kt-blocks-product-carousel-block .splide__arrow--prev {
        left: -10px;
    }
    .kt-blocks-product-carousel-block .splide__arrow--next {
        right: -10px;
    }

    .kt-blocks-product-carousel-block .splide__arrow {
        width: 32px;
        height: 32px;
    }

    .kt-blocks-product-carousel-block .splide__arrow svg {
        width: 12px;
        height: 12px;
    }

    .woo-bs-heading {
        font-size: 1.4rem;
    }
}

@media (max-width: 543px) {
    .woo-bs-section {
        padding: 20px 15px;
    }

    .kt-blocks-product-carousel-block .splide__arrow {
        width: 28px;
        height: 28px;
    }

    .kt-blocks-product-carousel-block .woocommerce-loop-product__title {
        font-size: 1rem;
    }
}
