/* ==========================================================================
   WOOCOMMERCE - Theme Styles Override
   Terapeutas no Digital
   ========================================================================== */

/* ==========================================================================
   WOOCOMMERCE BLOCKS - Cart & Checkout
   ========================================================================== */

/* --- General WooCommerce Block Styling --- */
.wc-block-cart,
.wc-block-checkout {
    font-family: inherit;
    max-width: 1140px;
    margin: 0 auto;
}

/* Fix inputs/selects in WC blocks */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-country-input select,
.wc-block-components-select select,
.wc-block-components-combobox input {
    border: 1px solid #E5E7EB !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.wc-block-components-text-input input:focus,
.wc-block-components-text-input textarea:focus,
.wc-block-components-country-input select:focus,
.wc-block-components-combobox input:focus {
    border-color: #4338CA !important;
    box-shadow: 0 0 0 3px rgba(48,44,128,0.1) !important;
    outline: none !important;
}

.wc-block-components-text-input label {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

/* --- Cart Block --- */
.wc-block-cart .wc-block-cart__main {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.wc-block-cart .wc-block-cart__sidebar {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Cart table items */
.wc-block-cart-items .wc-block-cart-items__row {
    border-bottom: 1px solid #F3F4F6;
    padding: 20px 0;
}

.wc-block-cart-items .wc-block-cart-items__row:last-child {
    border-bottom: none;
}

.wc-block-cart-item__image img {
    border-radius: 12px;
}

.wc-block-cart-item__product-name {
    font-weight: 600;
    color: #1F2937;
}

.wc-block-cart-item__individual-price,
.wc-block-cart-item__total-price {
    font-weight: 600;
    color: #4338CA;
}

/* Quantity controls */
.wc-block-cart-item__quantity .wc-block-components-quantity-selector {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
}

.wc-block-components-quantity-selector__button {
    background: #F9FAFB !important;
    border: none !important;
    color: #6B7280 !important;
    transition: all 0.2s !important;
}

.wc-block-components-quantity-selector__button:hover {
    background: #E5E7EB !important;
    color: #4338CA !important;
}

.wc-block-components-quantity-selector__input {
    border: none !important;
    border-left: 1px solid #E5E7EB !important;
    border-right: 1px solid #E5E7EB !important;
    font-weight: 600 !important;
}

/* Remove item link */
.wc-block-cart-item__remove-link {
    color: #9CA3AF !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.wc-block-cart-item__remove-link:hover {
    color: #DC2626 !important;
}

/* Cart totals */
.wc-block-cart__totals-title {
    font-weight: 700 !important;
    color: #1F2937 !important;
    font-size: 1.1rem !important;
    border-bottom: 2px solid #E5E7EB !important;
    padding-bottom: 16px !important;
    margin-bottom: 16px !important;
}

.wc-block-components-totals-item__value {
    font-weight: 600 !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    color: #1F2937 !important;
}

/* Coupon */
.wc-block-components-totals-coupon__form {
    display: flex;
    gap: 8px;
}

.wc-block-components-totals-coupon__input input {
    border-radius: 8px !important;
}

.wc-block-components-totals-coupon__button {
    border-radius: 8px !important;
    background: #F3F4F6 !important;
    border: 1px solid #E5E7EB !important;
    color: #374151 !important;
    font-weight: 600 !important;
}

.wc-block-components-totals-coupon__button:hover {
    background: #E5E7EB !important;
}

/* Proceed to checkout button */
.wc-block-cart__submit-container .wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
    background: #4338CA !important;
    color: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 16px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    width: 100% !important;
    font-family: inherit !important;
}

.wc-block-cart__submit-container .wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
    background: #4F46E5 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 20px rgba(48,44,128,0.3) !important;
}

/* --- Checkout Block --- */
.wc-block-checkout .wc-block-checkout__main {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.wc-block-checkout .wc-block-checkout__sidebar {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Section headings */
.wc-block-checkout .wc-block-components-checkout-step__heading {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
}

.wc-block-checkout .wc-block-components-checkout-step__container {
    border-left: 2px solid #E5E7EB;
    margin-left: 12px;
    padding-left: 24px;
}

/* Step numbers */
.wc-block-components-checkout-step__heading::before {
    background: #4338CA !important;
    color: #fff !important;
}

/* Order summary items in checkout */
.wc-block-checkout__sidebar .wc-block-components-order-summary-item__image img {
    border-radius: 10px;
}

.wc-block-components-order-summary-item__quantity {
    background: #4338CA !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
}

.wc-block-components-order-summary-item__total-price {
    font-weight: 600 !important;
    color: #4338CA !important;
}

/* Payment methods */
.wc-block-checkout__payment-method .wc-block-components-radio-control__option {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 8px;
    transition: all 0.2s;
    position: relative;
}

.wc-block-checkout__payment-method .wc-block-components-radio-control__option--checked {
    border-color: #4338CA;
    background: #F5F3FF;
}

/* FIX: Garantir que o layout do radio control usa flex e tem espaço suficiente */
.wc-block-checkout__payment-method .wc-block-components-radio-control__option-layout {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
}

/* FIX: Input radio não deve ter position absolute nem sobrepor o texto */
.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option__input,
.wc-block-checkout__payment-method .wc-block-components-radio-control__input,
.wc-block-checkout__payment-method input[type="radio"] {
    position: relative !important;
    flex-shrink: 0 !important;
    min-width: 20px !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

/* FIX: Label com padding esquerdo suficiente para não ser tapada pelo radio */
.wc-block-checkout__payment-method .wc-block-components-radio-control__label {
    font-weight: 600 !important;
    color: #1F2937 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    flex: 1 !important;
}

/* FIX: Accordion option (WC Blocks accordion style) */
.wc-block-components-radio-control-accordion-option {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px !important;
    background: #F9FAFB !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
    transition: all 0.2s !important;
    cursor: pointer !important;
}

.wc-block-components-radio-control-accordion-option--checked,
.wc-block-components-radio-control-accordion-option:has(input:checked) {
    border-color: #4338CA !important;
    background: #F5F3FF !important;
}

.wc-block-components-radio-control-accordion-option label,
.wc-block-components-radio-control-accordion-option .wc-block-components-radio-control-accordion-option__checked-description {
    font-weight: 600 !important;
    color: #1F2937 !important;
    flex: 1 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.wc-block-components-radio-control-accordion-option input[type="radio"] {
    position: relative !important;
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

/* Terms and conditions */
.wc-block-checkout__terms {
    font-size: 0.85rem !important;
    color: #6B7280 !important;
}

.wc-block-checkout__terms a {
    color: #4338CA !important;
}

/* Page background for WooCommerce */
body.woocommerce-cart .site-main .section,
body.woocommerce-checkout .site-main .section {
    background: #F9FAFB;
    padding: 40px 0 80px;
}

body.woocommerce-cart .entry-content,
body.woocommerce-checkout .entry-content {
    max-width: 1140px !important;
}

/* ==========================================================================
   CART PAGE
   ========================================================================== */

.tnd-cart-section {
    padding: 60px 0 80px;
    background: #F9FAFB;
    min-height: 50vh;
}

.tnd-cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cart Items */
.tnd-cart-items {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tnd-cart-items-header {
    display: grid;
    grid-template-columns: 1fr 100px 120px 40px;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 24px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
}

.tnd-cart-item {
    display: grid;
    grid-template-columns: 1fr 100px 120px 40px;
    gap: 16px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #F3F4F6;
}

.tnd-cart-item:last-child {
    border-bottom: none;
}

.tnd-cart-item-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tnd-cart-item-image {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #F3F4F6;
}

.tnd-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tnd-cart-item-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 4px;
}

.tnd-cart-item-details .item-sku {
    font-size: 0.8rem;
    color: #9CA3AF;
}

.tnd-cart-item-price {
    font-weight: 600;
    color: #4338CA;
    font-size: 0.95rem;
}

.tnd-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    max-width: 110px;
}

.tnd-cart-item-qty .qty-btn {
    background: #F9FAFB;
    border: none;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    cursor: pointer;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tnd-cart-item-qty .qty-btn:hover {
    background: #E5E7EB;
    color: #4338CA;
}

.tnd-cart-item-qty input.qty {
    width: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #E5E7EB;
    border-right: 1px solid #E5E7EB;
    font-size: 0.9rem;
    font-weight: 600;
    height: 34px;
    padding: 0;
    -moz-appearance: textfield;
}

.tnd-cart-item-qty input.qty::-webkit-inner-spin-button,
.tnd-cart-item-qty input.qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.tnd-cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tnd-cart-item-remove:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.tnd-cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.tnd-cart-empty svg {
    width: 64px;
    height: 64px;
    color: #D1D5DB;
    margin-bottom: 20px;
}

.tnd-cart-empty h3 {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 8px;
}

.tnd-cart-empty p {
    color: #6B7280;
    margin-bottom: 24px;
}

.tnd-cart-empty .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #4338CA;
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.tnd-cart-empty .btn:hover {
    background: #4F46E5;
    transform: translateY(-2px);
}

/* Cart Sidebar / Summary */
.tnd-cart-summary {
    position: sticky;
    top: 120px;
}

.tnd-cart-summary-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tnd-cart-summary h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #E5E7EB;
}

.tnd-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.95rem;
}

.tnd-cart-summary-row.subtotal {
    color: #6B7280;
}

.tnd-cart-summary-row.discount {
    color: #059669;
}

.tnd-cart-summary-row.total {
    border-top: 2px solid #E5E7EB;
    margin-top: 8px;
    padding-top: 20px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1F2937;
}

.tnd-cart-summary-row .value {
    font-weight: 600;
}

/* Coupon */
.tnd-coupon-form {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.tnd-coupon-form input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.tnd-coupon-form input:focus {
    border-color: #4338CA;
    outline: none;
    box-shadow: 0 0 0 3px rgba(48,44,128,0.1);
}

.tnd-coupon-form button {
    padding: 10px 20px;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    color: #374151;
    white-space: nowrap;
    transition: all 0.2s;
}

.tnd-coupon-form button:hover {
    background: #E5E7EB;
}

/* Checkout button */
.tnd-btn-proceed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    background: #4338CA;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    margin-top: 8px;
}

.tnd-btn-proceed:hover {
    background: #4F46E5;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(48,44,128,0.3);
    color: #fff;
}

.tnd-cart-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.8rem;
    color: #9CA3AF;
}

.tnd-cart-secure svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   CHECKOUT PAGE
   ========================================================================== */

.tnd-checkout-section {
    padding: 60px 0 80px;
    background: #F9FAFB;
    min-height: 50vh;
}

.tnd-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Checkout Form */
.tnd-checkout-form {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tnd-checkout-form h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tnd-checkout-form h3 .step-number {
    width: 28px;
    height: 28px;
    background: #4338CA;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Form fields */
.woocommerce-checkout .form-row {
    margin-bottom: 16px;
}

.woocommerce-checkout .form-row label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.woocommerce-checkout .form-row input,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1F2937;
    background: #fff;
    transition: all 0.2s;
    font-family: inherit;
}

.woocommerce-checkout .form-row input:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus {
    border-color: #4338CA;
    outline: none;
    box-shadow: 0 0 0 3px rgba(48,44,128,0.1);
}

.woocommerce-checkout .form-row-wide {
    width: 100%;
}

.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    width: calc(50% - 8px);
    display: inline-block;
}

.woocommerce-checkout .form-row-first {
    margin-right: 16px;
}

/* Order Review / Summary */
.tnd-checkout-summary {
    position: sticky;
    top: 120px;
}

.tnd-checkout-summary-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tnd-checkout-summary h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #E5E7EB;
}

.tnd-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F3F4F6;
}

.tnd-order-item:last-of-type {
    border-bottom: none;
}

.tnd-order-item-image {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #F3F4F6;
    position: relative;
}

.tnd-order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tnd-order-item-qty-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: #4338CA;
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tnd-order-item-info {
    flex: 1;
}

.tnd-order-item-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 2px;
}

.tnd-order-item-info .item-price {
    font-size: 0.8rem;
    color: #6B7280;
}

.tnd-order-item-total {
    font-weight: 600;
    color: #4338CA;
    font-size: 0.95rem;
    white-space: nowrap;
}

.tnd-checkout-totals {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #E5E7EB;
}

.tnd-checkout-totals .row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #6B7280;
}

