/* ── The webshop on a site: the cart (site/shop-cart.js), and the shop's
   own pages — the order page and the customer's account
   (site/_shop_layout.html.twig). Everything is prefixed pgb- and sized in
   px, so a site's own CSS and font sizes don't reach in. --pgb-accent is
   the site's primary colour. ── */

.pgb-cart-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--pgb-accent, #1e293b);
    color: #fff;
    font:
        600 15px / 1 system-ui,
        sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}
.pgb-cart-toggle[hidden] {
    display: none;
}
.pgb-cart-count {
    min-width: 22px;
    padding: 3px 6px;
    border-radius: 999px;
    background: #fff;
    color: #1e293b;
    font-size: 12px;
    text-align: center;
}

.pgb-cart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9991;
    background: rgba(15, 23, 42, 0.45);
}
.pgb-cart {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 9992;
    display: flex;
    flex-direction: column;
    width: min(400px, 100vw);
    background: #fff;
    color: #1e293b;
    font:
        15px / 1.5 system-ui,
        sans-serif;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
}
.pgb-cart[hidden],
.pgb-cart-backdrop[hidden] {
    display: none;
}
.pgb-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.pgb-cart-head h2 {
    margin: 0;
    font-size: 18px;
}
.pgb-cart-close {
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}
.pgb-cart-lines {
    flex: 1;
    overflow-y: auto;
    margin: 0;
    padding: 8px 20px;
    list-style: none;
}
.pgb-cart-line {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}
.pgb-cart-line img,
.pgb-cart-line .pgb-cart-noimg {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
}
.pgb-cart-name {
    font-weight: 600;
}
.pgb-cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.pgb-cart-qty button {
    width: 26px;
    height: 26px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
}
.pgb-cart-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
}
.pgb-cart-foot {
    padding: 18px 20px;
    border-top: 1px solid #e2e8f0;
}
.pgb-cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 4px;
}
.pgb-cart-note {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 13px;
}
.pgb-cart-code {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font:
        15px system-ui,
        sans-serif;
    text-transform: uppercase;
}
.pgb-cart-error {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 14px;
}
.pgb-cart-checkout {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 10px;
    background: var(--pgb-accent, #1e293b);
    color: #fff;
    font:
        600 16px / 1 system-ui,
        sans-serif;
    cursor: pointer;
}
.pgb-cart-checkout:disabled {
    opacity: 0.6;
    cursor: wait;
}

.pgb-cart-account {
    margin-left: auto;
    margin-right: 16px;
    color: #64748b;
    font-size: 14px;
}

/* The shop's own pages (the shop-content block, ShopBlocks): a card in
   the shop template, in the site's font; buttons and links in its primary
   colour (--pgb-accent, set on .pgb-shop-page). */
.pgb-shop-page {
    /* A short page (a login form) keeps the site's footer near the bottom. */
    min-height: 45vh;
    width: 100%;
    color: #1e293b;
    font-size: 16px;
    line-height: 1.6;
}
.pgb-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
}
/* In the editor: each sample page under its name and address */
.pgb-sample-label {
    max-width: 560px;
    margin: 28px auto 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pgb-sample-label:first-child {
    margin-top: 0;
}
.pgb-sample-label span {
    margin-left: 6px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.pgb-card--plain {
    padding: 0;
    border: 0;
    background: none;
}
.pgb-card h1 {
    margin: 0 0 8px;
    font-size: 26px;
    line-height: 1.25;
}
.pgb-card a {
    color: var(--pgb-accent, #1e293b);
}
.pgb-intro {
    margin: 0;
    white-space: pre-line;
}

/* The order page */
.pgb-order-lines,
.pgb-orders {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}
.pgb-order-lines td,
.pgb-orders td {
    padding: 9px 0;
    border-bottom: 1px solid #f1f5f9;
}
.pgb-order-lines td:last-child,
.pgb-orders td:last-child {
    text-align: right;
}
.pgb-order-total td {
    border-bottom: 0;
    font-weight: 700;
}
.pgb-order-sub {
    margin: 24px 0 8px;
    font-size: 17px;
}
.pgb-order-downloads {
    margin: 0 0 16px;
    padding-left: 20px;
    font-weight: 600;
}

/* The account pages: a form, a list */
.pgb-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0 8px;
}
.pgb-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}
.pgb-form input {
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: 16px;
}
.pgb-button {
    padding: 13px 20px;
    border: 0;
    border-radius: 10px;
    background: var(--pgb-accent, #1e293b);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.pgb-card a.pgb-button {
    display: inline-block;
    margin-top: 8px;
    color: #fff;
}
.pgb-button--quiet {
    padding: 8px 0;
    background: none;
    color: #64748b;
    font-weight: 500;
    text-decoration: underline;
}
.pgb-message {
    padding: 12px 14px;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 14px;
}
.pgb-message--ok {
    background: #dcfce7;
    color: #166534;
}
.pgb-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 12px;
    font-size: 14px;
}
.pgb-account-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
