/* ==========================================================================
   WHITESWAN SUBSCRIPTION PLANS & CART UI - FRONTEND STYLES
   ========================================================================== */

/* Remove view cart button styling completely */
.view-cart-btn,
a[href*="cart"].added_to_cart, 
.button.view-cart, 
.added_to_cart {
    display: none !important;
}

/* Container styling */
.products.columns-4 {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 30px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 40px auto !important;
    max-width: 1200px !important;
}

/* Individual plan cards */
.products.columns-4 > .product,
.whiteswan-subscriptions-container .products > .product {
    flex: 1 1 300px !important;
    min-width: 280px !important;
    max-width: 380px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 36px 28px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    border: 2px solid #eaeaea !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    margin: 0 !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

/* Force hide when toggled OFF from admin */
.products.columns-4 > .product.plan-hidden,
.whiteswan-subscriptions-container .products > .product.plan-hidden {
    display: none !important;
}

/* Popular plan styling */
.products.columns-4 > .product.is-popular-card,
.whiteswan-subscriptions-container .products > .product.is-popular-card {
    border: 2px solid #3b82f6 !important;
    box-shadow: 0 10px 35px rgba(59, 130, 246, 0.16) !important;
    transform: scale(1.03) !important;
}

.products.columns-4 > .product:hover,
.whiteswan-subscriptions-container .products > .product:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}

.products.columns-4 > .product.is-popular-card:hover,
.whiteswan-subscriptions-container .products > .product.is-popular-card:hover {
    transform: scale(1.03) translateY(-4px) !important;
}

/* Hide product thumbnails/images */
.products.columns-4 > .product img,
.products.columns-4 > .product .woocommerce-placeholder,
.products.columns-4 > .product .attachment-woocommerce_thumbnail {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Plan name/title */
.products.columns-4 > .product .woocommerce-loop-product__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    margin: 0 0 18px 0 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

/* Disable default link styling on card body */
.woocommerce-LoopProduct-link.woocommerce-loop-product__link {
    text-decoration: none !important;
    color: inherit !important;
    cursor: default;
}

/* Price container */
.products.columns-4 > .product .price {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    gap: 6px !important;
    position: relative !important;
}

/* Current price - Large and bold */
.products.columns-4 > .product .price ins {
    text-decoration: none !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
}

.products.columns-4 > .product .price ins .woocommerce-Price-amount {
    font-size: 2.8rem !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    line-height: 1 !important;
}

.products.columns-4 > .product .price ins .woocommerce-Price-currencySymbol {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    font-family: Arial, sans-serif !important;
}

/* Period text */
.products.columns-4 > .product .subscription-period {
    display: block !important;
    color: #64748b !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    margin-top: 2px !important;
}

/* Original price - Striked */
.products.columns-4 > .product .price del {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.products.columns-4 > .product .price del .woocommerce-Price-amount {
    color: #94a3b8 !important;
    font-size: 1.1rem !important;
    text-decoration: line-through !important;
    font-weight: 500 !important;
}

/* Savings text under price */
.products.columns-4 > .product .savings-text {
    display: block !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    margin-top: 6px !important;
    color: #10b981 !important;
    letter-spacing: 0.3px !important;
}

/* Monthly equivalent text */
.products.columns-4 > .product .monthly-equivalent {
    display: block !important;
    color: #64748b !important;
    font-size: 0.85rem !important;
    font-style: italic !important;
    margin-top: 4px !important;
}

/* Features container */
.products.columns-4 > .product .product-features {
    margin: 20px 0 !important;
    padding: 20px 0 !important;
    border-top: 1px solid #f1f5f9 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    text-align: left !important;
    flex-grow: 1 !important;
}

/* Features list */
.products.columns-4 > .product .product-features ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.products.columns-4 > .product .product-features li {
    color: #475569 !important;
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
    padding-left: 24px !important;
    position: relative !important;
}

.products.columns-4 > .product .product-features li:last-child {
    margin-bottom: 0 !important;
}

.products.columns-4 > .product .product-features li::before {
    content: '✓' !important;
    color: #10b981 !important;
    font-weight: 800 !important;
    position: absolute !important;
    left: 0 !important;
    font-size: 1rem !important;
}

/* Add to Cart CTA button */
.products.columns-4 > .product a.button,
.whiteswan-subscriptions-container .products > .product a.button,
.whiteswan-subscriptions-container .products > .product .button.add_to_cart_button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 14px 20px !important;
    text-align: center !important;
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    position: relative !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    margin-top: auto !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25) !important;
    box-sizing: border-box !important;
}