.tnd-checkout-totals .row.total {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1F2937;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 1px solid #E5E7EB;
}

.tnd-checkout-totals .row .value {
    font-weight: 600;
}

/* Place Order button */
.tnd-place-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    background: #4338CA;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 24px;
}

.tnd-place-order:hover {
    background: #4F46E5;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(48,44,128,0.3);
}

/* Payment methods */
.woocommerce-checkout #payment {
    background: transparent;
    border: none;
    padding: 0;
}

.woocommerce-checkout #payment ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.woocommerce-checkout #payment .payment_method {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.woocommerce-checkout #payment .payment_method.active,
.woocommerce-checkout #payment .payment_method:has(input:checked) {
    border-color: #4338CA;
    background: #F5F3FF;
}

.woocommerce-checkout #payment .payment_method label {
    font-weight: 600;
    color: #1F2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 0;
}

/* FIX: radio input dentro do label clássico não deve sobrepor o texto */
.woocommerce-checkout #payment .payment_method label input[type="radio"] {
    position: relative !important;
    flex-shrink: 0 !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

.woocommerce-checkout #payment .payment_box {
    padding: 12px 0 0 28px;
    font-size: 0.85rem;
    color: #6B7280;
}

/* Terms */
.woocommerce-terms-and-conditions-wrapper {
    margin-top: 16px;
    font-size: 0.85rem;
    color: #6B7280;
}

