@charset "UTF-8";
/* =====================================================
   Single Product — Cartonparsiran 2026
   ===================================================== */

.ps-single-product { background: #fff; }

/* Breadcrumb */
.ps-sp-breadcrumb-wrap { padding: 18px 0; background: var(--ps-bg); border-bottom: 1px solid var(--ps-line); }
.ps-sp-breadcrumb-wrap .breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: .86rem; color: var(--ps-muted); }
.ps-sp-breadcrumb-wrap .breadcrumbs li { display: inline-flex; align-items: center; }
.ps-sp-breadcrumb-wrap .breadcrumbs a { color: var(--ps-ink-soft); font-weight: 700; }
.ps-sp-breadcrumb-wrap .breadcrumbs a:hover { color: var(--ps-primary); }
.ps-sp-breadcrumb-wrap .breadcrumbs .separator { color: #b9c6cc; margin: 0 4px; }
.ps-sp-breadcrumb-wrap .breadcrumbs strong { color: var(--ps-ink); font-weight: 800; }

/* Hero */
.ps-sp-hero { padding: 36px 0 72px; background: #fff; }
.ps-sp-header { margin: 0 0 36px; padding: 0 0 22px; border-bottom: 1px solid var(--ps-line); text-align: right; }
.ps-sp-header .ps-eyebrow { margin: 0 0 12px !important; }
.ps-sp-header .ps-sp-title { margin: 0 0 14px; font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height: 1.5; color: var(--ps-ink); letter-spacing: -.03em; }
.ps-sp-header .ps-sp-rating { margin: 0; }
.ps-sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

/* گالری */
.ps-sp-gallery-main { display: grid; place-items: center; min-height: 420px; padding: 22px; border: 1px solid var(--ps-line); border-radius: var(--ps-radius); background: var(--ps-bg); overflow: hidden; }
.ps-sp-main-img { width: 100%; max-height: 520px; object-fit: contain; transition: transform .35s ease; }
.ps-sp-gallery-main:hover .ps-sp-main-img { transform: scale(1.03); }
.ps-sp-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ps-sp-thumb { width: 78px; height: 78px; padding: 6px; border: 2px solid var(--ps-line); border-radius: 11px; background: #fff; cursor: pointer; transition: border-color .2s ease, transform .2s ease; overflow: hidden; }
.ps-sp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ps-sp-thumb:hover { transform: translateY(-2px); }
.ps-sp-thumb.is-active { border-color: var(--ps-primary); box-shadow: 0 0 0 3px var(--ps-primary-light); }

/* اطلاعات */
.ps-sp-info { padding-top: 6px; }
.ps-sp-title { margin: 0 0 18px; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.ps-sp-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: .88rem; color: var(--ps-muted); }
.ps-sp-stars { display: inline-block; position: relative; color: #d6dde1; letter-spacing: 2px; font-family: Arial, sans-serif; }
.ps-sp-stars::before { content: "★★★★★"; }
.ps-sp-stars::after { content: "★★★★★"; position: absolute; inset: 0 auto 0 0; width: calc(var(--rating, 0) / 5 * 100%); overflow: hidden; color: var(--ps-accent); white-space: nowrap; }
.ps-sp-rating-text { font-weight: 700; }

/* buybox */
.ps-sp-buybox { padding: 24px; border: 1px solid var(--ps-line); border-radius: var(--ps-radius); background: var(--ps-bg-warm); }
.ps-sp-price-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.ps-sp-price { font-size: 1.4rem; font-weight: 900; color: var(--ps-primary); line-height: 1.5; }
.ps-sp-price del { color: var(--ps-muted); font-weight: 600; font-size: 1rem; margin-left: 8px; }
.ps-sp-price ins { text-decoration: none; }
.ps-sp-stock { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 800; }
.ps-sp-stock.is-in { color: #0d7a4f; background: #e0f5ec; }
.ps-sp-stock.is-out { color: #b03a2e; background: #fbe3e0; }
.ps-sp-sku { margin: 0 0 18px !important; color: var(--ps-muted); font-size: .86rem; }
.ps-sp-sku strong { color: var(--ps-ink); }

/* =====================================================
   فرم ووکامرس — چیدمان با Flex
   ===================================================== */
.ps-single-product form.cart {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
}

.ps-single-product form.cart .cpi-design-options {
    flex: 0 0 100%;
    order: 1;
    margin: 0;
}

.ps-single-product form.cart .quantity {
    order: 2;
    margin: 0;
}

.ps-single-product form.cart .single_add_to_cart_button,
.ps-single-product form.cart button.button.alt {
    flex: 0 0 100%;
    order: 3;
    width: 100%;
    margin-top: 6px;
}

/* =====================================================
   فیلد تعداد
   ===================================================== */
.ps-single-product .quantity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--ps-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(24, 43, 58, .04);
}
.ps-single-product .quantity input.qty {
    width: 80px;
    height: 44px;
    padding: 0 8px;
    border: none;
    border-radius: 10px;
    background: var(--ps-bg);
    color: var(--ps-ink);
    font-family: 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    text-align: center;
    line-height: 1;
    pointer-events: none;
    caret-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -moz-appearance: textfield;
    appearance: textfield;
}
.ps-single-product .quantity input.qty::-webkit-outer-spin-button,
.ps-single-product .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ps-single-product .quantity input.qty:focus { outline: none; box-shadow: 0 0 0 3px rgba(8, 127, 140, .15); }

/* دکمه‌های + / − */
.ps-single-product .cpi-qty-buttons { display: inline-flex; align-items: center; gap: 6px; }
.ps-single-product .cpi-qty-buttons button {
    display: grid; place-items: center;
    width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--ps-line); border-radius: 10px;
    background: #fff; color: var(--ps-ink);
    font-family: 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
    font-size: 1.25rem; font-weight: 900; line-height: 1;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .15s ease, box-shadow .18s ease;
    user-select: none;
}
.ps-single-product .cpi-qty-buttons button:hover {
    background: var(--ps-primary-light); border-color: var(--ps-primary); color: var(--ps-primary);
    box-shadow: 0 3px 10px rgba(8, 127, 140, .15); transform: translateY(-1px);
}
.ps-single-product .cpi-qty-buttons button:active { transform: translateY(0); box-shadow: none; }
.ps-single-product .cpi-qty-buttons button:disabled { opacity: .4; cursor: not-allowed; background: #f5f7f8; color: var(--ps-muted); transform: none; box-shadow: none; }

/* =====================================================
   دکمه افزودن به سبد — فونت IRANSans
   ===================================================== */
.ps-single-product .single_add_to_cart_button,
.ps-single-product button.button.alt {
    display: block;
    width: 100%;
    min-height: 54px;
    padding: 14px 26px;
    border: none;
    border-radius: 12px;
    background: var(--ps-primary) !important;
    color: #fff !important;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, sans-serif !important;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.6;
    letter-spacing: 0;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 8px 20px rgba(8, 127, 140, .2);
}
.ps-single-product .single_add_to_cart_button:hover,
.ps-single-product button.button.alt:hover {
    background: var(--ps-primary-dark) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(8, 127, 140, .28);
}
.ps-single-product .single_add_to_cart_button:focus-visible { outline: 3px solid var(--ps-accent); outline-offset: 2px; }

/* =====================================================
   گزینه‌های طرح
   ===================================================== */
.cpi-design-options { margin: 16px 0; padding: 18px; border: 1px solid var(--ps-line); border-radius: 14px; background: #fff; }
.cpi-design-title { margin: 0 0 14px !important; font-weight: 800; color: var(--ps-ink); font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.cpi-design-title::before { content: ""; display: inline-block; width: 4px; height: 18px; border-radius: 4px; background: var(--ps-accent); }
.cpi-design-option {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 0 0 10px; padding: 12px 14px;
    border: 1.5px solid var(--ps-line); border-radius: 11px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
    font-size: .9rem; line-height: 1.7; color: var(--ps-text); background: #fff;
}
.cpi-design-option:last-of-type { margin-bottom: 0; }
.cpi-design-option:hover { border-color: var(--ps-primary); background: #f6fbfb; }
.cpi-design-option input[type="radio"] { flex-shrink: 0; margin-top: 4px; width: 18px; height: 18px; accent-color: var(--ps-primary); cursor: pointer; }
.cpi-design-option > span { flex: 1; }
.cpi-design-option em { display: block; margin-top: 4px; color: var(--ps-primary); font-style: normal; font-weight: 800; font-size: .84rem; }
.cpi-design-option:has(input[type="radio"]:checked) { border-color: var(--ps-primary); background: var(--ps-primary-light); box-shadow: 0 0 0 3px rgba(8, 127, 140, .08); }
.cpi-design-option.is-checked { border-color: var(--ps-primary); background: var(--ps-primary-light); box-shadow: 0 0 0 3px rgba(8, 127, 140, .08); }

/* آپلودر */
.cpi-upload-wrap { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--ps-line); }
.cpi-dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; min-height: 150px; padding: 22px 18px;
    border: 2px dashed #9eb3bb; border-radius: 14px;
    background: var(--ps-bg); text-align: center; cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
    outline: none;
}
.cpi-dropzone:hover, .cpi-dropzone:focus-visible { border-color: var(--ps-primary); background: var(--ps-primary-light); }
.cpi-dropzone.is-dragover { border-color: var(--ps-primary); background: var(--ps-primary-light); transform: scale(1.01); box-shadow: 0 0 0 4px rgba(8, 127, 140, .1); }
.cpi-dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.cpi-dropzone-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #fff; color: var(--ps-primary); font-size: 1.6rem; font-weight: 900; box-shadow: 0 4px 10px rgba(8, 127, 140, .12); }
.cpi-dropzone strong { color: var(--ps-ink); font-size: .95rem; font-weight: 800; }
.cpi-dropzone-hint { color: var(--ps-muted); font-size: .82rem; line-height: 1.6; }
.cpi-dropzone-preview { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 11px; background: #fff; border: 1px solid var(--ps-line); font-size: .88rem; color: var(--ps-ink); text-align: right; }
.cpi-dropzone-preview .cpi-file-icon { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--ps-primary-light); color: var(--ps-primary); font-weight: 900; font-size: .82rem; }
.cpi-dropzone-preview .cpi-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.cpi-dropzone-preview .cpi-file-remove { flex-shrink: 0; width: 32px; height: 32px; border: none; border-radius: 8px; background: #fbe3e0; color: #b03a2e; font-size: 1.2rem; font-weight: 900; line-height: 1; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.cpi-dropzone-preview .cpi-file-remove:hover { background: #f7c9c4; transform: scale(1.05); }
.cpi-dropzone.has-file { min-height: auto; padding: 12px; border-style: solid; border-color: var(--ps-primary); background: var(--ps-primary-light); }
.cpi-design-price-note { margin: 12px 0 0 !important; padding: 10px 12px; border-radius: 9px; background: #fff7ea; border-right: 3px solid var(--ps-accent); color: #8a5a14; font-size: .86rem; font-weight: 700; line-height: 1.7; }

/* خلاصه قیمت زنده */
.ps-sp-live-total { margin: 0 0 16px; padding: 14px 16px; border: 1.5px solid var(--ps-primary); border-radius: 12px; background: #fff; font-size: .9rem; box-shadow: 0 6px 16px rgba(8, 127, 140, .06); }
.ps-sp-live-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; color: var(--ps-text); }
.ps-sp-live-row span { color: var(--ps-muted); font-size: .86rem; }
.ps-sp-live-row strong { color: var(--ps-ink); font-weight: 800; font-size: .92rem; }
.ps-sp-live-row.is-total { margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--ps-line); font-size: 1.02rem; }
.ps-sp-live-row.is-total span { color: var(--ps-ink); font-weight: 800; font-size: .95rem; }
.ps-sp-live-row.is-total strong { color: var(--ps-primary); font-size: 1.2rem; font-weight: 900; }

/* توضیحات و کنار */
.ps-sp-details-section { background: var(--ps-bg); }
.ps-sp-details-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 26px; align-items: start; }
.ps-sp-desc-card, .ps-sp-specs-card { padding: 30px; border: 1px solid var(--ps-line); border-radius: var(--ps-radius); background: #fff; }
.ps-sp-desc-content { color: var(--ps-text); line-height: 2.05; }
.ps-sp-desc-content h2, .ps-sp-desc-content h3 { margin-top: 22px; }
.ps-sp-desc-content p:last-child { margin-bottom: 0; }
.ps-sp-desc-content ul, .ps-sp-desc-content ol { padding-right: 22px; }
.ps-sp-desc-content li { margin-bottom: 6px; }
.ps-sp-specs-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ps-sp-specs-table tr { border-bottom: 1px solid var(--ps-line); }
.ps-sp-specs-table tr:last-child { border-bottom: none; }
.ps-sp-specs-table th { padding: 12px 0; text-align: right; font-weight: 800; color: var(--ps-ink); width: 42%; vertical-align: top; }
.ps-sp-specs-table td { padding: 12px 0 12px 8px; color: var(--ps-text); vertical-align: top; }
.ps-sp-why { background: #fff; }
.ps-sp-side-column { display: flex; flex-direction: column; gap: 20px; }
.ps-sp-short-desc.ps-sp-short-desc-side { margin: 0; padding: 22px 24px; border: 1px solid var(--ps-line); border-right: 3px solid var(--ps-primary); border-radius: var(--ps-radius); background: var(--ps-primary-light); line-height: 2; }
.ps-sp-short-desc.ps-sp-short-desc-side .ps-eyebrow { margin-bottom: 10px !important; }
.ps-sp-short-desc.ps-sp-short-desc-side p:last-child { margin-bottom: 0; }

/* ریسپانسیو */
@media (max-width: 1024px) {
    .ps-sp-grid { gap: 32px; }
    .ps-sp-details-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .ps-sp-hero { padding: 24px 0 50px; }
    .ps-sp-header { margin-bottom: 24px; padding-bottom: 16px; }
    .ps-sp-header .ps-sp-title { font-size: clamp(1.4rem, 6vw, 1.9rem); }
    .ps-sp-grid { grid-template-columns: 1fr; gap: 28px; }
    .ps-sp-gallery-main { min-height: 280px; padding: 14px; }
    .ps-sp-thumb { width: 66px; height: 66px; }
    .ps-sp-buybox { padding: 18px; }
    .ps-sp-desc-card, .ps-sp-specs-card { padding: 20px; }
    .ps-single-product .cpi-qty-buttons button { width: 36px; height: 36px; font-size: 1.05rem; }
    .ps-single-product .quantity input.qty { width: 80px; height: 44px; }
    .cpi-design-options { padding: 14px; }
    .cpi-design-option { padding: 10px 12px; font-size: .86rem; }
    .cpi-dropzone { min-height: 130px; padding: 16px 12px; }
    .cpi-dropzone-icon { width: 40px; height: 40px; font-size: 1.3rem; }
}
@media (max-width: 440px) {
    .ps-sp-thumbs { gap: 6px; }
    .ps-sp-thumb { width: 56px; height: 56px; }
    .ps-sp-price { font-size: 1.2rem; }
    .ps-single-product .quantity { display: flex; width: 100%; }
    .ps-single-product .quantity input.qty { flex: 1; }
    .ps-single-product .cpi-qty-buttons button { width: 38px; height: 38px; }
    .cpi-dropzone { min-height: 120px; padding: 14px 10px; }
    .cpi-dropzone strong { font-size: .88rem; }
    .cpi-dropzone-hint { font-size: .76rem; }
    .cpi-dropzone-preview { font-size: .8rem; padding: 10px; }
    .cpi-dropzone-preview .cpi-file-name { white-space: normal; word-break: break-all; }
    .ps-sp-live-row.is-total strong { font-size: 1.05rem; }
}
/* =====================================================
   باکس «محصول در سبد خرید»
   ===================================================== */
.ps-sp-incart-box {
    margin: 0 0 16px;
    padding: 20px;
    border: 1.5px solid var(--ps-primary);
    border-radius: 14px;
    background: linear-gradient(155deg, #f0faf9, #fff 75%);
    box-shadow: 0 6px 18px rgba(8, 127, 140, .08);
}

.ps-sp-incart-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.ps-sp-incart-check {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ps-primary);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(8, 127, 140, .25);
}
.ps-sp-incart-head div { flex: 1; }
.ps-sp-incart-head strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ps-ink);
    font-size: 1rem;
    font-weight: 800;
}
.ps-sp-incart-head span {
    display: block;
    color: var(--ps-muted);
    font-size: .88rem;
}

.ps-sp-incart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.ps-sp-incart-actions .ps-btn {
    flex: 1;
    min-width: 160px;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 11px;
    font-family: 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
    font-size: .95rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.ps-sp-incart-actions .ps-btn:hover { transform: translateY(-2px); }
.ps-sp-incart-actions .ps-btn-primary {
    background: var(--ps-primary) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(8, 127, 140, .2);
}
.ps-sp-incart-actions .ps-btn-primary:hover {
    background: var(--ps-primary-dark) !important;
    box-shadow: 0 12px 26px rgba(8, 127, 140, .28);
}
.ps-sp-incart-actions .ps-btn-outline {
    background: #fff !important;
    color: var(--ps-primary) !important;
    border: 1px solid var(--ps-primary) !important;
}
.ps-sp-incart-actions .ps-btn-outline:hover {
    background: var(--ps-primary-light) !important;
}

.ps-sp-incart-note {
    margin: 0 !important;
    color: var(--ps-muted);
    font-size: .82rem;
    line-height: 1.7;
}

/* دکمه و پنل ویرایش */
.ps-sp-incart-edit-wrap {
    margin: 0 0 16px;
}
.ps-sp-incart-edit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--ps-line);
    border-radius: 9px;
    background: #fff;
    color: var(--ps-ink-soft);
    font-family: 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
    font-size: .86rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.ps-sp-incart-edit-toggle:hover {
    border-color: var(--ps-primary);
    color: var(--ps-primary);
    background: var(--ps-primary-light);
}
.ps-sp-incart-edit-panel {
    margin-top: 12px;
    padding: 16px;
    border: 1px dashed var(--ps-line);
    border-radius: 12px;
    background: #fff;
}