/* Base carousel styles with higher specificity */
.wp-block-sophia-blocks-product-carousel {
    position: relative;
    isolation: isolate;
    /* Create new stacking context */
}

.wp-block-sophia-blocks-product-carousel .site-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -20px;
}

.wp-block-sophia-blocks-product-carousel .site-col {
    padding: 0 20px 30px;
}

.wp-block-sophia-blocks-product-carousel .col-3 {
    width: 25%;
}

.wp-block-sophia-blocks-product-carousel .col-4 {
    width: 33.3333%;
}

.wp-block-sophia-blocks-product-carousel h2 {
    font-size: 42px;
    line-height: 1.25;
}

.wp-block-sophia-blocks-product-carousel h4 {
    font-size: 24px;
}

.wp-block-sophia-blocks-product-carousel .section-heading+.section-content-wrapper {
    margin-top: 56px;
}
.wp-block-sophia-blocks-product-carousel .product-price ins,
.wp-block-sophia-blocks-product-carousel .wp-block-post-group a {
    text-decoration: none!important;
}

/** Enhanced Carousel CSS with better isolation */

.wp-block-sophia-blocks-product-carousel .carousel-container {
    position: relative;
    isolation: isolate;
}

.wp-block-sophia-blocks-product-carousel .carousel-wrapper {
    overflow: hidden;
    border-radius: 10px;
}

.wp-block-sophia-blocks-product-carousel .carousel-track {
    display: flex;
    gap: 32px;
    transition: transform 0.6s ease-in-out;
}