.woocommerce-terms-and-conditions-wrapper a {
    color: #4338CA;
}

/* ==========================================================================
   MINI CART POPUP (loaded globally via footer)
   ========================================================================== */

.tnd-cart-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.tnd-cart-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tnd-cart-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 440px;
    max-height: 80vh;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.tnd-cart-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.tnd-cart-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid #F3F4F6;
}

.tnd-cart-popup-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #059669;
    margin: 0;
}

.tnd-cart-popup-header h3 svg {
    color: #059669;
}

.tnd-cart-popup-close {
    background: #F3F4F6;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6B7280;
    transition: all 0.2s;
}

.tnd-cart-popup-close:hover {
    background: #E5E7EB;
    color: #1F2937;
}

.tnd-cart-popup-body {
    padding: 20px 28px;
    overflow-y: auto;
    flex: 1;
}

/* Mini cart items inside popup */
.tnd-minicart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tnd-minicart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #F9FAFB;
    border-radius: 12px;
    position: relative;
}

.tnd-minicart-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #D1D5DB;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.tnd-minicart-item-remove:hover {
    color: #DC2626;
    background: #FEE2E2;
}

.tnd-minicart-item-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.tnd-minicart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tnd-minicart-item-info {
    flex: 1;
    min-width: 0;
}

