/* Trade pages (catalogue, basket, checkout, confirmation) — themed via --website-* */

.stb-page,
.stl-page {
    font-family: var(--website-body-font);
    font-weight: var(--website-body-weight);
    background: var(--website-background) !important;
    color: var(--website-text);
}

.stb-page :root,
.stl-page :root,
:root {
    --stb-brand: var(--website-primary);
    --stb-brand-dark: var(--website-secondary);
    --stb-gold: var(--website-accent);
    --stb-gold-light: var(--website-accent-light);
    --stb-ink: var(--website-text);
    --stb-muted: var(--website-muted-text);
    --stb-surface: var(--website-background);
    --stb-cream: var(--website-surface);
    --stb-paper: var(--website-surface);
    --stb-line: var(--website-border);
}

.stb-page h1,
.stl-page h1,
.stb-page .cart-title,
.stb-page .checkout-title,
.stb-page .confirm-title {
    font-family: var(--website-heading-font);
    font-weight: var(--website-heading-weight);
    color: var(--website-text) !important;
    letter-spacing: -0.02em;
}

/* ---------- Catalogue / home.php ---------- */

.stb-page .container,
.stl-page .container {
    padding-top: 28px;
    padding-bottom: 40px;
}

.stb-page .h3.fw-bold,
.stl-page .h3.fw-bold {
    font-family: var(--website-heading-font);
    font-size: 2.15rem;
    color: var(--website-text) !important;
}

.stb-page .product-card,
.stl-page .product-card {
    background: var(--website-product-card-background);
    border: 1px solid var(--website-product-card-border);
    border-radius: var(--website-product-card-radius);
    padding: 14px;
    min-height: 410px;
    box-shadow: none;
}

.stb-page .product-card:hover,
.stl-page .product-card:hover {
    box-shadow: var(--website-card-shadow);
}

.stb-page .p-name,
.stl-page .p-name {
    color: var(--website-product-card-title);
}

.stb-page .p-name:hover,
.stl-page .p-name:hover {
    color: var(--website-primary);
}

.stb-page .p-code,
.stl-page .p-code {
    color: var(--website-muted-text);
}

.stb-page .p-price,
.stl-page .p-price {
    color: var(--website-product-card-price) !important;
}

.stb-page .input-group-custom,
.stl-page .input-group-custom {
    border-color: var(--website-input-border);
    border-radius: var(--website-input-radius);
    background: var(--website-input-background);
}

.stb-page .btn-neutral,
.stl-page .btn-neutral {
    background-color: var(--website-muted-text) !important;
    color: var(--website-button-text) !important;
}

.stb-page .btn-plus-active,
.stl-page .btn-plus-active {
    background-color: var(--website-button-background) !important;
    color: var(--website-button-text) !important;
}

.stb-page .btn-minus-active,
.stl-page .btn-minus-active {
    background-color: var(--website-button-hover-background) !important;
    color: var(--website-button-hover-text) !important;
}

.stb-page .btn-remove-alt,
.stl-page .btn-remove-alt {
    border-color: var(--website-danger);
    color: var(--website-danger);
}

.stb-page .btn-remove-alt:hover,
.stl-page .btn-remove-alt:hover {
    background: var(--website-danger);
    color: #fff;
}

.stb-page .btn-outline-danger,
.stl-page .btn-outline-danger {
    color: var(--website-primary);
    border-color: var(--website-primary);
    border-radius: var(--website-button-radius);
    font-weight: var(--website-button-weight);
}

.stb-page .btn-outline-danger:hover,
.stl-page .btn-outline-danger:hover {
    background: var(--website-button-background);
    border-color: var(--website-button-border);
    color: var(--website-button-text);
}

