/* ========================================
   WC QRCODE - کارت دقیقاً مثل عکس
   ======================================== */

.wc-qrcode-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 30px 0;
    direction: rtl;
}

.wc-qrcode-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 13px 7px rgb(173 173 173 / 13%);
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.wc-qrcode-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

/* --- تصویر QR --- */
.wc-qrcode-card-image {
    padding: 30px 20px 20px;
    background: #fff;
}

.wc-qrcode-card-image img {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* --- خط جداکننده --- */
.wc-qrcode-card-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0 15px 10px 15px;
}

/* --- عنوان محصول --- */
.wc-qrcode-product-title {
    margin: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #212121;
    line-height: 1.5;
}

/* --- دکمه‌ها --- */
.wc-qrcode-card-actions {
    padding: 5px 15px 25px 15px;
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex-wrap: wrap;
}

.wc-qrcode-btn {
    display: flex;
    width: 45% !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* --- آیکون‌های Outline (بدون Fill) --- */
.wc-qrcode-btn i {
    font-size: 13px;
    margin-left: 5px;
    width: 15px;
    text-align: center;
    color: inherit;
    opacity: 0.95;
}

/* دکمه‌های قرمز (کنار هم) */
.wc-qrcode-card-actions>.wc-qrcode-btn:not(.wc-qrcode-btn-download) {
    flex: 1;
    background: #e91e63;
    color: white;
}

.wc-qrcode-card-actions>.wc-qrcode-btn:not(.wc-qrcode-btn-download):hover {
    background: #c2185b;
    transform: translateY(-2px);
}

/* دکمه دانلود (عرض کامل) */
.wc-qrcode-btn-download {
    background: #00c853;
    color: white;
    min-width: 100%;
}

.wc-qrcode-btn-download:hover {
    background: #00b140;
    transform: translateY(-2px);
    color: white;
}

/* دکمه ویرایش - فعال ولی بدون لینک */
.wc-qrcode-btn-edit {
    background: #e91e63;
    color: white;
    cursor: pointer;
    opacity: 1;
}

.wc-qrcode-btn-edit:hover {
    background: #c2185b;
    transform: translateY(-2px);
}

/* --- ریسپانسیو --- */
@media (max-width: 1024px) {
    .wc-qrcode-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* تبلت کوچک: ۲ کارت */
@media (max-width: 768px) and (min-width: 641px) {
    .wc-qrcode-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- موبایل: ۲ کارت در ردیف --- */
@media (max-width: 640px) {
    .wc-qrcode-cards-container {
        grid-template-columns: repeat(2, 1fr);
        /* ۲ کارت */
        gap: 12px;
        padding: 0 8px;
    }

    .wc-qrcode-card {
        border-radius: 8px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    }

    .wc-qrcode-card-image {
        padding: 20px 12px 15px;
    }

    .wc-qrcode-card-image img {
        max-width: 130px;
    }

    .wc-qrcode-product-title {
        font-size: 12px;
        margin: 8px 10px;
    }

    .wc-qrcode-btn {
        font-size: 11px;
        padding: 7px 10px;
        gap: 3px;
        min-width: 100%;
    }

    .wc-qrcode-btn i {
        font-size: 12px;
        margin-left: 4px;
    }

    .wc-qrcode-card-actions {
        padding: 5px 10px 18px;
        gap: 5px;
    }

    .wc-qrcode-help-message {
        font-size: 12px !important;
        padding: 15px !important;
        line-height: 1.7;
    }
}

/* ========================================
   WC QRCODE - صفحه جزئیات (جدول + نقشه)
   ======================================== */

.wc-qrcode-detail-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
}

.wc-qrcode-detail-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.wc-qrcode-detail-table th,
.wc-qrcode-detail-table td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid #f0f0f0;
}

.wc-qrcode-detail-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    width: 28%;
    font-size: 14.5px;
}

.wc-qrcode-detail-table td {
    color: #34495e;
    font-size: 15px;
}

.wc-qrcode-detail-table tr:last-child td,
.wc-qrcode-detail-table tr:last-child th {
    border-bottom: none;
}

.wc-qrcode-detail-table .phone {
    direction: ltr;
    text-align: right;
}

