/* WooCommerce overrides for Plan C theme */

/* Layout helpers for checkout page */
.checkout-layout-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.planc-mobile-order-summary {
    display: block;
}

@media (min-width: 1024px) {
    .checkout-layout-container {
        display: flex;
        flex-direction: row;
        gap: 2rem;
        align-items: flex-start;
    }

    .checkout-form-col {
        width: 66.666667%;
        flex: 0 0 66.666667%;
    }

    .checkout-sidebar-col {
        width: 33.333333%;
        flex: 0 0 33.333333%;
    }

    .planc-mobile-order-summary {
        display: none;
    }
}

/* Cart totals / order summary styling (moved from template) */
.cart_totals {
    position: sticky;
    top: 20px;
}

.cart_totals .cart-totals-wrapper {
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.cart_totals .cart-totals-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.1);
}

.cart_totals .totals-header {
    background: linear-gradient(135deg, #8B5CF6, #EC4899, #3B82F6);
    background-size: 300% 300%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.cart_totals .shop_table {
    border-collapse: separate;
    border-spacing: 0;
}

.cart_totals .shop_table th,
.cart_totals .shop_table td {
    border: none;
    vertical-align: middle;
}

.cart_totals .shop_table tr.order-total {
    background: linear-gradient(135deg, #F8FAFC, #E0E7FF, #F3E8FF);
    border: 2px solid rgba(139, 92, 246, 0.1);
}

.cart_totals .total-amount {
    font-size: 1.75rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(139, 92, 246, 0.1);
}

.cart_totals .checkout-benefits {
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.cart_totals .checkout-benefits:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.1);
}

.cart_totals .benefit-item {
    transition: all 0.3s ease;
}

.cart_totals .benefit-item:hover {
    transform: translateY(-2px);
}

.cart_totals .benefit-item .w-12 {
    transition: all 0.3s ease;
}

.cart_totals .benefit-item:hover .w-12 {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Proceed to checkout button styling scoped to cart_totals */
.cart_totals .wc-proceed-to-checkout {
    text-align: center;
}

.cart_totals .wc-proceed-to-checkout .checkout-button,
.cart_totals .wc-proceed-to-checkout .button,
.cart_totals .wc-proceed-to-checkout a {
    width: 100%;
    padding: 20px 24px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899, #3B82F6);
    background-size: 300% 300%;
    color: white;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    display: block;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
    animation: gradient-shift 3s ease infinite;
}

.cart_totals .wc-proceed-to-checkout .checkout-button:hover,
.cart_totals .wc-proceed-to-checkout .button:hover,
.cart_totals .wc-proceed-to-checkout a:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.4);
    background-position: 100% 50%;
}

.cart_totals .wc-proceed-to-checkout .checkout-button:active,
.cart_totals .wc-proceed-to-checkout .button:active,
.cart_totals .wc-proceed-to-checkout a:active {
    transform: translateY(-1px);
    transition: all 0.1s ease;
}

.cart_totals .wc-proceed-to-checkout .checkout-button::before,
.cart_totals .wc-proceed-to-checkout .button::before,
.cart_totals .wc-proceed-to-checkout a::before {
    content: '🛒  ';
    margin-right: 8px;
}

.cart_totals .wc-proceed-to-checkout .checkout-button::after,
.cart_totals .wc-proceed-to-checkout .button::after,
.cart_totals .wc-proceed-to-checkout a::after {
    content: '  →';
    margin-left: 8px;
    transition: all 0.3s ease;
}

.cart_totals .wc-proceed-to-checkout .checkout-button:hover::after,
.cart_totals .wc-proceed-to-checkout .button:hover::after,
.cart_totals .wc-proceed-to-checkout a:hover::after {
    transform: translateX(5px);
}

/* Ripple effect helper */
.cart_totals .wc-proceed-to-checkout .checkout-button,
.cart_totals .wc-proceed-to-checkout .button,
.cart_totals .wc-proceed-to-checkout a {
    position: relative;
    overflow: hidden;
}

.cart_totals .wc-proceed-to-checkout .checkout-button:before,
.cart_totals .wc-proceed-to-checkout .button:before,
.cart_totals .wc-proceed-to-checkout a:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s;
    transform: translate(-50%, -50%);
}

.cart_totals .wc-proceed-to-checkout .checkout-button:active:before,
.cart_totals .wc-proceed-to-checkout .button:active:before,
.cart_totals .wc-proceed-to-checkout a:active:before {
    width: 300px;
    height: 300px;
}

