/* ===== woocommerce cart ===== */

.tawon-cart-wrapper {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
    direction: rtl;
}

/* السلة الفارغة */
.empty-cart-section {
    background: white;
    border-radius: 20px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.empty-icon {
    margin-bottom: 30px;
}

.empty-cart-section h2 {
    font-size: 28px;
    color: #2d3748;
    margin-bottom: 12px;
    font-weight: 700;
}

.empty-cart-section p {
    color: #718096;
    font-size: 16px;
    margin-bottom: 30px;
}

.return-home-btn {
    display: inline-block;
    background: #7BA888;
    color: white;
    padding: 14px 40px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.return-home-btn:hover {
    background: #699977;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123,168,136,0.4);
}

/* Grid Layout */
.cart-content-grid {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 30px;
    margin-bottom: 60px;
}

/* قسم المنتجات */
.cart-items-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: grid;
    grid-template-columns: 100px 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.cart-item-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    grid-row: 1 / 3;
}

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

.item-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    line-height: 1.4;
}

.item-title a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s;
}

.item-title a:hover {
    color: #7BA888;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-badge {
    background: #f7fafc;
    color: #718096;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.item-price {
    font-size: 20px;
    font-weight: 700;
    color: #7BA888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.currency-label {
    font-size: 14px;
    font-weight: 500;
    color: #718096;
}

.quantity-controls {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:hover:not(:disabled) {
    background: #7BA888;
    border-color: #7BA888;
}

.qty-btn:hover:not(:disabled) svg {
    stroke: white;
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f7fafc;
}

.qty-display {
    font-weight: 600;
    font-size: 16px;
    min-width: 30px;
    text-align: center;
    color: #2d3748;
}

.quantity-controls > div {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 10px;
}

.remove-item-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    background: #fff5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-item-btn:hover {
    background: #e53e3e;
}

.remove-item-btn:hover svg {
    stroke: white;
}

.remove-item-btn svg {
    stroke: #e53e3e;
    transition: stroke 0.3s;
}

.order-summary-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
    text-align: right;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f7fafc;
}

.row-label {
    color: #718096;
    font-size: 15px;
    font-weight: 500;
}

.row-value {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

.discount-row .discount-amount {
    color: #e53e3e !important;
    font-weight: 700;
}

.total-row {
    padding: 20px 0 !important;
    margin-top: 12px;
    border-top: 2px solid #e2e8f0 !important;
    border-bottom: none !important;
}

.total-row .row-label {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
}

.total-row .total-amount {
    font-size: 24px;
    font-weight: 700;
    color: #7BA888;
}

.coupon-section {
    margin: 24px 0;
}

.toggle-coupon-btn {
    width: 100%;
    background: #f7fafc;
    border: none;
    padding: 14px;
    border-radius: 10px;
    color: #7BA888;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.toggle-coupon-btn:hover {
    background: #e2e8f0;
}

.coupon-form-wrapper {
    margin-top: 16px;
}

.coupon-form {
    display: flex;
    gap: 10px;
}

.coupon-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    text-align: right;
    transition: border-color 0.3s;
}

.coupon-input:focus {
    outline: none;
    border-color: #7BA888;
}

.apply-coupon-btn {
    background: #7BA888;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.apply-coupon-btn:hover {
    background: #699977;
}