.products.columns-4 > .product a.button:hover,
.whiteswan-subscriptions-container .products > .product a.button:hover,
.whiteswan-subscriptions-container .products > .product .button.add_to_cart_button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4) !important;
    color: #ffffff !important;
}

/* Hide sale badges */
.products.columns-4 > .product .onsale {
    display: none !important;
}

/* ==========================================================================
   BLUE THEME CART UI (Classic WooCommerce Cart & Block Cart)
   ========================================================================== */

/* Cart Page Wrapper Max-Width */
.woocommerce-cart .woocommerce,
.woocommerce-page.woocommerce-cart .woocommerce,
.wp-block-woocommerce-cart {
    max-width: 1100px;
    margin: 0 auto;
}

/* Classic WooCommerce Cart 2-Column Grid Layout */
@media (min-width: 769px) {
    .woocommerce-cart .woocommerce,
    .woocommerce-page.woocommerce-cart .woocommerce {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 30px !important;
        align-items: flex-start !important;
    }

    .woocommerce-cart .woocommerce-cart-form,
    .woocommerce-page.woocommerce-cart .woocommerce-cart-form {
        flex: 1 1 58% !important;
        min-width: 320px !important;
    }

    .woocommerce-cart .cart-collaterals,
    .woocommerce-page.woocommerce-cart .cart-collaterals {
        flex: 1 1 36% !important;
        min-width: 300px !important;
        width: auto !important;
        float: none !important;
    }
}

/* Classic Cart Items Box */
.woocommerce-cart .woocommerce-cart-form {
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 24px 28px !important;
    border: 1px solid #dbe7ff !important;
    box-shadow: 0 8px 24px rgba(0, 64, 128, 0.06) !important;
}

/* Classic Cart Table */
.woocommerce-cart table.shop_table.cart,
.woocommerce-page.woocommerce-cart table.shop_table.cart {
    border: none !important;
    border-collapse: collapse !important;
    width: 100% !important;
    border-radius: 0 !important;
    margin: 0 0 20px 0 !important;
}

.woocommerce-cart table.shop_table.cart thead th {
    background: transparent !important;
    border-bottom: 2px solid #e3ebff !important;
    border-top: none !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 12px 10px !important;
}

.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
    border-bottom: 1px solid #e3ebff !important;
}

.woocommerce-cart table.shop_table.cart tbody td {
    padding: 18px 10px !important;
    border-top: none !important;
    vertical-align: middle !important;
}

.woocommerce-cart table.shop_table.cart .product-name a {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0b1c2d !important;
    text-decoration: none !important;
}

.woocommerce-cart table.shop_table.cart .product-price,
.woocommerce-cart table.shop_table.cart .product-subtotal {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0a58ff !important;
}

.woocommerce-cart table.shop_table.cart .product-thumbnail img {
    width: 64px !important;
    height: 64px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    border: 1px solid #dbe7ff !important;
}

.woocommerce-cart table.shop_table.cart a.remove {
    color: #ef4444 !important;
    font-size: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    transition: background 0.2s !important;
}