.tnd-minicart-item-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1F2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tnd-minicart-item-qty {
    display: block;
    font-size: 0.75rem;
    color: #9CA3AF;
}

.tnd-minicart-item-price {
    font-weight: 600;
    color: #4338CA;
    font-size: 0.9rem;
    white-space: nowrap;
}

.tnd-minicart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #E5E7EB;
    font-weight: 600;
    font-size: 1rem;
}

.tnd-minicart-total-value {
    color: #4338CA;
    font-size: 1.15rem;
    font-weight: 700;
}

.tnd-minicart-empty {
    text-align: center;
    color: #9CA3AF;
    padding: 24px;
}

/* Popup footer buttons */
.tnd-cart-popup-footer {
    padding: 16px 28px 24px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #F3F4F6;
}

.tnd-btn-view-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 2px solid #4338CA;
    color: #4338CA;
    background: transparent;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.tnd-btn-view-cart:hover {
    background: #F5F3FF;
    color: #4338CA;
}

.tnd-btn-checkout {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    background: #4338CA;
    color: #fff;
    border: 2px solid #4338CA;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.tnd-btn-checkout:hover {
    background: #4F46E5;
    border-color: #4F46E5;
    color: #fff;
    transform: translateY(-1px);
}

/* ==========================================================================
   NOTIFICATIONS
   ========================================================================== */

.tnd-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    white-space: nowrap;
}

.tnd-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tnd-notification-error {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.tnd-notification-success {
    background: #D1FAE5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.tnd-notification-info {
    background: #DBEAFE;
    color: #2563EB;
    border: 1px solid #BFDBFE;
}

/* ==========================================================================
   BUTTON STATES
   ========================================================================== */

.btn-add-cart.loading,
.btn-bundle.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-add-cart.added,
.btn-bundle.added {
    background: #059669 !important;
    border-color: #059669 !important;
}

.tnd-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tnd-spin 0.6s linear infinite;
}

@keyframes tnd-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   WOOCOMMERCE DEFAULT OVERRIDES
   ========================================================================== */

/* Override WooCommerce default button styles */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background: #4338CA;
    color: #fff;
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
    font-family: inherit;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background: #4F46E5;
    color: #fff;
}

/* Override WooCommerce notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: 12px;
    padding: 16px 24px;
    border: none;
    margin-bottom: 20px;
}

.woocommerce-message {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid #059669;
}

.woocommerce-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid #3B82F6;
}

.woocommerce-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid #DC2626;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    color: inherit;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .tnd-cart-layout,
    .tnd-checkout-layout {
        grid-template-columns: 1fr;
    }

    .tnd-cart-summary,
    .tnd-checkout-summary {
        position: static;
    }

    .wc-block-cart .wc-block-cart__sidebar,
    .wc-block-checkout .wc-block-checkout__sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .tnd-cart-items-header {
        display: none;
    }

    .tnd-cart-item {
        grid-template-columns: 1fr auto;
        gap: 12px;
    }

    .tnd-cart-popup {
        width: 95%;
        max-height: 85vh;
    }

    .tnd-cart-popup-footer {
        flex-direction: column;
    }

    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        width: 100%;
        display: block;
    }

    .woocommerce-checkout .form-row-first {
        margin-right: 0;
    }

    body.woocommerce-cart .site-main .section,
    body.woocommerce-checkout .site-main .section {
        padding: 24px 0 60px;
    }

    .wc-block-cart .wc-block-cart__main,
    .wc-block-cart .wc-block-cart__sidebar,
    .wc-block-checkout .wc-block-checkout__main,
    .wc-block-checkout .wc-block-checkout__sidebar {
        padding: 16px;
        border-radius: 12px;
    }
}
