/* ==========================================================================
   PKE-BUY Corporate7 Price Hub — Unique High-Converting Cross-OS UI/UX
   Preserves "PKE IranYekan X" font untouched. Zero overflow on 390px–1920px.
   ========================================================================== */

.pke-ph-root {
    color: var(--c7-ink, #2a2a2a);
}

.pke-ph-root [id],
.pke20-page:has(.pke-ph-root) #comments {
    scroll-margin-top: 96px;
}

.pke20-page:has(.pke-ph-root) .pages-wrappers ~ .container {
    width: min(1180px, calc(100% - 32px));
    max-width: 1180px;
    margin: 28px auto 48px;
    padding: 0;
}

/* Hide legacy duplicate feature box & legacy breadcrumb when Corporate7 Price Hub is active */
.pke20-page:has(.pke-ph-root) .pages-wrappers > .container > .bread-crumb,
.pke20-page:has(.pke-ph-root) .pke20-feature-block,
.pke20-page:has(.pke-ph-root) .pke-live-rates-feature {
    display: none !important;
}

.pke20-page:has(.pke-ph-root) .pages-wrappers > article > .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pke20-page:has(.pke-ph-root) .pke20-editorial {
    margin: 0 !important;
}

/* ---------- Hero Band ---------- */
.pke-ph-hero {
    background: linear-gradient(125deg, #1f1e1c 0%, #302820 100%);
    color: #fff;
    padding: 36px 0 42px;
    border-bottom: 3px solid var(--c7-orange, #ff9934);
}

.pke-ph-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr);
    gap: clamp(20px, 3.5vw, 44px);
    align-items: center;
    margin-top: 12px;
}

.pke-ph-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.pke-ph-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none !important;
}

.pke-ph-badge-live {
    background: rgba(255, 153, 52, .16);
    border: 1px solid rgba(255, 153, 52, .55);
    color: #ffd09b;
}

.pke-ph-badge-muted {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff !important;
}

.pke-ph-badge-muted:hover {
    background: rgba(255, 255, 255, .2);
}

.pke-ph-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, .22);
}

.pke-ph-hero h1 {
    margin: 0 0 12px !important;
    color: #fff !important;
    font-size: clamp(23px, 2.8vw, 35px) !important;
    line-height: 1.45 !important;
}

.pke-ph-lead {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .88) !important;
    font-size: 15px !important;
    line-height: 1.85 !important;
}

.pke-ph-hero-card {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .28);
}

.pke-ph-hero-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.pke-ph-hero-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255, 255, 255, .1);
}

.pke-ph-hero-card-meta > div {
    background: #22201d;
    padding: 12px 14px;
    text-align: center;
}

.pke-ph-hero-card-meta strong {
    display: block;
    color: var(--c7-orange, #ff9934);
    font-size: 15px;
    font-weight: 800;
}

.pke-ph-hero-card-meta span {
    display: block;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .75);
    margin-top: 2px;
}

/* ---------- Quick-Jump Strip ---------- */
.pke-ph-jumpbar {
    background: #fff;
    border-bottom: 1px solid var(--c7-border, #e7e2da);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
}

.pke-ph-jumpbar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-block: 10px;
}

.pke-ph-jumpbar-inner::-webkit-scrollbar {
    display: none;
}

