/**
 * pQKD shop — uses site .qb-glass-panel surfaces.
 */

.qb-shop,
#pqkd-sliding-panel {
    font-family: var(--font-body);
    font-size: var(--type-size-base);
    line-height: var(--type-leading-body);
    color: var(--color-body-dim);
}

.qb-shop-section {
    border-top: var(--glass-border);
}

.qb-shop-section__lede {
    margin-bottom: 2rem;
}

.qb-shop-products {
    display: grid;
    gap: var(--component-gap);
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
    .qb-shop-products {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.qb-shop-track-hint {
    margin-top: 2rem;
    color: var(--color-body-soft);
    font-size: var(--type-size-sm);
}

.qb-shop-track-hint a {
    color: var(--color-orange-light);
}

.qb-shop-tracking-wrap,
.qb-shop {
    max-width: var(--qb-page-prose-max);
    margin-inline: auto;
}

.qb-u-hidden {
    display: none !important;
}

/* ── Headings ── */
.qb-shop-panel__title,
.pqkd-order-tracking > h2 {
    font-family: var(--font-headings);
    font-weight: var(--type-weight-regular);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--color-heading);
    line-height: var(--type-leading-tight);
}

.qb-shop h2,
.qb-shop h3,
.qb-shop h4,
.qb-shop-step-pane__title {
    font-family: var(--font-body);
    font-weight: var(--type-weight-semibold);
    letter-spacing: normal;
    color: var(--color-heading-h3);
    line-height: var(--type-leading-tight);
}

.qb-shop-panel__title {
    margin: 0 0 1.25rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.qb-shop-step-pane__title {
    margin: 0 0 1.25rem;
    font-size: var(--type-size-lg);
}

.qb-shop-summary-block h4 {
    margin: 0 0 0.65rem;
    font-size: var(--type-size-sm);
    text-transform: uppercase;
    letter-spacing: var(--type-tracking-label);
}

/* ── Glass surfaces (same token stack as rest of site) ── */
.qb-shop-review-grid.qb-glass-panel,
.pqkd-tracking-content.qb-glass-panel {
    padding: 0;
    overflow: hidden;
    margin-bottom: 1rem;
}

.pqkd-tracking-form.qb-glass-panel,
.no-orders-found.qb-glass-panel,
.pqkd-cancelled-container.qb-glass-panel {
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.qb-shop-products .qb-shop-product {
    padding: 1.25rem;
    height: 100%;
}

.qb-shop-multi-form.qb-glass-panel,
.pqkd-multi-products-form.qb-glass-panel {
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.qb-shop-multi-item,
.pqkd-multi-product-item {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-mint-hairline);
}

.qb-shop-multi-item:last-child,
.pqkd-multi-product-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.quantity-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 12rem;
}

.quantity-container input[type='number'] {
    max-width: 6rem;
}

.qb-shop-step-pane {
    padding: 0.25rem 0 0;
}

/* ── Product cards ── */
.qb-shop-product {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.qb-shop-product__media {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    border-radius: calc(var(--radius-card) - 0.25rem);
    background: transparent;
}

.qb-shop-product__title {
    margin: 0;
    font-family: var(--font-headings);
    font-size: var(--type-size-lg);
    color: var(--color-heading);
}

.qb-shop-product__desc {
    margin: 0;
    color: var(--color-body-dim);
    line-height: var(--type-leading-body);
    flex-grow: 1;
}

.qb-shop-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: stretch;
}

.qb-shop-btn-row .qb-btn {
    min-width: 0 !important;
    margin: 0 !important;
    flex: 1 1 140px;
}

/* ── Checkout step 1: optional customize order ── */
.qb-shop-customize {
    margin-top: 1.25rem;
    border-top: 1px solid var(--color-mint-hairline);
    padding-top: 1rem;
}

.qb-shop-customize__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.65rem 0;
    border: none;
    background: transparent;
    color: var(--color-orange-light);
    font-family: var(--font-body);
    font-size: var(--type-size-sm);
    font-weight: var(--type-weight-semibold);
    cursor: pointer;
    text-align: left;
}

.qb-shop-customize__toggle-icon::before {
    content: '+';
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform var(--transition-speed) ease;
}

.qb-shop-customize__toggle[aria-expanded='true'] .qb-shop-customize__toggle-icon::before {
    content: '−';
}

.qb-shop-customize__panel {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-mint-hairline);
}