@media (max-width: 768px) {
    .cart_totals .checkout-benefits .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .cart_totals .wc-proceed-to-checkout .checkout-button,
    .cart_totals .wc-proceed-to-checkout .button,
    .cart_totals .wc-proceed-to-checkout a {
        font-size: 16px;
        padding: 18px 20px;
    }
    .cart_totals .total-amount {
        font-size: 1.5rem;
    }
}

.cart_totals .wc-proceed-to-checkout .checkout-button.loading,
.cart_totals .wc-proceed-to-checkout .button.loading,
.cart_totals .wc-proceed-to-checkout a.loading {
    pointer-events: none;
    opacity: 0.8;
}

.cart_totals .wc-proceed-to-checkout .checkout-button.loading::before,
.cart_totals .wc-proceed-to-checkout .button.loading::before,
.cart_totals .wc-proceed-to-checkout a.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Checkout-specific overrides that previously lived inline in the template */
.checkout-page .woocommerce-checkout .woocommerce-form-coupon-toggle:not(.checkout-section) {
    display: none;
}

.checkout-page .woocommerce-checkout .woocommerce-form-coupon:not(.checkout-section .woocommerce-form-coupon) {
    display: none;
}

/* Hide WooCommerce default payment UI where we use a custom flow */
.checkout-page .woocommerce-checkout-payment:not([style*="position: absolute"]),
.checkout-page .payment_methods,
.checkout-page .wc_payment_methods,
.checkout-page .payment_method_credit_card,
.checkout-page .payment_method_paypal,
.checkout-page .payment_method_stripe,
.checkout-page .payment_box,
.checkout-page .woocommerce-payment-methods {
    display: none;
    visibility: hidden;
}

/* Hide default place order buttons (except our main button) */
.checkout-page button[name="woocommerce_checkout_place_order"]:not(#place_order_main) {
    display: none;
}

/* Ensure the theme's main place-order button is visible */
.checkout-page #place_order_main {
    display: flex;
    visibility: visible;
    opacity: 1;
    position: relative;
    z-index: 9999;
}

/* Breadcrumbs: avoid truncation and show SKU/ID as the breadcrumb label */
.woocommerce-breadcrumb,
.woocommerce-breadcrumb ol,
.woocommerce-breadcrumb li {
    font-size: 0.95rem;
    line-height: 1.2;
}

/* SKU/ID visible in breadcrumb across viewports */
.planc-breadcrumb-product-id {
    display: inline-block;
    font-weight: 600;
    color: #6b21a8;
    margin-left: 0.25rem;
}

/* JS-inserted separator styling (inserted as .planc-sep by assets/js/breadcrumbs.js) */
nav[aria-label="Breadcrumb"] .planc-sep {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.4rem;
    margin-right: 0.4rem;
    vertical-align: middle;
    color: #9CA3AF; /* tailwind gray-400 */
    line-height: 1;
}

nav[aria-label="Breadcrumb"] .planc-sep svg {
    width: 1rem;
    height: 1rem;
    max-width: 1rem;
    max-height: 1rem;
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    fill: none;
}

/* Make simple text separators (slashes) less prominent on breadcrumb rows */
nav[aria-label="Breadcrumb"] li span.mx-2 {
    color: #9CA3AF;
    font-weight: 600;
    display: inline-block;
    line-height: 1;
}

/* Ensure SKU badge isn't clipped on narrow screens */
.planc-breadcrumb-product-id {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

/* Cart page styles (extracted from woocommerce/cart.php) */
.cart-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #8B5CF6, #EC4899);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(45deg, #3B82F6, #8B5CF6);
    top: 60%;
    right: 10%;
    animation-delay: -10s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #EC4899, #F97316);
    top: 30%;
    right: 30%;
    animation-delay: -15s;
}

/* `float` keyframes moved to `assets/css/animations.css` (canonical source).
   Keep a single definition to avoid inconsistent animations across components. */

/* Floating Particles */
.floating-particles { position: absolute; width: 100%; height: 100%; }
.particle { position: absolute; width: 4px; height: 4px; background: #8B5CF6; border-radius: 50%; animation: particle-float 15s infinite linear; }
.particle:nth-child(1) { left: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 60%; animation-delay: -5s; }
.particle:nth-child(3) { left: 80%; animation-delay: -10s; }

@keyframes particle-float {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* Slide Up Animations */
@keyframes slide-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.animate-slide-up { animation: slide-up 0.6s ease-out; }
.animate-slide-up-delay { animation: slide-up 0.6s ease-out 0.2s both; }
.animate-slide-up-delay-2 { animation: slide-up 0.6s ease-out 0.4s both; }

/* Cart Item Animations */
.cart-item { position: relative; overflow: hidden; }
.cart-item::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent); animation: shimmer 3s infinite; }