.woocommerce-cart table.shop_table.cart a.remove:hover {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

/* Actions & Coupon Area */
.woocommerce-cart table.cart td.actions {
    padding-top: 20px !important;
}

.woocommerce-cart table.cart td.actions .coupon {
    display: inline-flex !important;
    gap: 8px !important;
    align-items: center !important;
}

.woocommerce-cart table.cart td.actions .coupon input.input-text {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    outline: none !important;
}

.woocommerce-cart table.cart td.actions .button {
    background: #e2e8f0 !important;
    color: #334155 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

/* Classic Cart Collaterals & Totals */
.woocommerce-cart .cart-collaterals {
    background: #f5f9ff !important;
    border-radius: 16px !important;
    padding: 24px 28px !important;
    border: 1px solid #dbe7ff !important;
    box-shadow: 0 8px 24px rgba(0, 64, 128, 0.06) !important;
}

.woocommerce-cart .cart-collaterals .cart_totals {
    width: 100% !important;
    float: none !important;
    text-align: left !important;
}

.woocommerce-cart .cart-collaterals .cart_totals h2 {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #0b1c2d !important;
    margin: 0 0 16px 0 !important;
    border-bottom: 2px solid #dbe7ff !important;
    padding-bottom: 10px !important;
}

.woocommerce-cart .cart-collaterals table.shop_table {
    border: none !important;
    width: 100% !important;
    margin-bottom: 20px !important;
}

.woocommerce-cart .cart-collaterals table.shop_table tr th,
.woocommerce-cart .cart-collaterals table.shop_table tr td {
    border-top: none !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    padding: 12px 0 !important;
    font-size: 14px !important;
    color: #475569 !important;
}

.woocommerce-cart .cart-collaterals table.shop_table tr.order-total th,
.woocommerce-cart .cart-collaterals table.shop_table tr.order-total td {
    border-bottom: none !important;
    border-top: 2px solid #cbd5e1 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0a58ff !important;
    padding-top: 14px !important;
}

/* Classic Proceed to Checkout Button */
.woocommerce-cart .wc-proceed-to-checkout,
.woocommerce-page.woocommerce-cart .wc-proceed-to-checkout {
    padding: 0 !important;
    margin-top: 15px !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.button.alt,
.woocommerce-page.woocommerce-cart .wc-proceed-to-checkout a.button.alt,
.wc-block-cart__submit-button {
    background: linear-gradient(135deg, #0a58ff, #003ecb) !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 16px 20px !important;
    border-radius: 12px !important;
    width: 100% !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    letter-spacing: 0.6px !important;
    box-shadow: 0 6px 18px rgba(10, 88, 255, 0.35) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.button.alt:hover,
.wc-block-cart__submit-button:hover {
    background: linear-gradient(135deg, #003ecb, #002a8f) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(10, 88, 255, 0.45) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   BLOCK CART UI SUPPORT
   ========================================================================== */
.wc-block-cart-layout {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 30px;
    align-items: start;
}

/* Empty cart centered view */
.wc-block-cart-layout.is-empty,
.wc-block-cart.is-empty,
.cart-empty,
.wc-empty-cart-message,
.wc-block-cart__empty-cart-wrapper,
.woocommerce-cart p.cart-empty {
    max-width: 620px !important;
    width: 100% !important;
    margin: 30px auto !important;
    text-align: center !important;
    padding: 40px 30px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid #dbe7ff !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04) !important;
    font-size: 17px !important;
    color: #64748b !important;
}

.return-to-shop,
.wc-block-cart__empty-cart__actions {
    text-align: center !important;
    margin: 20px auto 0 !important;
}

.return-to-shop a.button,
.wc-block-cart__empty-cart__actions a.button {
    background: linear-gradient(135deg, #0a58ff, #003ecb) !important;
    color: #ffffff !important;
    padding: 12px 26px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.wc-block-cart {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    border: 1px solid #dbe7ff;
    box-shadow: 0 8px 24px rgba(0, 64, 128, 0.06);
}

.wc-block-cart-items {
    border-collapse: collapse;
    width: 100%;
}

.wc-block-cart-items__row {
    border-bottom: 1px solid #e3ebff;
    padding: 18px 0;
}

.wc-block-cart-item__image img {
    border-radius: 10px;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 1px solid #dbe7ff;
}

.wc-block-components-product-name {
    font-size: 17px;
    font-weight: 700;
    color: #0b1c2d;
    text-decoration: none;
}

.wc-block-components-product-price__value {
    font-size: 19px;
    font-weight: 800;
    color: #0a58ff;
}

.wc-block-components-sale-badge {
    background: #0a58ff;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}

.wc-block-cart__sidebar {
    background: #f5f9ff;
    border-radius: 16px;
    padding: 26px;
    border: 1px solid #dbe7ff;
}

.wc-block-cart__totals-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: #0b1c2d;
}

.wc-block-components-totals-footer-item__value {
    font-size: 26px;
    font-weight: 800;
    color: #0a58ff;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .products.columns-4 {
        gap: 20px !important;
    }
    .products.columns-4 > .product {
        min-width: calc(50% - 20px) !important;
        max-width: calc(50% - 20px) !important;
    }
}

@media (max-width: 768px) {
    .products.columns-4 {
        flex-direction: column !important;
        align-items: center !important;
    }
    .products.columns-4 > .product {
        min-width: 100% !important;
        max-width: 100% !important;
    }
    .wc-block-cart-layout {
        grid-template-columns: 1fr;
    }
}