.stb-page .badge-status,
.stl-page .badge-status {
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.stb-page .bg-out,
.stl-page .bg-out {
    background-color: var(--website-danger);
}

.stb-page .bg-zero,
.stl-page .bg-zero {
    background-color: var(--website-warning);
    color: var(--website-text);
}

.stb-page .spinner-border.text-primary,
.stl-page .spinner-border.text-primary {
    color: var(--website-primary) !important;
}

/* ---------- Basket / checkout shared cards ---------- */

.stb-page .cart-page,
.stb-page .checkout-page {
    padding-top: 36px;
    padding-bottom: 70px;
}

.stb-page .cart-subtitle,
.stb-page .checkout-subtitle {
    color: var(--website-muted-text);
}

.stb-page .cart-btn-outline,
.stb-page .btn-outline-secondary {
    border: 1px solid var(--website-border);
    background: var(--website-surface);
    color: var(--website-text);
    border-radius: var(--website-button-radius);
    font-weight: var(--website-button-weight);
}

.stb-page .cart-btn-outline:hover,
.stb-page .btn-outline-secondary:hover {
    background: var(--website-background);
    color: var(--website-text);
    border-color: var(--website-accent);
}

.stb-page .cart-btn-danger {
    border-color: var(--website-danger);
    color: var(--website-danger);
    border-radius: var(--website-button-radius);
}

.stb-page .cart-btn-danger:hover {
    background: var(--website-danger);
    color: #fff;
}

.stb-page .cart-items-panel,
.stb-page .summary-card,
.stb-page .vat-card,
.stb-page .checkout-card {
    background: var(--website-card-background);
    border: 1px solid var(--website-card-border);
    border-radius: var(--website-card-radius);
    color: var(--website-card-text);
    overflow: hidden;
    box-shadow: var(--website-card-shadow);
}

.stb-page .cart-panel-heading,
.stb-page .summary-heading,
.stb-page .vat-heading,
.stb-page .checkout-card-heading {
    background: var(--website-background);
    border-bottom: 1px solid var(--website-border);
    color: var(--website-text);
}

.stb-page .summary-heading h2 {
    font-family: var(--website-heading-font);
    color: var(--website-text);
}

.stb-page .cart-item.out-stock-item {
    background: var(--website-background);
}

.stb-page .cart-product-image,
.stb-page .cart-mini-img {
    border-color: var(--website-border);
    background: var(--website-background);
}

.stb-page .cart-product-name {
    color: var(--website-text);
}

.stb-page .cart-product-name:hover {
    color: var(--website-primary);
}

.stb-page .cart-unit-price,
.stb-page .cart-details-total strong,
.stb-page .summary-total-price,
.stb-page .summary-total .text-danger {
    color: var(--website-product-card-price) !important;
}

.stb-page .cart-qty-control {
    border-color: var(--website-input-border);
    border-radius: var(--website-input-radius);
}

.stb-page .cart-qty-update {
    background: var(--website-button-background);
    color: var(--website-button-text);
    border-radius: var(--website-button-radius);
}

.stb-page .cart-qty-update:hover {
    background: var(--website-button-hover-background);
    color: var(--website-button-hover-text);
}

.stb-page .cart-remove {
    border-color: var(--website-danger);
    color: var(--website-danger);
}

.stb-page .cart-remove:hover {
    background: var(--website-danger);
    color: #fff;
}

.stb-page .promo-control input,
.stb-page .form-control,
.stb-page .form-select {
    border-color: var(--website-input-border);
    background: var(--website-input-background);
    color: var(--website-input-text);
    border-radius: var(--website-input-radius);
}

.stb-page .promo-control input:focus,
.stb-page .form-control:focus,
.stb-page .form-select:focus {
    border-color: var(--website-input-focus-border);
    box-shadow: 0 0 0 3px rgba(46, 42, 40, 0.12);
}

.stb-page .promo-control button {
    background: var(--website-accent);
    color: var(--website-text);
    border-radius: var(--website-button-radius);
    font-weight: var(--website-button-weight);
}

.stb-page .promo-control button:hover {
    background: var(--website-accent-light);
    color: var(--website-text);
}

.stb-page .delivery-box,
.stb-page .address-box,
.stb-page .payment-terms-box {
    background: var(--website-background);
    border: 1px solid var(--website-border);
    border-radius: var(--website-card-radius);
}

.stb-page .summary-line.discount {
    color: var(--website-primary);
}

.stb-page .checkout-btn,
.stb-page .place-order-btn {
    background: var(--website-button-background);
    color: var(--website-button-text);
    border: 1px solid var(--website-button-border);
    border-radius: var(--website-button-radius);
    font-weight: var(--website-button-weight);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.stb-page .checkout-btn:hover,
.stb-page .place-order-btn:hover {
    background: var(--website-button-hover-background);
    color: var(--website-button-hover-text);
    transform: none;
}

.stb-page .adjust-basket-btn {
    background: var(--website-accent);
    color: var(--website-text);
    border-radius: var(--website-button-radius);
}

.stb-page .adjust-basket-btn:hover {
    background: var(--website-accent-light);
    color: var(--website-text);
    transform: none;
}

.stb-page .empty-cart-icon {
    background: var(--website-surface);
    color: var(--website-primary);
}

/*
 * Empty-cart Continue Shopping — same conflict class as confirmation:
 * .website-bootstrap a:not(.btn) forces --website-primary onto the fill.
 * Shared primary CTA tokens live in website-theme.css; keep page-local
 * reinforcement here for load-order safety.
 */
.stb-page.website-bootstrap .empty-cart > a,
.stb-page.website-bootstrap .empty-cart a.website-btn-primary,
.website-bootstrap .empty-cart > a,
.stb-page .empty-cart a {
    background: var(--website-button-background) !important;
    color: var(--website-button-text) !important;
    border: 1px solid var(--website-button-border);
    border-radius: var(--website-button-radius);
    font-weight: var(--website-button-weight);
    text-decoration: none;
}

.stb-page.website-bootstrap .empty-cart > a:hover,
.stb-page.website-bootstrap .empty-cart a.website-btn-primary:hover,
.website-bootstrap .empty-cart > a:hover,
.stb-page .empty-cart a:hover {
    background: var(--website-button-hover-background) !important;
    color: var(--website-button-hover-text) !important;
    border-color: var(--website-button-hover-background);
}

.stb-page .vat-table th,
.stb-page .summary-vat-table th {
    background: var(--website-background);
    color: var(--website-muted-text);
}

.stb-page .badge.bg-dark {
    background: var(--website-nav-background) !important;
}

/* ---------- Confirmation ---------- */

.confirm-page {
    padding: 70px 0 90px;
    min-height: 520px;
}

.confirm-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--website-card-background);
    border: 1px solid var(--website-card-border);
    border-radius: var(--website-card-radius);
    color: var(--website-card-text);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--website-card-shadow);
}