@keyframes shimmer { 100% { transform: translateX(100%); } }

/* Quantity Controls */
.quantity-wrapper { transition: all 0.3s ease; }
.quantity-wrapper:hover { box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2); }
.qty-btn { transition: all 0.3s ease; }
.qty-input:focus { outline: none; }

/* Remove Button Animation */
.remove-item { transition: all 0.3s ease; }
.remove-item:hover { transform: scale(1.1); }

/* Trust Signals Animation */
.trust-signals .flex { transition: all 0.3s ease; }
.trust-signals .flex:hover { transform: translateX(5px); }

/* Card Hover Effects */
.cart-items-card, .cart-totals-card, .reviews-card { transition: all 0.3s ease; }
.cart-items-card:hover, .cart-totals-card:hover, .reviews-card:hover { transform: translateY(-5px); box-shadow: 0 25px 50px rgba(0,0,0,0.1); }

/* Button Animations */
.update-cart-btn, .remove-item { position: relative; overflow: hidden; }
.update-cart-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.5s; }
.update-cart-btn:hover::before { left: 100%; }

/* Responsive Design */
@media (max-width: 768px) {
    .shape, .floating-particles { display: none; }
    .cart-item { flex-direction: column; text-align: center; }
    .product-image { margin-right: 0; margin-bottom: 1rem; align-self: center; }
    .remove-section { margin-left: 0; margin-top: 1rem; align-self: center; }
}

/* Loading Animation */
.cart-loading { position: relative; }
.cart-loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; border: 2px solid #f3f3f3; border-top: 2px solid #8B5CF6; border-radius: 50%; animation: spin 1s linear infinite; transform: translate(-50%,-50%); }

@keyframes spin { 0% { transform: translate(-50%,-50%) rotate(0deg); } 100% { transform: translate(-50%,-50%) rotate(360deg); } }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: linear-gradient(45deg,#8B5CF6,#EC4899); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(45deg,#7C3AED,#DB2777); }

/* single-product tab/button styles (extracted from woocommerce/single-product.php) */
.tab-btn.active { background-color: white; color: #7c3aed; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.tab-btn:not(.active) { background-color: transparent; color: #6b7280; }

/* My Account (extracted from woocommerce/my-account.php) */
.basic-account-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #f8f9fa;
}

.basic-account-container {
    display: flex;
    gap: 30px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 500px;
}

.basic-account-sidebar {
    width: 280px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    padding: 20px;
    color: white;
}

.basic-account-content {
    flex: 1;
    padding: 20px;
    background: white;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation ul li { margin-bottom: 8px; }

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 15px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    border-radius: 8px;
}

.woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: rgba(255,255,255,0.2);
    color: white;
}

@media (max-width: 768px) {
    .basic-account-container { flex-direction: column; }
    .basic-account-sidebar { width: 100%; }
}

