/* Enable Equal Heights Globally using Flexbox (Preserves Native Gaps) */
.woocommerce ul.products:not(.swiper-wrapper) {
    display: flex !important;
    flex-wrap: wrap !important;
}

.woocommerce ul.products:not(.swiper-wrapper)::before,
.woocommerce ul.products:not(.swiper-wrapper)::after {
    display: none !important; /* Clearfixes can break flex layouts */
}


/* Pricing Carousel Grid Overrides (Scoped to avoid breaking Woo) */
.prowess-pricing-swiper ul.products::before,
.prowess-pricing-swiper ul.products::after {
    display: none !important;
    /* Disable woo clearfixes for flex */
}

/* Pricing Card Styling */
.pricing-carousel-wrapper ul.products li.product.pricing-card {
    list-style: none !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    margin-left: 0 !important;
    /* Do NOT touch margin-right so Swiper can inject spaceBetween values */
    padding: 0 !important;
    width: 100%;
    /* No !important so inline swiper styles win */
    float: none !important;
    /* reset woo defaults */
}

.pricing-card-inner {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Softer, larger outer shadow */
    border-radius: 12px;
    padding: 0 30px 30px 30px;
    /* 0 padding on top for ribbon */
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
    border: 1px solid #f2f2f2;
    /* subtle definition */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-sizing: border-box;
}

.pricing-card-inner:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Header Ribbon Design */
.pricing-card-header {
    color: #fff;
    margin: -1px -30px 15px -30px;
    padding: 25px 15px 30px 15px;
    border-radius: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: none;
    position: relative;
    z-index: 2;
    background-color: #29282d;
    background-size: 10px 10px;
    background-image: repeating-linear-gradient(45deg, #3a393f 0, #3a393f 1px, #29282d 0, #29282d 50%);
    overflow: hidden;
}

/* Discount Text Inside Ribbon */
.pricing-discount-text {
    position: absolute;
    top: 6px;
    right: -48px;
    width: 160px;
    transform: rotate(45deg);
    background: #D11120;
    color: #fff;
    text-align: center;
    padding: 8px 0;
    font-size: 20px;
    font-weight: 800;
    font-family: "Barlow", sans-serif;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    line-height: 1;
}

.pricing-discount-text::after {
    content: 'İndirim';
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    font-family: "Roboto", sans-serif;
    margin-top: 3px;
    opacity: 0.9;
}

/* Popular Text Tag (Left Side Vertical) */
.pricing-popular-text {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 36px;
    background-color: #D11120;
    color: #fff;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: "Barlow", sans-serif;
    z-index: 10;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

/* Price Texts inside Ribbon */
.pricing-price-sale,
.pricing-price-regular {
    color: #fff;
    font-size: 14px;
    font-family: "Barlow", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pricing-price-sale .price-old {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 1);
    font-weight: 500;
    font-size: 1.75rem;
}

.pricing-price-sale .price-new,
.pricing-price-regular .price-val {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    /* Make text pop against gradient */
}

/* Title */
.pricing-card-title {
    font-size: 1.75rem;
    color: #29282d;
    font-family: "Barlow", sans-serif;
    font-weight: 800;
    margin-bottom: 25px;
    padding: 10px 0 15px 0;
}

/* Checkout Button */
.pricing-card-action-primary {
    margin-top: auto;
    margin-bottom: 25px;
}

.btn-primary-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #D11120, #e81324);
    color: #fff !important;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 16px 20px;
    border-radius: 8px;
    /* Softer radius */
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(209, 17, 32, 0.25);
}

.btn-primary-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(209, 17, 32, 0.4);
}

/* Gift Alert */
.pricing-card-gift {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: rgba(209, 17, 32, 0.05);
    border: none;
    color: #D11120;
    padding: 10px 18px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 25px 0;
}

/* Features List */
.pricing-card-features {
    text-align: left;
    margin-bottom: 0px;
}