.qb-shop-customize__hint {
    margin: 0 0 1rem;
}

.qb-shop-customize__panel .qb-shop-multi-item:last-child {
    border-bottom: none;
}

/* ── Multi-product rows (panel customize) ── */
.pqkd-multi-product-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.qb-shop-multi-item__info,
.pqkd-multi-product-info {
    display: flex;
    flex: 1 1 240px;
    gap: 1rem;
    align-items: flex-start;
}

.qb-shop-multi-item__info img,
.pqkd-multi-product-info img {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.15);
}

.qb-shop-multi-item__price,
.pqkd-multi-product-price {
    font-weight: var(--type-weight-semibold);
    color: var(--color-orange-light);
}

.qb-shop-multi-item__qty,
.pqkd-multi-product-quantity {
    flex: 0 0 auto;
    text-align: right;
}

.qb-shop-multi-item__qty label,
.pqkd-multi-product-quantity label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: var(--type-size-sm);
    color: var(--color-body-soft);
}

.qb-shop-multi-item__qty input[type='number'],
.pqkd-multi-product-quantity input[type='number'] {
    width: 4.5rem;
}

.qb-shop-multi-footer,
.pqkd-multi-product-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-mint-stroke);
}

.qb-shop-multi-total,
.pqkd-order-total {
    font-family: var(--font-headings);
    font-size: var(--type-size-md);
    color: var(--color-orange-light);
}

.qb-shop-item-total,
.item-total {
    margin-top: 0.35rem;
    font-size: var(--type-size-sm);
    color: var(--color-teal-light);
}

/* ── Form layout ── */
#pqkd-sliding-panel label,
#page.site .pqkd-order-tracking label,
.pqkd-order-tracking label {
    display: block;
    margin-bottom: 0.35rem;
    text-transform: none;
    font-family: var(--font-body);
    font-size: var(--type-size-sm);
    font-weight: var(--type-weight-medium);
    color: var(--color-body-dim);
}

#pqkd-sliding-panel .field-hint,
#page.site .pqkd-order-tracking .field-hint,
.pqkd-order-tracking .field-hint {
    margin: 0.35rem 0 0;
    font-size: var(--type-size-xs);
    color: var(--color-body-soft);
}

/* Dark-on-dark fields — panel lives outside #page.site (wp_footer) */
#pqkd-sliding-panel :is(input:not([type='submit']):not([type='hidden']), textarea, select),
#page.site .pqkd-order-tracking :is(input:not([type='submit']):not([type='hidden']), textarea, select),
.pqkd-order-tracking :is(input:not([type='submit']):not([type='hidden']), textarea, select) {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1.25rem;
    background: rgba(3, 16, 20, 0.45);
    border: 1px solid var(--color-mint-stroke);
    border-radius: 0.5rem;
    color: var(--color-on-dark);
    font-family: var(--font-body);
    transition: border-color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

#pqkd-sliding-panel :is(input:focus, textarea:focus, select:focus),
#page.site .pqkd-order-tracking :is(input:focus, textarea:focus, select:focus),
.pqkd-order-tracking :is(input:focus, textarea:focus, select:focus) {
    outline: none;
    border-color: var(--color-orange-light);
    background: rgba(3, 16, 20, 0.65);
    color: var(--color-on-dark);
}

#pqkd-sliding-panel :is(input, textarea)::placeholder,
#page.site .pqkd-order-tracking :is(input, textarea)::placeholder,
.pqkd-order-tracking :is(input, textarea)::placeholder {
    color: var(--color-body-soft);
    opacity: 1;
}

#pqkd-sliding-panel :is(input, textarea):-webkit-autofill,
.pqkd-order-tracking :is(input, textarea):-webkit-autofill {
    -webkit-text-fill-color: var(--color-on-dark);
    box-shadow: 0 0 0 1000px rgba(3, 16, 20, 0.65) inset;
    border: 1px solid var(--color-mint-stroke);
}

/* Storefront multi-product qty inputs on dark page */
#page.site .qb-shop-section :is(input:not([type='submit']):not([type='hidden']), textarea, select),
.qb-shop-section :is(input:not([type='submit']):not([type='hidden']), textarea, select) {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1.25rem;
    background: rgba(3, 16, 20, 0.45);
    border: 1px solid var(--color-mint-stroke);
    border-radius: 0.5rem;
    color: var(--color-on-dark);
    font-family: var(--font-body);
}

#page.site .qb-shop-section :is(input:focus, textarea:focus, select:focus),
.qb-shop-section :is(input:focus, textarea:focus, select:focus) {
    outline: none;
    border-color: var(--color-orange-light);
    background: rgba(3, 16, 20, 0.65);
    color: var(--color-on-dark);
}

.qb-shop-form-row,
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.qb-shop-form-row > .qb-shop-field,
.form-row > .form-group {
    flex: 1;
    min-width: 0;
}

.qb-shop-field,
.form-group {
    margin-bottom: 1rem;
}

.qb-shop-form-actions,
.form-navigation,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.qb-shop-form-actions .qb-btn,
.form-actions .qb-btn {
    min-width: 0 !important;
    margin: 0 !important;
}

#pqkd-sliding-panel .qb-shop-form-actions .qb-btn {
    flex: 1 1 9rem;
    max-width: 14rem;
}

