/* Bagzelia Checkout & Cart CSS */
:root {
    --bz-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Variables fallback if inline fails */
    --bz-primary: #000;
    --bz-accent: #c09033;
    --bz-text: #333;
}

/* Side Cart / Floating Button */
.bz-floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: var(--bz-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 9998;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.bz-floating-cart:hover {
    transform: scale(1.1);
}
.bz-cart-icon {
    font-size: 24px;
    color: #fff;
}
.bz-cart-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--bz-accent);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Side Drawer overlay */
.bz-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
.bz-cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Side Drawer */
.bz-cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    font-family: var(--bz-font);
}
.bz-cart-drawer.active {
    right: 0;
}
.bz-cart-header {
    padding: 25px;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bz-cart-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--bz-primary);
}
#bz-cart-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}
#bz-cart-close:hover {
    color: var(--bz-primary);
}
.bz-cart-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
}
.bz-cart-items {
    flex-grow: 1;
}
.bz-cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
    position: relative;
}
.bz-cart-item:last-child {
    border-bottom: none;
}
.bz-cart-item-img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f7;
}
.bz-cart-item-details {
    flex-grow: 1;
}
.bz-cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--bz-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}
.bz-cart-item-price {
    font-size: 14px;
    color: var(--bz-text);
    margin-bottom: 10px;
}
.bz-cart-item-qty-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: max-content;
}
.bz-qty-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    color: var(--bz-text);
}
.bz-qty-input {
    width: 35px;
    text-align: center;
    border: none;
    background: none;
    font-size: 14px;
    pointer-events: none;
}
.bz-cart-item-remove {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}
.bz-cart-item-remove:hover {
    color: #d00;
}
.bz-cart-footer {
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}
.bz-cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    color: var(--bz-primary);
    margin-bottom: 10px;
}
.bz-cart-tax-notice {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-bottom: 20px;
}
.bz-btn-primary {
    background: var(--bz-primary);
    color: #fff;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.3s;
}
.bz-btn-primary:hover {
    opacity: 0.9;
    color: #fff;
}
.bz-btn-block {
    display: block;
    width: 100%;
}
.bz-cart-empty {
    text-align: center;
    margin-top: 50px;
    font-size: 16px;
    color: #666;
}
.bz-shop-now-btn {
    margin-top: 20px;
}

/* Premium Checkout Redesign */
.bz-premium-checkout-active .woocommerce {
    font-family: var(--bz-font);
    max-width: 1200px;
    margin: 0 auto;
}
.bz-premium-checkout-active form.checkout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}
.bz-premium-checkout-active #customer_details {
    flex: 1;
    min-width: 300px;
}
.bz-premium-checkout-active #order_review_heading,
.bz-premium-checkout-active #order_review {
    flex: 0 0 450px;
    background: #fcfcfc;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border: 1px solid #eaeaea;
}
@media (max-width: 900px) {
    .bz-premium-checkout-active #order_review_heading,
    .bz-premium-checkout-active #order_review {
        flex: 1;
        width: 100%;
    }
}
.bz-premium-checkout-active .woocommerce-checkout-payment {
    background: transparent !important;
}

/* Trust Badges */
.bz-checkout-trust-badges {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}
.bz-badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f7;
    padding: 12px 15px;
    border-radius: 8px;
}
.bz-badge-icon {
    font-size: 20px;
}
.bz-badge-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--bz-text);
}

/* Checkout Upsell */
.bz-checkout-upsell-box {
    margin-top: 30px;
    padding: 20px;
    border: 2px dashed var(--bz-accent);
    border-radius: 12px;
    background: #fff;
}
.bz-checkout-upsell-box h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: var(--bz-primary);
}
.bz-upsell-product {
    display: flex;
    align-items: center;
    gap: 15px;
}
.bz-upsell-img img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}
.bz-upsell-details {
    flex-grow: 1;
}
.bz-upsell-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--bz-primary);
}
.bz-upsell-price {
    font-size: 14px;
    color: var(--bz-text);
}
.bz-btn-add-upsell {
    background: var(--bz-accent);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.3s;
}
.bz-btn-add-upsell:hover {
    opacity: 0.9;
}

/* Premium Thank You Page */
.bz-premium-thankyou-active .woocommerce-order {
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--bz-font);
}
.bz-thankyou-success-banner {
    text-align: center;
    padding: 50px 20px;
    background: #f9fdfa;
    border-radius: 20px;
    border: 1px solid #e5f5eb;
    margin-bottom: 40px;
}
.bz-thankyou-success-banner h2 {
    font-size: 32px;
    color: #27ae60;
    margin: 20px 0 10px 0;
}
.bz-thankyou-success-banner p {
    color: #666;
    font-size: 16px;
}

/* Success Checkmark Animation */
.bz-success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}
.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #4CAF50;
}
.check-icon::before, .check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: #f9fdfa;
    transform: rotate(-45deg);
}
.check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}
.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}
.check-icon .icon-line {
    height: 5px;
    background-color: #4CAF50;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}
.check-icon .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}
.check-icon .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}
.check-icon .icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(76, 175, 80, .5);
}
.check-icon .icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: #f9fdfa;
}
@keyframes icon-line-tip { 0% { width: 0; left: 1px; top: 19px; } 54% { width: 0; left: 1px; top: 19px; } 70% { width: 50px; left: -8px; top: 37px; } 84% { width: 17px; left: 21px; top: 48px; } 100% { width: 25px; left: 14px; top: 46px; } }
@keyframes icon-line-long { 0% { width: 0; right: 46px; top: 54px; } 65% { width: 0; right: 46px; top: 54px; } 84% { width: 55px; right: 0px; top: 35px; } 100% { width: 47px; right: 8px; top: 38px; } }

/* Thank you related products */
.bz-thankyou-related {
    margin-top: 60px;
    border-top: 1px solid #eaeaea;
    padding-top: 40px;
}
.bz-thankyou-related h3 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
}
.bz-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}
.bz-related-product {
    text-align: center;
}
.bz-related-product a {
    text-decoration: none;
    color: var(--bz-text);
}
.bz-related-product img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
}
.bz-related-product h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
}
.bz-related-product .price {
    font-size: 14px;
    color: var(--bz-primary);
    font-weight: 700;
}
