/**
 * WooCommerce Cart Widget Styles
 * Persian/Farsi RTL layout for shopping cart and checkout
 */

.hep-woocommerce-cart {
    direction: rtl;
    text-align: right;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Progress Steps */
.hep-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px 0;
    position: relative;
}

.hep-progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.hep-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: 0 20px;
    transition: all 0.3s ease;
}

.hep-progress-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #6c757d;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.hep-progress-step.active .hep-progress-circle {
    background: #007bff;
    transform: scale(1.1);
}

.hep-progress-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.hep-progress-content p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    line-height: 1.4;
}

.hep-progress-step.active .hep-progress-content h4 {
    color: #007bff;
}

/* Cart Cards */
.hep-cart-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #f8f9fa;
}

/* Cart Table */
.hep-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.hep-cart-table th {
    background: #f8f9fa;
    padding: 15px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    text-align: right;
}

.hep-cart-table td {
    padding: 15px;
    border-bottom: 1px solid #f8f9fa;
    vertical-align: middle;
}

.hep-cart-table tr:last-child td {
    border-bottom: none;
}

/* Product Cell */
.hep-product-cell {
    width: 40%;
}

.hep-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hep-product-info img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e9ecef;
}

.hep-product-details h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.hep-product-details h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hep-product-details h4 a:hover {
    color: #007bff;
}

/* Price Cell */
.hep-price-cell {
    text-align: center;
    font-weight: 500;
    color: #495057;
}

/* Quantity Cell */
.hep-quantity-cell {
    text-align: center;
}

.hep-quantity-input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.hep-quantity-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Subtotal Cell */
.hep-subtotal-cell {
    text-align: center;
    font-weight: 600;
    color: #28a745;
}

/* Remove Cell */
.hep-remove-cell {
    text-align: center;
    width: 50px;
}

.hep-remove-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #dc3545;
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.hep-remove-item:hover {
    background: #c82333;
    transform: scale(1.1);
    color: #ffffff;
}

/* Coupon Section */
.hep-coupon-section {
    display: flex;
    gap: 15px;
    padding: 20px;
    align-items: center;
}

.hep-coupon-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.hep-coupon-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.hep-coupon-input::placeholder {
    color: #6c757d;
}

/* Buttons */
.hep-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.hep-btn-primary {
    background: #007bff;
    color: #ffffff;
}

.hep-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    color: #ffffff;
}

.hep-btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.hep-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    color: #ffffff;
}

/* Order Summary */
.hep-order-summary-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding: 20px 20px 0 20px;
}

.hep-order-summary {
    padding: 0 20px;
}

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

.hep-summary-row:last-child {
    border-bottom: none;
}

.hep-summary-row.hep-total {
    font-size: 16px;
    font-weight: 600;
    color: #28a745;
    border-top: 2px solid #e9ecef;
    margin-top: 10px;
    padding-top: 15px;
}

.hep-checkout-actions {
    padding: 20px;
    border-top: 1px solid #f8f9fa;
    margin-top: 20px;
}

.hep-checkout-btn {
    width: 100%;
    padding: 15px 24px;
    font-size: 16px;
    font-weight: 600;
}

/* Empty Cart */
.hep-empty-cart-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hep-empty-cart {
    text-align: center;
    padding: 80px 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #f8f9fa;
    position: relative;
    overflow: hidden;
}

.hep-empty-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
}

.hep-empty-cart-icon {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hep-empty-cart-icon svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.hep-empty-cart:hover .hep-empty-cart-icon svg {
    transform: scale(1.05);
}

.hep-empty-cart-title {
    font-size: 24px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 15px 0;
}

.hep-empty-cart-description {
    font-size: 16px;
    color: #6c757d;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

.hep-empty-cart-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.hep-shop-btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hep-shop-btn::before {
    content: '🛍️';
    font-size: 18px;
}

.hep-shop-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

/* Error Message */
.hep-error {
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hep-woocommerce-cart {
        padding: 15px;
    }

    .hep-empty-cart-container {
        padding: 20px 15px;
    }

    .hep-empty-cart {
        padding: 60px 30px;
    }

    .hep-empty-cart-icon svg {
        width: 100px;
        height: 100px;
    }

    .hep-empty-cart-title {
        font-size: 20px;
    }

    .hep-empty-cart-description {
        font-size: 14px;
    }

    .hep-progress-steps {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }

    .hep-progress-steps::before {
        display: none;
    }

    .hep-progress-step {
        padding: 0;
    }

    .hep-cart-table {
        font-size: 12px;
    }

    .hep-cart-table th,
    .hep-cart-table td {
        padding: 10px 8px;
    }

    .hep-product-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .hep-product-info img {
        width: 50px;
        height: 50px;
    }

    .hep-coupon-section {
        flex-direction: column;
        gap: 10px;
    }

    .hep-summary-row {
        font-size: 14px;
    }

    .hep-summary-row.hep-total {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .hep-empty-cart-container {
        padding: 15px 10px;
    }

    .hep-empty-cart {
        padding: 40px 20px;
    }

    .hep-empty-cart-icon svg {
        width: 80px;
        height: 80px;
    }

    .hep-empty-cart-title {
        font-size: 18px;
    }

    .hep-empty-cart-description {
        font-size: 13px;
        margin-bottom: 30px;
    }

    .hep-shop-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .hep-cart-table {
        display: block;
        overflow-x: auto;
    }

    .hep-cart-table th,
    .hep-cart-table td {
        min-width: 120px;
    }

    .hep-product-cell {
        min-width: 200px;
    }

    .hep-progress-circle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .hep-progress-content h4 {
        font-size: 14px;
    }

    .hep-progress-content p {
        font-size: 11px;
    }
}

/* WooCommerce Quantity Input Override */
.hep-quantity-cell .quantity {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hep-quantity-cell .quantity input[type="number"] {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.hep-quantity-cell .quantity input[type="number"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Animation for progress steps */
@keyframes progressPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hep-progress-step.active .hep-progress-circle {
    animation: progressPulse 2s infinite;
}

/* Focus styles for accessibility */
.hep-coupon-input:focus,
.hep-quantity-input:focus,
.hep-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
} 