/* ── Checkout panel — solid shell, no blur ── */
#pqkd-sliding-panel {
    display: none;
    position: fixed;
    inset: auto 0 0;
    z-index: 100000;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--color-dark-teal-alt);
    border-top: var(--glass-border);
    box-shadow: var(--shadow-raised);
}

.qb-shop-panel {
    position: relative;
    max-width: 42rem;
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 1.75rem) var(--qb-inline-gutter) 1.75rem;
    background: transparent;
    border: none;
    box-shadow: none;
}

.qb-shop-panel__close {
    position: absolute;
    top: 0.75rem;
    right: var(--qb-inline-gutter);
    border: none;
    background: transparent;
    color: var(--color-body-soft);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
}

.qb-shop-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 0 0 1.75rem;
    max-width: 100%;
}

.qb-shop-steps::before {
    content: '';
    position: absolute;
    top: 1.1rem;
    left: 12%;
    right: 12%;
    height: 1px;
    background: var(--color-mint-stroke);
    z-index: 0;
}

.qb-shop-step {
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: center;
}

.qb-shop-step__num,
.step-number {
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 auto 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--color-mint-stroke);
    background: rgba(3, 16, 20, 0.35);
    color: var(--color-body-soft);
    font-family: var(--font-nav);
    font-size: var(--type-size-sm);
    font-weight: var(--type-weight-semibold);
    transition: border-color var(--transition-speed) ease, background var(--transition-speed) ease, color var(--transition-speed) ease;
}

.qb-shop-step__label,
.step-text {
    font-family: var(--font-nav);
    font-size: var(--type-size-xs);
    color: var(--color-body-soft);
    letter-spacing: 0.02em;
}

.qb-shop-step.is-active .qb-shop-step__num,
.step-item.active .step-number {
    border-color: var(--color-orange-light);
    background: var(--color-orange-light);
    color: var(--color-on-dark);
}

.qb-shop-step.is-active .qb-shop-step__label,
.step-item.active .step-text {
    color: var(--color-orange-light);
}

.qb-shop-step.is-done .qb-shop-step__num,
.step-item.completed .step-number {
    border-color: var(--color-green-dark);
    background: var(--color-green-dark);
    color: var(--color-on-dark);
}

.qb-shop-step.is-done .qb-shop-step__label,
.step-item.completed .step-text {
    color: var(--color-green-dark);
}

.qb-shop-review-grid {
    display: grid;
    gap: 0;
}

.qb-shop-summary-block {
    margin: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-mint-hairline);
}

.qb-shop-summary-block:last-child {
    border-bottom: none;
}

.qb-shop-summary-block p {
    margin: 0.35rem 0;
    font-size: var(--type-size-sm);
    line-height: var(--type-leading-loose);
}

.qb-shop-success {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
}

.qb-shop-success__icon,
.success-icon {
    font-size: 2.5rem;
    color: var(--color-green-dark);
    margin-bottom: 0.75rem;
}

.qb-shop-price-tag,
.price-tag,
.qb-shop-total-line,
.total-price,
.final-total {
    color: var(--color-orange-light);
    font-weight: var(--type-weight-semibold);
}

.product-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-mint-hairline);
    font-size: var(--type-size-sm);
}