.confirm-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--website-surface);
    color: var(--website-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.confirm-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--website-accent);
    margin-bottom: 10px;
}

.confirm-title {
    font-size: 2.4rem;
    margin-bottom: 12px;
}

.confirm-copy {
    color: var(--website-muted-text);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 28px;
}

.confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 22px;
    border-radius: var(--website-button-radius);
    font-weight: var(--website-button-weight);
    text-decoration: none;
}

/*
 * Beat .website-bootstrap a:not(.btn) { color: var(--website-primary) }
 * which otherwise paints primary on the filled button (invisible label).
 */
.stb-page.website-bootstrap a.confirm-btn-primary,
.website-bootstrap a.confirm-btn-primary,
.confirm-btn-primary {
    background: var(--website-button-background) !important;
    color: var(--website-button-text) !important;
    border: 1px solid var(--website-button-border);
}

.stb-page.website-bootstrap a.confirm-btn-primary:hover,
.website-bootstrap a.confirm-btn-primary:hover,
.confirm-btn-primary:hover {
    background: var(--website-button-hover-background) !important;
    color: var(--website-button-hover-text) !important;
    border-color: var(--website-button-hover-background);
}

.stb-page.website-bootstrap a.confirm-btn-ghost,
.website-bootstrap a.confirm-btn-ghost,
.confirm-btn-ghost {
    background: var(--website-surface);
    color: var(--website-text) !important;
    border: 1px solid var(--website-border);
}

.stb-page.website-bootstrap a.confirm-btn-ghost:hover,
.website-bootstrap a.confirm-btn-ghost:hover,
.confirm-btn-ghost:hover {
    border-color: var(--website-accent);
    color: var(--website-text) !important;
}

@media (max-width: 576px) {
    .confirm-card {
        padding: 36px 22px;
    }

    .confirm-title {
        font-size: 1.85rem;
    }
}

/* ---------- Account area (profile, address, orders, password) ---------- */

.account-page {
    padding: 36px 0 70px;
    min-height: 640px;
}

.account-layout {
    align-items: flex-start;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: var(--website-surface);
    border: 1px solid var(--website-border);
    border-radius: var(--website-card-radius);
    box-shadow: var(--website-card-shadow);
}

.account-nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: calc(var(--website-button-radius) - 2px);
    color: var(--website-text) !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    transition: background-color .15s ease, color .15s ease;
}

.account-nav-link:hover {
    background: var(--website-background);
    color: var(--website-primary) !important;
}