.wp-block-sophia-blocks-product-carousel .product-card {
    flex-shrink: 0;
    width: 306px;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.wp-block-sophia-blocks-product-carousel .product-card.visible {
    opacity: 1;
}

.wp-block-sophia-blocks-product-carousel .product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.wp-block-sophia-blocks-product-carousel .product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.wp-block-sophia-blocks-product-carousel .product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.wp-block-sophia-blocks-product-carousel .product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.wp-block-sophia-blocks-product-carousel .card-container {
    background: var(--wp--preset--color--background);
    border-radius: 10px;
    border: 0.5px solid var(--wp--preset--color--border-color-light);
    box-shadow: 0px 0px 40px -10px rgba(111, 111, 111, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    box-sizing: border-box;
}

.wp-block-sophia-blocks-product-carousel .product-card:hover .card-container {
    box-shadow: rgba(17, 12, 46, 0.15) 0px 20px 50px 0px;
}

.wp-block-sophia-blocks-product-carousel .product-image {
    position: relative;
    overflow: hidden;
}

.wp-block-sophia-blocks-product-carousel .image-bg {
    width: 312px;
    height: 217px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px 10px 0 0;
    transition: transform 0.4s ease;
}

.wp-block-sophia-blocks-product-carousel .product-card:hover .image-bg {
    transform: scale(1.05);
}


.wp-block-sophia-blocks-product-carousel .card-content {
    padding-top: 28px;
    padding-bottom: 50px;
    padding-inline: 25px;
}

.wp-block-sophia-blocks-product-carousel .product-image .sale-badge {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--foreground);
    border-radius: 10px;
    padding: 4px 10px;
    line-height: 1;
    height: auto;
    min-height: auto;
    top: 20px !important;
    left: 15px !important;
    right: auto !important;
    font-weight: 400;
    border: none;
    text-transform: capitalize;
    z-index: 5;
    position: absolute;
    font-size: .875em;
}

.wp-block-sophia-blocks-product-carousel .price-section {
    height: 28px;
    margin-bottom: 21px;
    opacity: 0;
    transform: translateX(-10px);
    animation: slideInLeft 0.4s ease forwards;
}

.wp-block-sophia-blocks-product-carousel .product-price {
    font-weight: 500;
    color: var(--wp--preset--color--title);
    font-size: 18px;
    line-height: 28px;
}

.wp-block-sophia-blocks-product-carousel .product-info {
    margin-bottom: 16px;
    transition: transform 0.2s ease;
}

.wp-block-sophia-blocks-product-carousel .product-title {
    font-weight: 500;
    color: var(--wp--preset--color--title);
    font-size: var(--wp--preset--font-size--medium);
    font-family: var(--wp--preset--font-family--switzer);
    line-height: 28px;
    margin-bottom: 4px;
}

.wp-block-sophia-blocks-product-carousel .product-title a {
    text-decoration: none;

    &:hover {
        color: var(--wp--preset--color--link-color);
    }
}

.wp-block-sophia-blocks-product-carousel .product-subtitle {
    font-weight: 500;
    color: var(--wp--preset--color--secondary-text);
    font-size: 18px;
    line-height: 28px;
}

.wp-block-sophia-blocks-product-carousel .product-description-section {
    margin-bottom: 25px;
    transition: color 0.2s ease;
}

.wp-block-sophia-blocks-product-carousel .product-card:hover .product-description-section {
    color: #4a4a4a;
}

.wp-block-sophia-blocks-product-carousel .product-description {
    color: #615d5d;
    font-size: 15px;
    line-height: 1.65;
    height: 52px;
    overflow: hidden;
}

.wp-block-sophia-blocks-product-carousel .add-to-cart {
    width: 100% !important;
    background: var(--wp--preset--color--button-color) !important;
    height: 50px !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: normal !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wp-block-sophia-blocks-product-carousel .add-to-cart.added+.wc-forward {
    display: none !important;
}

.wp-block-sophia-blocks-product-carousel .add-to-cart:hover {
    background: var(--wp--preset--color--chocolate-dim) !important;
}

.wp-block-sophia-blocks-product-carousel .cart-text {
    color: var(--wp--preset--color--background) !important;
    font-size: 15px !important;
    line-height: 24px !important;
    font-weight: normal !important;
}

/* Navigation Buttons - Enhanced with maximum specificity */
.wp-block-sophia-blocks-product-carousel .nav-button {
    position: absolute !important;
    top: 50% !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: transparent !important;
    backdrop-filter: blur(4px) !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    z-index: 10 !important;
    transform: translateY(-50%) !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: normal !important;
    text-decoration: none !important;
    color: inherit !important;
    font-weight: normal !important;
}

/* Normal state hover */
.wp-block-sophia-blocks-product-carousel .nav-button:not(:disabled):hover {
    background: var(--wp--preset--color--background) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.wp-block-sophia-blocks-product-carousel .nav-button:not(:disabled):active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Disabled state styling with maximum specificity */
.wp-block-sophia-blocks-product-carousel .nav-button:disabled,
.wp-block-sophia-blocks-product-carousel .nav-button[disabled] {
    opacity: 0 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: transparent !important;
    box-shadow: none !important;
    visibility: hidden !important;
    display: none !important;
    /* Add this to completely hide disabled buttons */
}

.wp-block-sophia-blocks-product-carousel .nav-button:disabled .nav-icon,
.wp-block-sophia-blocks-product-carousel .nav-button[disabled] .nav-icon {
    color: #ccc !important;
}

.wp-block-sophia-blocks-product-carousel .nav-prev {
    left: -24px !important;
}

.wp-block-sophia-blocks-product-carousel .nav-next {
    right: -24px !important;
}

.wp-block-sophia-blocks-product-carousel .nav-icon {
    width: 24px !important;
    height: 24px !important;
    color: var(--wp--preset--color--soft-terracotta) !important;
    transition: color 0.2s ease !important;
}

.wp-block-sophia-blocks-product-carousel .nav-button:not(:disabled):hover .nav-icon {
    color: var(--wp--preset--color--button-color) !important;
}

/* Dots Indicator */
.wp-block-sophia-blocks-product-carousel .dots-container {
    display: flex !important;
    justify-content: center !important;
    margin-top: 32px !important;
    gap: 12px !important;
}

.wp-block-sophia-blocks-product-carousel .dot {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: var(--wp--preset--color--button-color) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    opacity: 0.2 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: normal !important;
    text-decoration: none !important;
    color: inherit !important;
    font-weight: normal !important;
}

.wp-block-sophia-blocks-product-carousel .dot:hover {
    transform: scale(1.2) !important;
}

.wp-block-sophia-blocks-product-carousel .dot:active {
    transform: scale(0.8) !important;
}

.wp-block-sophia-blocks-product-carousel .dot:hover,
.wp-block-sophia-blocks-product-carousel .dot.active {
    background: var(--wp--preset--color--button-color) !important;
    opacity: 1 !important;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .wp-block-sophia-blocks-product-carousel .nav-prev {
        left: -24px !important;
    }

    .wp-block-sophia-blocks-product-carousel .nav-next {
        right: -24px !important;
    }
}

@media (max-width: 768px) {
    .wp-block-sophia-blocks-product-carousel .carousel-track {
        gap: 16px;
    }

    .wp-block-sophia-blocks-product-carousel .product-card {
        width: 280px;
    }

    .wp-block-sophia-blocks-product-carousel .image-bg {
        width: 280px;
        height: 200px;
    }

    .wp-block-sophia-blocks-product-carousel .section-title {
        font-size: 28px;
    }

    /* Show navigation arrows on mobile */
    .wp-block-sophia-blocks-product-carousel .nav-button {
        display: flex !important;
        width: 40px !important;
        height: 40px !important;
    }

    .wp-block-sophia-blocks-product-carousel .nav-prev {
        left: -20px !important;
    }

    .wp-block-sophia-blocks-product-carousel .nav-next {
        right: -20px !important;
    }

    /* Hide dots on mobile */
    .wp-block-sophia-blocks-product-carousel .dots-container {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .wp-block-sophia-blocks-product-carousel .product-card {
        width: 100%;
        max-width: 280px;
    }

    .wp-block-sophia-blocks-product-carousel .image-bg {
        width: 100%;
        height: 200px;
    }

    /* Ensure single product display */
    .wp-block-sophia-blocks-product-carousel .carousel-wrapper {
        overflow: hidden;
        width: 100%;
    }

    .wp-block-sophia-blocks-product-carousel .carousel-track {
        gap: 20px;
    }

    /* Navigation arrows - make them more prominent on mobile */
    .wp-block-sophia-blocks-product-carousel .nav-button {
        display: flex !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }

    .wp-block-sophia-blocks-product-carousel .nav-prev {
        left: -22px !important;
    }

    .wp-block-sophia-blocks-product-carousel .nav-next {
        right: -22px !important;
    }

    .wp-block-sophia-blocks-product-carousel .nav-icon {
        width: 20px !important;
        height: 20px !important;
    }

    /* Ensure dots remain hidden on mobile */
    .wp-block-sophia-blocks-product-carousel .dots-container {
        display: none !important;
    }
}

@media (min-width: 1400px) {
    .wp-block-sophia-blocks-product-carousel .nav-prev {
        left: -70px !important;
    }

    .wp-block-sophia-blocks-product-carousel .nav-next {
        right: -70px !important;
    }
}