/* Cart Page Styles */

/* Order Summary Section Styles */
.tf-cart-order-summary {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 2.5px;
    padding: 20px;
    margin: 20px 0;
}

.tf-cart-order-summary h3 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 -15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tf-cart-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.tf-cart-summary-item span:first-child {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.tf-cart-summary-item span:last-child {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

/* Mobile sticky bottom for cart checkout */
@media (max-width: 768px) {
    .tf-page-cart-checkout {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        border-top: 1px solid #e0e0e0 !important;
        padding: 15px !important;
        z-index: 1000 !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
        animation: slideUp 0.3s ease-in-out !important;
    }

    /* Slide up animation */
    @keyframes slideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* Add bottom padding to prevent content overlap */
    .tf-page-cart-wrap {
        padding-bottom: 150px !important;
    }

    /* Style the checkout section for mobile */
    .tf-cart-totals-discounts {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 12px !important;
        margin-top: 0px !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .tf-cart-totals-discounts h3 {
        margin: 0 !important;
        font-size: 16px !important;
        color: #666 !important;
        font-weight: 500 !important;
    }

    .tf-totals-total-value {
        font-size: 20px !important;
        font-weight: bold !important;
        color: #000 !important;
    }

    /* Hide payment methods on mobile for cleaner look */
    .tf-page-cart_imgtrust {
        display: none !important;
    }

    /* Make buy button more prominent on mobile */
    .cart-checkout-btn {
        margin-top: 8px !important;
    }

    .cart-checkout-btn .tf-btn {
        padding: 16px 20px !important;
        font-size: 16px !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        transition: all 0.2s ease !important;
    }

    .cart-checkout-btn .tf-btn:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }

    /* Mobile table optimizations */
    .tf-table-page-cart {
        font-size: 14px !important;
    }

    .tf-table-page-cart th {
        padding: 8px 4px !important;
        font-size: 12px !important;
    }

    .tf-table-page-cart td {
        padding: 12px 4px !important;
    }

    /* Mobile cart item styling */
    .tf-cart-item_product {
        min-width: 150px !important;
    }

    .cart-title {
        font-size: 14px !important;
        line-height: 1.3 !important;
        margin-bottom: 4px !important;
    }

    .cart-meta-variant {
        font-size: 12px !important;
        color: #666 !important;
        margin-bottom: 4px !important;
    }

    .remove-cart {
        font-size: 12px !important;
        color: #dc3545 !important;
    }

    .tf-cart-item_total {
        display: none !important;
    }

    #goTop {
        display: none !important;
    }

    /* Order Summary - not sticky on mobile */
    .tf-cart-order-summary {
        position: static !important;
        margin: 15px 0 !important;
        padding: 15px !important;
        border-radius: 2.5px;
        background: #f8f9fa !important;
        border: 1px solid #e0e0e0 !important;

    }

    .tf-cart-order-summary h3 {
        font-size: 18px !important;
        margin-bottom: -10px !important;
    }

    .tf-cart-summary-item {
        padding: 6px 0 !important;
    }

    .tf-cart-summary-item span:first-child,
    .tf-cart-summary-item span:last-child {
        font-size: 13px !important;
    }
}

/* Desktop styles - ensure normal behavior */
@media (min-width: 769px) {
    .tf-page-cart-checkout {
        position: static !important;
    }

    .tf-page-cart-wrap {
        padding-bottom: 0 !important;
    }

    .tf-free-shipping-bar {
        display: block !important;
    }

    .tf-page-cart_imgtrust {
        display: block !important;
    }

    /* Order Summary desktop styles */
    .tf-cart-order-summary {
        background: #f8f9fa;
        border: 1px solid #e0e0e0;
        border-radius: 2.5px;
        padding: 24px;
        margin: 24px 0;
    }

    .tf-cart-order-summary h3 {
        font-size: 18px;
        margin-bottom: -15px;
    }

    .tf-cart-summary-item {
        padding: 10px 0;
    }

    .tf-cart-summary-item span:first-child {
        font-size: 15px;
    }

    .tf-cart-summary-item span:last-child {
        font-size: 15px;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .tf-page-cart-checkout {
        padding: 20px !important;
    }

    .tf-cart-totals-discounts h3 {
        font-size: 18px !important;
    }

    .tf-totals-total-value {
        font-size: 20px !important;
    }
}