.account-nav-link.active {
    background: var(--website-button-background);
    color: var(--website-button-text) !important;
    font-weight: var(--website-button-weight);
}

.account-panel {
    background: var(--website-card-background);
    border: 1px solid var(--website-card-border);
    border-radius: var(--website-card-radius);
    box-shadow: var(--website-card-shadow);
    color: var(--website-card-text);
    padding: 22px 24px 28px;
    overflow: hidden;
}

.account-panel-title {
    margin: 0 0 6px;
    font-family: var(--website-heading-font);
    font-weight: var(--website-heading-weight);
    font-size: 1.55rem;
    color: var(--website-text);
}

.account-panel-sub {
    margin: 0 0 20px;
    color: var(--website-muted-text);
    font-size: 14px;
}

.account-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--website-border);
}

.account-section-head h2,
.account-section-head h5 {
    margin: 0;
    font-size: 1.05rem;
    font-family: var(--website-heading-font);
    font-weight: var(--website-heading-weight);
    color: var(--website-text);
}

.account-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--website-text);
}

.account-table > :not(caption) > * > * {
    background: transparent;
    border-bottom-color: var(--website-border);
    color: var(--website-text);
}

.account-table th,
.account-table td {
    padding: 11px 12px;
    border-color: var(--website-border) !important;
    vertical-align: top;
}

.account-table thead th,
.account-table tr.account-table-head td,
.account-table tr.account-table-head th {
    background: var(--website-background) !important;
    color: var(--website-muted-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.account-table .account-label {
    width: 28%;
    color: var(--website-muted-text);
    font-weight: 500;
}

.account-address-block {
    line-height: 1.55;
    color: var(--website-text);
}

.account-address-block + .account-address-actions {
    white-space: nowrap;
}

.account-form-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    font-size: 14px;
}

.account-form-table .lblTD,
.account-form-table td:first-child {
    width: 28%;
    color: var(--website-muted-text);
    font-weight: 500;
    padding-right: 12px;
    vertical-align: middle;
}

.account-form-table h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-family: var(--website-heading-font);
    color: var(--website-text);
}

.account-page .form-control,
.account-page .form-select {
    background: var(--website-input-background);
    color: var(--website-input-text);
    border: 1px solid var(--website-input-border);
    border-radius: var(--website-input-radius);
}

.account-page .form-control:focus,
.account-page .form-select:focus {
    border-color: var(--website-input-focus-border);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.account-page .form-control::placeholder {
    color: var(--website-input-placeholder);
}

.account-page .divErr {
    color: var(--website-danger);
    font-size: 13px;
}

.account-empty {
    padding: 28px 8px;
    text-align: center;
    color: var(--website-muted-text);
}

.website-bootstrap a.website-btn-primary,
.website-bootstrap button.website-btn-primary,
.account-page .website-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 16px;
    background: var(--website-button-background) !important;
    color: var(--website-button-text) !important;
    border: 1px solid var(--website-button-border);
    border-radius: var(--website-button-radius);
    font-weight: var(--website-button-weight);
    text-decoration: none;
    cursor: pointer;
}

.website-bootstrap a.website-btn-primary:hover,
.website-bootstrap button.website-btn-primary:hover,
.account-page .website-btn-primary:hover {
    background: var(--website-button-hover-background) !important;
    color: var(--website-button-hover-text) !important;
    border-color: var(--website-button-hover-background);
}

.website-bootstrap a.website-btn-outline,
.website-bootstrap button.website-btn-outline,
.account-page .website-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 14px;
    background: var(--website-surface);
    color: var(--website-text) !important;
    border: 1px solid var(--website-border);
    border-radius: var(--website-button-radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.website-bootstrap a.website-btn-outline:hover,
.website-bootstrap button.website-btn-outline:hover,
.account-page .website-btn-outline:hover {
    border-color: var(--website-primary);
    color: var(--website-primary) !important;
}

@media (max-width: 767.98px) {
    .account-page {
        padding-top: 24px;
    }

    .account-nav {
        flex-direction: row;
        flex-wrap: wrap;
        margin-bottom: 8px;
    }

    .account-nav-link {
        flex: 1 1 auto;
        text-align: center;
        font-size: 13px;
        padding: 9px 10px;
    }

    .account-panel {
        padding: 18px 16px 22px;
    }

    .account-table .account-label,
    .account-form-table .lblTD,
    .account-form-table td:first-child {
        width: 40%;
    }
}