/* My Account Dashboard (extracted from woocommerce/myaccount/dashboard.php) */
.dashboard-simple { max-width: 100%; }
.dashboard-header { background: linear-gradient(135deg,#F3E8FF,#E0E7FF); padding: 1.5rem; border-radius: .75rem; margin-bottom: 2rem; border: 1px solid #E5E7EB; }
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: white; padding: 1.5rem; border-radius: .75rem; border: 1px solid #E5E7EB; box-shadow: 0 1px 3px rgba(0,0,0,0.1); text-align: center; }
.stat-icon { width: 3rem; height: 3rem; background: linear-gradient(135deg,#8B5CF6,#EC4899); border-radius: 50%; display:flex; align-items:center; justify-content:center; margin:0 auto 1rem; color:white; font-size:1.25rem; }
.stat-value { font-size: 1.5rem; font-weight: bold; color: #1F2937; margin-bottom: .25rem; }
.stat-label { font-size: .875rem; color: #6B7280; }
.recent-orders { background: white; padding: 1.5rem; border-radius: .75rem; border: 1px solid #E5E7EB; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 2rem; }
.order-item { padding: 1rem; background: #F9FAFB; border-radius: .5rem; margin-bottom: .75rem; display: flex; justify-content: between; align-items: center; }
.order-item:last-child { margin-bottom: 0; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1rem; }
.action-card { background: white; padding: 1.5rem; border-radius: .75rem; border: 1px solid #E5E7EB; box-shadow: 0 1px 3px rgba(0,0,0,0.1); text-align:center; text-decoration:none; color:#1F2937; transition: all .3s ease; }
.action-card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); text-decoration: none; color: #8B5CF6; }
.action-icon { width: 2.5rem; height: 2.5rem; background: linear-gradient(135deg,#8B5CF6,#EC4899); border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto .75rem; color:white; }
.btn-primary { background: linear-gradient(135deg,#8B5CF6,#EC4899); color:white; padding:.75rem 1.5rem; border-radius:.5rem; text-decoration:none; display:inline-block; font-weight:600; transition: all .3s ease; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); text-decoration:none; color:white; }
@media (max-width:640px) { .dashboard-stats { grid-template-columns: 1fr; } .quick-actions { grid-template-columns: repeat(2,1fr); } .order-item { flex-direction: column; text-align: center; gap: .5rem; } }

/* Thank You / Order Received page styles (extracted from woocommerce/checkout/thankyou.php) */
.thank-you-page { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.thank-you-page .background-shapes { position:absolute; top:0; left:0; width:100%; height:100%; overflow:hidden; z-index:1; }
.thank-you-page .shape { position:absolute; border-radius:50%; opacity:.1; animation: float 20s infinite linear; }
.thank-you-page .shape-1 { width:200px; height:200px; background: linear-gradient(45deg,#8B5CF6,#EC4899); top:10%; left:10%; }
.thank-you-page .shape-2 { width:150px; height:150px; background: linear-gradient(45deg,#3B82F6,#8B5CF6); top:60%; right:10%; }
.thank-you-page .shape-3 { width:100px; height:100px; background: linear-gradient(45deg,#EC4899,#F97316); top:30%; right:30%; }
.thank-you-page .shape-4 { width:120px; height:120px; background: linear-gradient(45deg,#10B981,#3B82F6); bottom:20%; left:20%; }
.thank-you-page .shape-5 { width:80px; height:80px; background: linear-gradient(45deg,#F59E0B,#EC4899); top:70%; left:60%; }
.floating-particles { position:absolute; width:100%; height:100%; }
.particle { position:absolute; width:4px; height:4px; background:#8B5CF6; border-radius:50%; animation: particle-float 15s infinite linear; }
.particle:nth-child(1){ left:10%; animation-delay:0s; }
.particle:nth-child(2){ left:20%; animation-delay:-2s; }
.particle:nth-child(3){ left:40%; animation-delay:-4s; }
.particle:nth-child(4){ left:70%; animation-delay:-6s; }
.particle:nth-child(5){ left:90%; animation-delay:-8s; }
@keyframes particle-float { 0% { transform: translateY(100vh) scale(0); opacity:0; } 10% { opacity:1; } 90% { opacity:1; } 100% { transform: translateY(-100vh) scale(1); opacity:0; } }

/* Archive Product shine animation (extracted from archive-product.php) */
@keyframes shine { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.animate-shine { animation: shine 2.5s linear infinite; }

/* planc variant My Account styles (extracted from woocommerce/myaccount/my-account.php) */
.planc-account-wrapper { width:100%; max-width:1200px; margin:0 auto; padding:20px; background:#f8f9fa; min-height:500px; }
.planc-account-container { display:flex; gap:30px; background:white; border-radius:10px; overflow:hidden; box-shadow:0 2px 10px rgba(0,0,0,0.1); min-height:600px; }
.planc-account-sidebar { width:280px; background: linear-gradient(135deg,#8B5CF6,#EC4899); padding:30px 20px; color:white; flex-shrink:0; }
.planc-account-content { flex:1; padding:30px; background:white; }
.planc-user-info { text-align:center; margin-bottom:30px; padding-bottom:20px; border-bottom:1px solid rgba(255,255,255,0.2); }
.planc-user-avatar { width:80px; height:80px; background: rgba(255,255,255,0.2); border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 15px; font-size:30px; }
.woocommerce-MyAccount-navigation ul { list-style:none; padding:0; margin:0; }
.woocommerce-MyAccount-navigation ul li { margin-bottom:8px; }
.woocommerce-MyAccount-navigation ul li a { display:block; padding:12px 15px; color: rgba(255,255,255,0.9); text-decoration:none; border-radius:8px; transition: all .3s ease; }
.woocommerce-MyAccount-navigation ul li a:hover, .woocommerce-MyAccount-navigation ul li.is-active a { background: rgba(255,255,255,0.2); color: white; }
@media (max-width:768px) { .planc-account-container { flex-direction: column; } .planc-account-sidebar { width:100%; } .planc-account-wrapper { padding:10px; } }