/* We target wpautop ul/li coming from editor */
.pricing-card-features ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.pricing-card-features ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 15px;
    color: #444;
    font-size: 17px;
    line-height: 1.5;
}

.pricing-card-features ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #D11120;
    font-weight: bold;
    font-size: 16px;
    background: rgba(209, 17, 32, 0.1);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Footer Button */
.pricing-card-action-secondary.mt-auto {
    border-top: 1px solid #ddd;
    margin-left: -30px;
    margin-right: -30px;
    padding-top: 25px;
}

.btn-secondary-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #444 !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.btn-secondary-details:hover {
    color: #D11120 !important;
}

/* Reset image output inside the override just in case woo adds it by default */
.pricing-card-inner img.attachment-woocommerce_thumbnail {
    display: none !important;
}

/* Single Product Page Customizations */
.single-product-checkout-wrap {
    margin: 30px 0;
}

.btn-primary-checkout.single-page-cta {
    display: inline-flex;
    min-width: 280px;
    padding: 18px 40px;
}

/* Related Products Styling Fix */
.related.products {
    margin-top: 80px;
    border-top: 1px solid #f0f0f0;
    padding-top: 60px;
}

.related.products h2 {
    font-size: 32px;
    margin-bottom: 60px;
    text-align: center;
    color: #29282d;
}

/* Pricing Carousel Styles */
.pricing-carousel-wrapper {
    margin: 40px 0;
}

/* Navigation Buttons */
.pricing-carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.pricing-nav-btn {
    background-color: #fff;
    color: #29282d;
    border: 2px solid #29282d;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.pricing-nav-btn.active {
    background-color: #D11120;
    color: #fff;
    border-color: #D11120;
}

.pricing-nav-btn:hover:not(.active) {
    color: #D11120;
    border-color: #D11120;
}

@media (max-width: 768px) {
    .pricing-carousel-nav {
        flex-direction: column;
        gap: 15px;
    }

    .pricing-nav-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Panes */
.pricing-carousel-pane {
    display: none;
}

.pricing-carousel-pane.active {
    display: block;
}

/* Swiper Overrides for WooCommerce Grid */
.prowess-pricing-swiper {
    padding: 20px 10px !important;
    /* Padding for shadow clipping */
    margin: -20px -10px !important;
    /* Offset the padding */
}

.prowess-pricing-swiper .products {
    display: flex !important;
    /* Override WooCommerce grid */
    flex-wrap: nowrap !important;
    gap: 0 !important;
    /* Swiper handles spaceBetween */
    align-items: stretch !important;
    /* Force equal height slides */
    margin: 0 !important;
}

.prowess-pricing-swiper .pricing-card {
    padding: 0 !important;
    /* Removed side padding to fix large gaps */
    height: auto !important;
    /* Allow stretch */
    box-sizing: border-box;
}

/* Carousel Controls Wrapper */
.pricing-carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 30px;
    height: 40px;
}

/* Reset Swiper Default Positioning to fit flex layout */
.pricing-carousel-controls .swiper-pagination {
    position: static;
    width: auto !important;
}

.pricing-carousel-controls .swiper-button-prev,
.pricing-carousel-controls .swiper-button-next {
    position: static;
    margin-top: 0;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.pricing-carousel-controls .swiper-button-prev:hover,
.pricing-carousel-controls .swiper-button-next:hover {
    background: #D11120;
}

.pricing-carousel-controls .swiper-button-prev:after,
.pricing-carousel-controls .swiper-button-next:after {
    font-size: 16px;
    color: #D11120;
    font-weight: bold;
}

.pricing-carousel-controls .swiper-button-prev:hover:after,
.pricing-carousel-controls .swiper-button-next:hover:after {
    color: #fff;
}

/* Bullet Active Color override */
.pricing-carousel-controls .swiper-pagination-bullet-active {
    background: #D11120 !important;
}