.product-list li:last-child {
    border-bottom: none;
}

.discount-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    background: rgba(54, 191, 163, 0.25);
    color: var(--color-green-dark);
    font-size: var(--type-size-xs);
}

.original-price {
    text-decoration: line-through;
    color: var(--color-body-soft);
    margin-right: 0.35rem;
}

/* ── Tracking / confirmation / cancelled ── */
.pqkd-order-details {
    padding: 0;
    background: none;
    border: none;
}

.pqkd-payment-section.qb-shop-summary-block {
    margin: 0;
}

.pqkd-tracking-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 0.65rem;
}

.pqkd-tracking-header h2,
.pqkd-tracking-header h3,
.pqkd-tracking-header h4 {
    margin: 0;
}

.pqkd-order-tracking .pqkd-tracking-form > p {
    margin: 0 0 1.25rem;
    color: var(--color-body-soft);
}

.pqkd-order-tracking code {
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.25);
    font-size: 0.9em;
}

.pqkd-order-table,
.pqkd-order-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--type-size-sm);
}

.pqkd-order-table th,
.pqkd-order-table td {
    padding: 0.65rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-mint-hairline);
}

.pqkd-order-table th {
    color: var(--color-body-soft);
    font-size: var(--type-size-xs);
    font-weight: var(--type-weight-semibold);
    text-transform: none;
    letter-spacing: normal;
}

.pqkd-order-summary-table th:not(:first-child),
.pqkd-order-summary-table td:not(:first-child) {
    text-align: right;
}

.pqkd-order-summary-table tfoot th,
.pqkd-order-summary-table tfoot td {
    font-weight: var(--type-weight-semibold);
}

.order-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-family: var(--font-nav);
    font-size: var(--type-size-xs);
    font-weight: var(--type-weight-semibold);
    letter-spacing: 0.04em;
}

.status-pending { background: rgba(242, 135, 75, 0.18); color: var(--color-orange-light); }
.status-processing,
.status-shipped,
.status-completed,
.status-paid { background: rgba(54, 191, 163, 0.18); color: var(--color-green-dark); }
.status-awaiting_payment { background: rgba(95, 159, 174, 0.2); color: var(--color-teal-light); }
.status-cancelled { background: rgba(191, 2, 2, 0.15); color: var(--color-red); }

.pqkd-tracking-back {
    color: var(--color-orange-light);
    text-decoration: none;
    font-size: var(--type-size-sm);
}

.pqkd-tracking-back::before {
    content: '← ';
}

.pqkd-payment-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.pqkd-payment-button {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: 3rem;
    font-family: var(--font-nav);
    font-size: var(--type-size-sm);
    font-weight: var(--type-weight-bold);
    text-decoration: none;
    text-align: center;
    min-width: 10rem;
    letter-spacing: 0.04em;
}

.pqkd-stripe-button {
    background: #635bff;
    color: #fff !important;
}

.pqkd-paypal-button {
    background: #0070ba;
    color: #fff !important;
}

.qb-shop .note,
.pqkd-order-tracking .note {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--color-teal-light);
    background: var(--color-mint-tint-04);
    font-size: var(--type-size-sm);
    color: var(--color-body-dim);
}

.pqkd-cancelled-container {
    text-align: center;
}

.pqkd-cancelled-icon {
    font-size: 2.5rem;
    color: var(--color-red);
    margin: 0.75rem 0;
}

.pqkd-cancelled-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.pqkd-confirmation-message {
    text-align: center;
}

.qb-shop-summary-block.pqkd-confirmation-message {
    margin: 0;
}

.pqkd-confirmation-icon.success {
    color: var(--color-green-dark);
    font-size: 2.5rem;
}

.pqkd-confirmation-icon.warning {
    color: var(--color-orange-light);
    font-size: 2.5rem;
}

@media (max-width: 768px) {
    .qb-shop-form-row,
    .form-row {
        flex-direction: column;
    }

    .qb-shop-multi-item,
    .pqkd-multi-product-item {
        flex-direction: column;
        align-items: stretch;
    }

    .qb-shop-multi-item__qty,
    .pqkd-multi-product-quantity {
        text-align: left;
    }

    .qb-shop-step__label,
    .step-text {
        font-size: 0.65rem;
    }

    .qb-shop-panel {
        max-width: none;
    }
}