.pke-ph-jumpbar a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--c7-border, #e7e2da);
    background: var(--c7-surface, #f7f6f4);
    color: var(--c7-dark, #242424) !important;
    font-size: 13px !important;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .2s, border-color .2s, color .2s;
}

.pke-ph-jumpbar a:hover {
    background: var(--c7-orange, #ff9934);
    border-color: var(--c7-orange, #ff9934);
    color: #1f1a15 !important;
}

/* ---------- Position 0 Answer-First Box ---------- */
.pke-ph-answer-box {
    background: var(--c7-orange-soft, #fff6eb);
    border: 1px solid #f2cfa6;
    border-inline-start: 4px solid var(--c7-orange, #ff9934);
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 24px;
}

.pke-ph-answer-box h2 {
    margin: 0 0 8px !important;
    font-size: clamp(18px, 2vw, 23px) !important;
    color: var(--c7-dark, #242424);
}

.pke-ph-answer-box p {
    margin: 0 !important;
    line-height: 1.9 !important;
    color: #362f28;
    font-size: 15px !important;
}

/* ---------- Toolbar (Filter Tabs + 5% Bulk Toggle) ---------- */
.pke-ph-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 16px;
}

.pke-ph-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pke-ph-filter {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 7px;
    border: 1px solid var(--c7-border, #e7e2da);
    background: #fff;
    color: var(--c7-dark, #242424);
    font-size: 13.5px !important;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}

.pke-ph-filter.is-active,
.pke-ph-filter:hover {
    background: var(--c7-dark, #242424);
    border-color: var(--c7-dark, #242424);
    color: #fff;
}

.pke-ph-bulk-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e7cfa8;
    background: #fffdf8;
    cursor: pointer;
    font-size: 13.5px !important;
    color: var(--c7-dark, #242424);
}

.pke-ph-bulk-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #d97214;
    position: static !important;
    opacity: 1 !important;
    margin: 0;
}

/* ---------- Live Price Table ---------- */
.pke-ph-scroll-hint {
    display: none;
    margin: 0 0 8px !important;
    font-size: 12.5px !important;
    font-weight: 700;
    color: var(--c7-orange-dark, #b45309);
}

@media (max-width: 980px) {
    .pke-ph-scroll-hint {
        display: block;
    }
}

.pke-ph-table-card {
    background: #fff;
    border: 1px solid var(--c7-border, #e7e2da);
    border-radius: 12px;
    box-shadow: var(--c7-shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.pke-ph-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

#pke-ph-live-table {
    min-width: 980px;
}

.pke-ph-table caption {
    caption-side: top;
    padding: 11px 16px;
    text-align: start;
    font-size: 12.5px !important;
    color: var(--c7-muted, #5c564f);
    background: #faf8f5;
    border-bottom: 1px solid var(--c7-border, #e7e2da);
}

.pke-ph-table thead th {
    background: var(--c7-dark, #242424);
    color: #fff;
    padding: 13px 12px;
    text-align: start;
    font-size: 13.5px !important;
    font-weight: 700;
    white-space: nowrap;
}

.pke-ph-table thead th small {
    font-weight: 500;
    color: #ffd09b;
    font-size: 11.5px;
}

.pke-ph-table tbody th,
.pke-ph-table tbody td {
    padding: 13px 12px;
    border-bottom: 1px solid #ede8e0;
    vertical-align: middle;
    font-size: 14px !important;
    color: var(--c7-ink, #2a2a2a);
}

.pke-ph-table tbody th {
    white-space: nowrap;
}

#pke-ph-live-table tbody td:not(.pke-ph-use-cell) {
    white-space: nowrap;
}

.pke-ph-table tbody tr:hover {
    background: #fffaf2;
}

.pke-ph-table tbody tr[hidden] {
    display: none;
}

.pke-ph-table tbody tr:target {
    background: #fff4e2;
    outline: 2px solid var(--c7-orange, #ff9934);
    outline-offset: -2px;
}

.pke-ph-prod-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 215px;
}

.pke-ph-prod-cell img {
    width: 54px !important;
    height: 40px !important;
    border-radius: 6px;
    object-fit: cover !important;
    flex-shrink: 0;
}

.pke-ph-prod-cell a {
    display: block;
    font-weight: 800;
    color: var(--c7-dark, #242424);
    text-decoration: none;
    white-space: nowrap;
}

.pke-ph-prod-cell a:hover {
    color: var(--c7-orange-dark, #d97214);
}

.pke-ph-mini-badge {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 7px;
    border-radius: 4px;
    background: var(--c7-surface, #f7f6f4);
    color: var(--c7-muted, #666);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.pke-ph-price-cell {
    white-space: nowrap;
}

.pke-ph-price-cell strong {
    font-size: 15.5px !important;
    font-weight: 800;
    color: #1f1a15;
    font-variant-numeric: tabular-nums;
}

.pke-ph-cur {
    font-size: 12px;
    color: var(--c7-muted, #666);
}

.pke-ph-use-cell {
    min-width: 185px;
    max-width: 245px;
    font-size: 13px !important;
    line-height: 1.65;
    color: #4b4640;
    white-space: normal;
}

.pke-ph-row-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--c7-orange-soft, #fff6eb);
    border: 1px solid var(--c7-orange, #ff9934);
    color: var(--c7-dark, #242424) !important;
    font-size: 12.5px !important;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
}

.pke-ph-row-cta:hover {
    background: var(--c7-orange, #ff9934);
}

.pke-ph-save-col {
    color: #15803d !important;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.pke-ph-note-strip {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    background: var(--c7-surface, #f7f6f4);
    border: 1px solid var(--c7-border, #e7e2da);
}

.pke-ph-note-strip p {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.85 !important;
    color: #433e38;
}

/* ---------- Interactive Calculator ---------- */
.pke-ph-calc {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr);
    gap: 24px;
    align-items: stretch;
}

.pke-ph-calc-inputs {
    background: #fff;
    border: 1px solid var(--c7-border, #e7e2da);
    border-radius: 12px;
    padding: clamp(18px, 2.5vw, 28px);
    box-shadow: var(--c7-shadow-sm);
    display: grid;
    gap: 16px;
}

.pke-ph-input-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pke-ph-field {
    display: block;
    min-width: 0;
}

.pke-ph-field[hidden],
.pke-ph-input-pair[hidden] {
    display: none !important;
}

.pke-ph-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px !important;
    font-weight: 700;
    color: var(--c7-dark, #242424);
}

.pke-ph-field select,
.pke-ph-field select.browser-default,
.pke-ph-field input[type="number"],
.pke-ph-field input[type="number"].browser-default {
    display: revert !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 9px !important;
    border: 1.5px solid #cfc6b8 !important;
    background-color: #faf8f5 !important;
    background-image: none !important;
    color: var(--c7-dark, #242424) !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    line-height: normal !important;
    box-shadow: none !important;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}

.pke-ph-field select,
.pke-ph-field select.browser-default {
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    cursor: pointer;
}

.pke-ph-field select:focus,
.pke-ph-field select.browser-default:focus,
.pke-ph-field input[type="number"]:focus,
.pke-ph-field input[type="number"].browser-default:focus {
    outline: none !important;
    border-color: var(--c7-orange, #ff9934) !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(255, 153, 52, .22) !important;
}

.pke-ph-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.pke-ph-presets button {
    min-height: 30px;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid var(--c7-border, #e7e2da);
    background: var(--c7-surface, #f7f6f4);
    color: var(--c7-dark, #242424);
    font-size: 12px !important;
    font-weight: 700;
    cursor: pointer;
}

.pke-ph-presets button.is-active,
.pke-ph-presets button:hover {
    background: var(--c7-orange, #ff9934);
    border-color: var(--c7-orange, #ff9934);
    color: #1f1a15;
}

.pke-ph-hint {
    font-size: 12px;
    color: var(--c7-muted, #666);
}

.pke-ph-calc-result {
    background: linear-gradient(155deg, #242424 0%, #191817 100%);
    color: #fff;
    border-radius: 12px;
    border-top: 4px solid var(--c7-orange, #ff9934);
    padding: clamp(20px, 2.5vw, 28px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    box-shadow: var(--c7-shadow-md);
}

.pke-ph-res-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255, 255, 255, .78);
}

.pke-ph-discount-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, .2);
    border: 1px solid #4ade80;
    color: #86efac;
    font-size: 12px;
    font-weight: 700;
}

.pke-ph-res-total {
    padding: 16px 18px;
    border-radius: 10px;
    background: rgba(255, 153, 52, .12);
    border: 1px solid rgba(255, 153, 52, .35);
}

.pke-ph-res-label {
    display: block;
    font-size: 13px;
    color: #ffd09b;
    margin-bottom: 4px;
}

.pke-ph-res-total strong {
    display: block;
    font-size: clamp(22px, 2.5vw, 30px) !important;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.pke-ph-res-total small {
    display: block;
    margin-top: 4px;
    color: #86efac;
    font-size: 12.5px;
    font-weight: 700;
}

.pke-ph-res-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pke-ph-res-box {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    padding: 12px;
}

.pke-ph-res-box span {
    display: block;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .7);
    margin-bottom: 4px;
}

.pke-ph-res-box strong {
    display: block;
    font-size: 14.5px !important;
    color: #fff;
    font-weight: 800;
    line-height: 1.5;
}

.pke-ph-res-note {
    margin: 0 !important;
    font-size: 12.5px !important;
    line-height: 1.75 !important;
    color: rgba(255, 255, 255, .78);
}

.pke-ph-res-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.pke-ph-res-actions .pke-c7-btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box !important;
    text-align: center;
    white-space: normal;
    line-height: 1.45;
    padding: 11px 16px;
}

/* ---------- Comparison & Info Cards ---------- */
.pke-ph-compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.pke-ph-compare-card {
    background: #fff;
    border: 1px solid var(--c7-border, #e7e2da);
    border-radius: 10px;
    padding: 20px 22px;
}

.pke-ph-compare-good {
    border-top: 4px solid #16a34a;
}

.pke-ph-compare-warn {
    border-top: 4px solid #dc2626;
}

.pke-ph-compare-card h3 {
    margin: 0 0 12px !important;
    font-size: 16.5px !important;
    color: var(--c7-dark, #242424);
}

.pke-ph-compare-card ul {
    margin: 0;
    padding-inline-start: 18px;
    display: grid;
    gap: 8px;
    font-size: 14px !important;
    line-height: 1.75 !important;
    color: #444;
}

.pke-ph-pill-green {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12.5px;
    font-weight: 700;
}

.pke-ph-pill-amber {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12.5px;
    font-weight: 700;
}

.pke-ph-trio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.pke-ph-info-card {
    background: #fff;
    border: 1px solid var(--c7-border, #e7e2da);
    border-top: 3px solid var(--c7-orange, #ff9934);
    border-radius: 10px;
    padding: 22px;
    box-shadow: var(--c7-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.pke-ph-info-card h3 {
    margin: 0 !important;
    font-size: 16.5px !important;
    color: var(--c7-dark, #242424);
    line-height: 1.55 !important;
}

.pke-ph-info-card p {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.85 !important;
    color: #45403b;
}

.pke-ph-checklist {
    margin: 14px 0 0;
    padding-inline-start: 20px;
    display: grid;
    gap: 10px;
    font-size: 14.5px !important;
    line-height: 1.85 !important;
    color: #36322d;
}

/* ---------- Related Internal Links Grid ---------- */
.pke-ph-related {
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--c7-border, #e7e2da);
}

.pke-ph-related h3 {
    margin: 0 0 16px !important;
    font-size: 18px !important;
    color: var(--c7-dark, #242424);
}

.pke-ph-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
}

.pke-ph-related-grid a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--c7-border, #e7e2da);
    border-inline-start: 3px solid var(--c7-orange, #ff9934);
    background: #fff;
    color: var(--c7-dark, #242424) !important;
    font-size: 13.5px !important;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .2s, transform .2s;
}

.pke-ph-related-grid a:hover {
    background: var(--c7-orange-soft, #fff6eb);
    transform: translateY(-1px);
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .pke-ph-hero-grid,
    .pke-ph-calc,
    .pke-ph-compare-grid,
    .pke-ph-trio-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .pke-ph-input-pair,
    .pke-ph-res-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .pke-ph-hero {
        padding: 24px 0 30px;
    }
}