/* --- ریسپانسیو --- */
@media (max-width: 640px) {
    .wc-qrcode-detail-container {
        padding: 15px;
    }

    .wc-qrcode-detail-table {
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .wc-qrcode-detail-table thead {
        display: none;
        /* هدر مخفی */
    }

    .wc-qrcode-detail-table tr {
        display: block;
        margin-bottom: 18px;
        border: 1px solid #eee;
        border-radius: 10px;
        padding: 12px;
        background: #f8f9fa;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .wc-qrcode-detail-table th,
    .wc-qrcode-detail-table td {
        display: block;
        text-align: center !important;
        border: none;
        padding: 6px 0;
        width: 100%;
    }

    .wc-qrcode-detail-table th {
        font-size: 13px;
        color: #666;
        font-weight: 500;
        background: transparent;
    }

    .wc-qrcode-detail-table td {
        font-size: 16px;
        font-weight: 600;
        color: #212121;
    }

    .wc-qrcode-detail-table .phone {
        direction: ltr;
        font-size: 18px !important;
    }

    .wc-qrcode-phone-link {
        font-size: 18px !important;
    }
}

.single-qr_code_page .wd-single-post-header,
.single-qr_code_page .wd-page-nav,
.single-qr_code_page .wd-single-footer {
    display: none;
}

/* --- شماره موبایل قابل کلیک (بدون آیکون) --- */
.wc-qrcode-phone-link {
    color: #27ae60 !important;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.wc-qrcode-phone-link:hover {
    color: #1e8449 !important;
    text-decoration: underline;
}

/* --- دکمه ویرایش اطلاعات (کوچیکتر) --- */
.wc-qrcode-edit-button-wrapper {
    text-align: right;
    margin: 18px 0 22px;
    direction: rtl;
}

/* --- دکمه ویرایش اطلاعات (برای button و a) --- */
.wc-qrcode-edit-info-btn,
.wc-qrcode-toggle-edit-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    background: #e91e63 !important;
    color: white !important;
    padding: 9px 16px;
    border-radius: 6px !important;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(233, 30, 99, 0.25);
    transition: all 0.3s ease;
    cursor: pointer;
}

.wc-qrcode-edit-info-btn:hover,
.wc-qrcode-toggle-edit-btn:hover {
    background: #c2185b;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(233, 30, 99, 0.35);
    color: white;
}

.wc-qrcode-edit-info-btn i,
.wc-qrcode-toggle-edit-btn i {
    font-size: 14px;
}

/* --- موبایل --- */
@media (max-width: 640px) {
    .wc-qrcode-edit-button-wrapper {
        text-align: center;
        margin: 16px 0 20px;
    }

    .wc-qrcode-edit-info-btn {
        padding: 8px 14px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }
}

/* --- اسپینر و آیکون‌ها --- */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- دکمه‌های ویرایش --- */
.wc-qrcode-toggle-edit-btn,
.wc-qrcode-add-row-btn,
.wc-qrcode-save-btn,
.wc-qrcode-confirm-add-btn {
    font-family: inherit !important;
}

/* --- وقتی غیرفعاله --- */
.wc-qrcode-save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* --- فرم افزودن ردیف (ریسپانسیو) --- */
@media (max-width: 640px) {
    .wc-qrcode-add-row-form>div {
        flex-direction: column;
    }

    .wc-qrcode-add-row-form input,
    .wc-qrcode-add-row-form button {
        width: 100% !important;
        min-width: auto !important;
    }
}

/* ========================================
   دکمه‌های تماس و پیام
   ======================================== */

.wc-qrcode-contact-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.wc-qrcode-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    justify-content: center;
}

.wc-qrcode-call-btn {
    background: #27ae60;
    color: white;
}

.wc-qrcode-call-btn:hover {
    background: #1e8449;
    transform: translateY(-2px);
}

.wc-qrcode-sms-btn {
    background: #e91e63;
    color: white;
}

.wc-qrcode-sms-btn:hover {
    background: #c2185b;
    transform: translateY(-2px);
}

.wc-qrcode-contact-btn i {
    font-size: 16px;
}

/* موبایل: دکمه‌ها عمودی */
@media (max-width: 640px) {
    .wc-qrcode-contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .wc-qrcode-contact-btn {
        width: 100%;
    }
}