.action-buttons {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-btn {
    width: 100%;
    background: #7BA888;
    color: white;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #699977;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(123,168,136,0.4);
}

.continue-shopping-link {
    text-align: center;
    color: #718096;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 12px;
    transition: color 0.3s;
}

.continue-shopping-link:hover {
    color: #7BA888;
}

.help-section {
    background: linear-gradient(135deg, #7BA888 0%, #699977 100%);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    color: white;
    margin-top: 40px;
}

.help-section h3 {
    font-size: 28px;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.help-section p {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 30px;
}

.help-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.help-btn {
    background: white;
    color: #7BA888;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.help-btn.secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

.help-btn.secondary:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 1024px) {
    .cart-content-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary-box {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-item-card {
        grid-template-columns: 80px 1fr;
        gap: 16px;
        padding: 20px;
    }
    
    .item-image {
        width: 80px;
        height: 80px;
        grid-row: 1 / 3;
    }
    
    .quantity-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .quantity-controls > div {
        justify-content: center;
    }
    
    .item-price {
        justify-content: flex-start;
    }
    
    .help-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .quantity-controls {
        padding-top: 12px;
    }
    
    .item-title {
        font-size: 16px;
    }
    
    .item-price {
        font-size: 18px;
    }
}

.woocommerce-cart-form,
.woocommerce table.shop_table,
.woocommerce .cart-collaterals,
form.woocommerce-cart-form {
    display: none !important;
}

/* Checkout */
body.woocommerce-checkout {
    background: #f5f5f5;
}

.woocommerce-checkout .woocommerce {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.woocommerce-checkout #customer_details {
    width: 58%;
    float: right;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-left: 2%;
}

.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
    width: 38%;
    float: left;
}

#order_review_heading {
    background: white;
    padding: 20px 30px;
    border-radius: 15px 15px 0 0;
    margin-bottom: 0;
    font-size: 22px;
    font-weight: bold;
    color: #2c3e50;
}

#order_review {
    background: white;
    padding: 30px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
}

.woocommerce-checkout h3 {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.woocommerce form .form-row {
    margin-bottom: 20px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
    direction: rtl;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: #7cb89d;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 184, 157, 0.15);
}

.woocommerce form .form-row label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
    text-align: right;
}

.woocommerce form .form-row label .required {
    color: #e74c3c;
    margin-right: 3px;
}

.woocommerce-billing-fields .form-row-first,
.woocommerce-billing-fields .form-row-last {
    width: 48%;
    float: right;
}

.woocommerce-billing-fields .form-row-first {
    margin-left: 4%;
}

.woocommerce-billing-fields .form-row-wide {
    width: 100%;
    clear: both;
}

.woocommerce-checkout-payment {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.wc_payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc_payment_method {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.wc_payment_method:hover,
.wc_payment_method.checked {
    border-color: #7cb89d;
    box-shadow: 0 4px 12px rgba(124, 184, 157, 0.2);
}

.wc_payment_method input[type="radio"] {
    margin-left: 15px;
}

.wc_payment_method label {
    font-weight: 600;
    cursor: pointer;
    margin-right: 0;
}

.payment_box {
    background: #f8f9fa;
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
}

#place_order {
    width: 100%;
    background: linear-gradient(135deg, #7cb89d 0%, #5a9d7e 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(124, 184, 157, 0.3);
    text-align: center;
}

#place_order:hover {
    background: linear-gradient(135deg, #5a9d7e 0%, #4a8a6a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 184, 157, 0.4);
}

.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 15px 10px;
    text-align: right;
    border-bottom: 1px solid #e9ecef;
}

.woocommerce-checkout-review-order-table thead th {
    font-weight: 600;
    color: #2c3e50;
    background: #f8f9fa;
}

.woocommerce-checkout-review-order-table .cart_item td {
    padding: 20px 10px;
}

.woocommerce-checkout-review-order-table .product-name {
    font-weight: 600;
    color: #2c3e50;
}

.woocommerce-checkout-review-order-table .product-total {
    font-weight: bold;
    color: #7cb89d;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    padding-top: 20px;
    border-bottom: none;
    border-top: 2px solid #7cb89d;
}

.woocommerce-checkout-review-order-table img {
    max-width: 60px;
    border-radius: 8px;
    margin-left: 15px;
    vertical-align: middle;
}

.woocommerce-form-coupon-toggle {
    margin-bottom: 20px;
}

.checkout_coupon {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

@media (max-width: 992px) {
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        width: 100%;
        float: none;
        margin: 0 0 20px 0;
    }
    
    #order_review {
        position: relative;
        top: 0;
    }
    
    .woocommerce-billing-fields .form-row-first,
    .woocommerce-billing-fields .form-row-last {
        width: 100%;
        float: none;
        margin-left: 0;
    }
}

.woocommerce-checkout .woocommerce-NoticeGroup {
    margin-bottom: 20px;
}

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    background: #fff3cd;
    border-right: 4px solid #ffc107;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: right;
}

.woocommerce-error {
    background: #f8d7da;
    border-right-color: #dc3545;
}

.woocommerce-message {
    background: #d1ecf1;
    border-right-color: #0dcaf0;
}

.woocommerce-checkout form.checkout:after,
.woocommerce-checkout #customer_details:after {
    content: "";
    display: table;
    clear: both;
}

