:root {
    --primary: #83b735;
    --red: #ff3b30;
    --bg: #f5f5f7;
    --card: #ffffff;
    --text: #1c1c1e;
    --gray: #8e8e93;
    --border: #e5e5ea;
}

body.pmc-cart-page {
    background-color: var(--bg);
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn';
    padding-bottom: 100px;
    /* فضای خالی برای فوتر چسبان */
    direction: rtl;
}

/* هدر */
.app-header {
    background: var(--card);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right h1 {
    margin: 0;
    font-size: 18px;
    color: var(--text);
}

.icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    padding: 0;
    display: flex;
}

.count-badge {
    font-size: 12px;
    color: var(--gray);
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 20px;
}

.cart-container {
    padding: 20px;
    margin: 0 auto;
}

/* نوتیفیکیشن‌های ووکامرس */
.woocommerce-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #c8e6c9;
}

.woocommerce-message .button {
    float: left;
    text-decoration: none;
    color: #2e7d32;
    font-weight: bold;
}

/* حالت خالی */
.empty-state {
    text-align: center;
    margin-top: 50px;
}

.empty-icon {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-icon i {
    width: 60px;
    height: 60px;
    font-size: 60px;
}

.empty-state h2 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 30px;
}

.btn-primary {
    background: var(--text);
    color: white;
    padding: 12px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
}

/* کارت‌های سبد خرید */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-card {
    background: var(--card);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card-thumb img {
    width: 70px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
    min-width: 70px;
}

.card-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}

.product-title a {
    text-decoration: none;
    color: var(--text);
}

/* اصلاح متادیتای محصول (اگر وریشن باشد) */
.product-name .variation {
    display: flex;
    font-size: 12px;
    color: var(--gray);
    gap: 5px;
    margin-top: 5px;
}

.product-name .variation dt {
    font-weight: normal;
}

.product-name .variation dd {
    margin: 0;
    font-weight: bold;
}



/* اصلاح قیمت */
.price-box .amount,
.total-price .amount {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 5px;
    color: var(--text);
    font-weight: bold;
    font-size: 15px;
}

.price-box .woocommerce-Price-currencySymbol {
    font-size: 0.8em;
    color: var(--gray);
}

.remove-btn {
    color: var(--gray);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.remove-btn:hover {
    background: #ffebee;
    color: var(--red);
}

/* فوتر چسبان */
.cart-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.total-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.total-row span {
    font-size: 11px;
    color: var(--gray);
}

.total-price {
    color: var(--primary);
    font-size: 18px;
}

.checkout-btn {
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

/* استایل‌های کنترلر تعداد و دیجیتال */
.actions {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: end;
}
.price-box {
    margin: 15px 0;
}

.pmc-qty-controller {
    display: flex;
    align-items: center;
    background: var(--bg);
    border-radius: 8px;
    padding: 3px;
}

.pmc-qty-controller button {
    background: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.pmc-qty-controller .qty-val {
    min-width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    margin: 0 8px;
}

.pmc-digital-badge {
    font-size: 11px;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 6px;
}

/* استایل‌های فرم کد تخفیف */
.pmc-coupon-wrapper {
    background: var(--card);
    padding: 15px 20px;
    margin-bottom: 20px;
    border-top: 1px solid var(--border);
    max-width: 350px;
}

.pmc-coupon-form {
    display: flex;
    gap: 10px;
}

.pmc-coupon-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.pmc-coupon-form input:focus {
    border-color: var(--primary);
}

.pmc-coupon-form button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.pmc-applied-coupon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 13px;
}

.remove-coupon-btn {
    color: #d32f2f;
    text-decoration: none;
    display: flex;
    align-items: center;
}