/* Overlay و مودال */
.evpac-overlay {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
}

.evpac-overlay.evpac-show {
    display: flex;
}

.evpac-modal {
    width: 92%;
    max-width: 560px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(10px);
}

.evpac-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.evpac-thumb {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
}

.evpac-meta {
    flex: 1;
}

.evpac-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.evpac-close {
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #555;
}

.evpac-body {
    padding: 16px;
}

/* فیلدها و سلکت‌ها */
.evpac-field {
    margin-bottom: 10px;
}

.evpac-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.evpac-select,
.evpac-qty {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

.evpac-qty {
    max-width: 120px;
}

/* دکمه افزودن به سبد خرید */
.evpac-submit {
    width: 100%;
    padding: 10px 14px;
    margin-top: 8px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.evpac-submit:not(:disabled):hover {
    background-color: #218838;
    transform: scale(1.03);
}

.evpac-submit:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.7;
}

/* پیام‌های inline */
.evpac-inline-msg {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
}

/* کنترل تعداد */
.evpac-qty-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.evpac-qty-wrapper input.evpac-qty {
    width: 60px;
    text-align: center;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.qty-controls {
    display: flex;
    margin-right: 5px;
}

.qty-controls button {
    width: 30px;
    height: 30px;
    font-size: 16px;
    border: 1px solid #ccc;
    background: #f7f7f7;
    cursor: pointer;
    outline: none;
    margin-bottom: 2px;
    border-radius: 4px;
    transition: 0.2s;
}

.qty-controls button:hover {
    background: #e2e2e2;
}

/* آیتم‌های جانبی */
.evpac-side-items {
    margin-top: 12px;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.evpac-side-items h4 {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.evpac-side-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    cursor: pointer;
}

.evpac-side-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.evpac-side-item .name {
    flex: 1;
}

.evpac-side-item .price {
    font-weight: 600;
    color: #333;
}

/* قیمت نهایی */
.evpac-current-price {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}
.evpac-side-items { margin:10px 0; }
.evpac-side-item { display:flex; align-items:center; gap:8px; margin-bottom:5px; cursor:pointer; }
.evpac-side-item img { width:40px; height:40px; object-fit:cover; border-radius:4px; }
.evpac-side-item .name { font-weight:600; }
.evpac-side-item .price { color:#555; margin-left:auto; }
.evpac-side-item.selected {
    background-color: #e8f5e9;
    border: 1px solid #28a745;
    border-radius: 6px;
    transition: 0.2s;
}
.evpac-side-item input[type="checkbox"] {
    accent-color: #28a745;
    transform: scale(1.2);
}
.evpac-cart-box {
    background: #d4edda;
    color: #155724;
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 8px;
    text-align: center;
    font-weight: 600;
    animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
    from {opacity:0; transform:translateY(10px);}
    to {opacity:1; transform:translateY(0);}
}

/* واکنش‌گرایی موبایل */
@media (max-width: 480px) {
    .evpac-header {
        gap: 8px;
        padding: 12px;
    }
    .evpac-thumb {
        width: 60px;
        height: 60px;
    }
    .evpac-modal {
        max-width: 94%;
    }
    .evpac-side-item img {
        width: 32px;
        height: 32px;
    }
}
/* هر div با کلاس woopq-quantity که بعد از دکمه evpac-simple-open است را مخفی کن */
.evpac-simple-open ~ .woopq-quantity {
    display: none !important;
}
/* --- مودال --- */
.evpac-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.evpac-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: evpacFadeIn 0.3s ease;
}
@keyframes evpacFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* --- هدر مودال --- */
.evpac-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #eee;
    padding: 10px 15px;
    background: #fafafa;
    position: relative;
}
.evpac-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
}
.evpac-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.evpac-current-price {
    color: #1c7c1c;
    font-weight: 600;
    margin-top: 4px;
}
.evpac-close {
    position: absolute;
    left: 10px;
    top: 8px;
    background: none;
    border: none;
    font-size: 22px;
    color: #888;
    cursor: pointer;
}
.evpac-close:hover { color: #000; }

/* --- بدنه مودال --- */
.evpac-body {
    padding: 15px;
}

/* --- فیلدها --- */
.evpac-field {
    margin-top: 15px;
}
.evpac-label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

/* --- کنترل تعداد --- */
.qty-controls button {
    background: #eee;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.qty-controls button:hover {
    background: #ddd;
}

/* --- افزودنی‌ها (side items) --- */
.evpac-side-items h4 {
    font-size: 15px;
    margin-bottom: 8px;
}
.evpac-side-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
}
.evpac-side-item:hover {
    background: #f2fdf2;
    border-color: #b6e2b6;
}
.evpac-side-item img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
}
.evpac-side-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1c7c1c; /* رنگ سبز تیک */
    flex-shrink: 0;
}
.evpac-side-item .name {
    flex: 1;
    font-size: 14px;
    color: #333;
}
.evpac-side-item .price {
    font-weight: 600;
    font-size: 13px;
    color: #444;
}

/* --- دکمه افزودن --- */
.evpac-submit {
    width: 100%;
    background: #1c7c1c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.evpac-submit:hover {
    background: #178017;
}
.evpac-submit[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- پیام موفقیت زیر دکمه --- */
.evpac-success-msg {
    display: none;
    text-align: center;
    background: #e7f9e7;
    color: #1c7c1c;
    border-radius: 8px;
    padding: 8px 10px;
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
    animation: evpacMsgFade 0.4s ease;
}
@keyframes evpacMsgFade {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.quantity.woopq-quantity.woopq-quantity-default.woopq-input-type-number.woopq-type-default.woopq-quantity-plus-minus.buttons_added {
    display: none;
}
.qty-control-wrapper button {
    padding: 2px 13px;
	cursor:pointer;
}
.qty-control-wrapper button.qty-plus {
    padding: 2px 11px;
}
.qty-control-wrapper {
    margin-right: 5px;
}