/* assets/css/site.css */
/* PicCommerce — frontend styles. Theme-agnostic; only sets layout for the
   piccommerce-* containers. Typography is left to the active theme. */

.piccommerce {
    margin: 2rem 0;
}

.piccommerce-empty {
    color: #6b7280;
    font-style: italic;
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */

.piccommerce-btn {
    display: inline-block;
    padding: .65em 1.2em;
    background: #111827;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    line-height: 1.2;
    border: 1px solid #111827;
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
}
.piccommerce-btn:hover {
    background: #1f2937;
    color: #fff;
}
.piccommerce-btn:active {
    transform: translateY(1px);
}
.piccommerce-btn--ghost {
    background: transparent;
    color: #111827;
    border-color: #d1d5db;
}
.piccommerce-btn--ghost:hover {
    background: #f3f4f6;
    color: #111827;
}

/* -------------------------------------------------------------------------
   Public galleries index
   ------------------------------------------------------------------------- */

.piccommerce-galleries__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.piccommerce-galleries__item {
    margin: 0;
}

.piccommerce-galleries__link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.piccommerce-galleries__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.piccommerce-galleries__thumb {
    display: block;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
    overflow: hidden;
    position: relative;
}
.piccommerce-galleries__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.piccommerce-galleries__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.piccommerce-galleries__name {
    display: block;
    padding: .65rem .25rem 0;
    font-weight: 600;
    font-size: 1rem;
}

/* -------------------------------------------------------------------------
   Single gallery
   ------------------------------------------------------------------------- */

.piccommerce-gallery__header {
    margin-bottom: 1.5rem;
}
.piccommerce-gallery__title {
    margin: 0 0 .35rem;
    font-size: 1.75rem;
    line-height: 1.2;
}
.piccommerce-gallery__descr {
    color: #4b5563;
    margin: 0 0 .35rem;
}
.piccommerce-gallery__meta {
    color: #6b7280;
    font-size: .9rem;
    margin: 0;
}

.piccommerce-gallery__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--pc-cols, 4), 1fr);
    gap: .75rem;
}
@media (max-width: 900px) {
    .piccommerce-gallery__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .piccommerce-gallery__grid { grid-template-columns: repeat(2, 1fr); }
}

.piccommerce-gallery__item { margin: 0; }

.piccommerce-gallery__photo {
    display: block;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
    overflow: hidden;
    border-radius: 6px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.piccommerce-gallery__photo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}
.piccommerce-gallery__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* -------------------------------------------------------------------------
   Single photo
   ------------------------------------------------------------------------- */

.piccommerce-photo__crumbs { margin: 0 0 1rem; }
.piccommerce-photo__back {
    color: #4b5563;
    text-decoration: none;
}
.piccommerce-photo__back:hover { color: #111827; text-decoration: underline; }

.piccommerce-photo__title {
    margin: 0 0 1rem;
    font-size: 1.4rem;
}

.piccommerce-photo__figure {
    margin: 0 0 1rem;
    text-align: center;
    background: #f3f4f6;
    border-radius: 6px;
    overflow: hidden;
}
.piccommerce-photo__img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.piccommerce-photo__cta {
    padding: 1rem 0;
    text-align: center;
}

/* -------------------------------------------------------------------------
   Notices (expired / locked) + password gate
   ------------------------------------------------------------------------- */

.piccommerce-notice,
.piccommerce-password {
    max-width: 520px;
    margin: 3rem auto;
    padding: 2rem 1.5rem;
    text-align: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.piccommerce-notice__icon {
    margin: 0 auto 1rem;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
}
.piccommerce-notice--expired .piccommerce-notice__icon { color: #b45309; }
.piccommerce-notice--locked  .piccommerce-notice__icon { color: #4b5563; }
.piccommerce-notice__title {
    margin: 0 0 .5rem;
    font-size: 1.25rem;
}
.piccommerce-notice__body {
    color: #4b5563;
    margin: 0 0 .75rem;
    line-height: 1.5;
}
.piccommerce-notice__hint {
    color: #6b7280;
    font-size: .9rem;
}
.piccommerce-notice__cta {
    margin: 1.25rem 0 0;
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.piccommerce-password__form {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    max-width: 320px;
    margin: 1.25rem auto 0;
}
.piccommerce-password__input {
    width: 100%;
    padding: .65em .8em;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}
.piccommerce-password__input:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    border-color: #2563eb;
}
.piccommerce-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: .65em .8em;
    border-radius: 6px;
    margin: 0 auto 1rem;
    max-width: 320px;
}

/* -------------------------------------------------------------------------
   Watermark protection (cosmetic only — doesn't replace the GD-baked mark)
   ------------------------------------------------------------------------- */

.piccommerce[data-protect="1"] img {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;  /* still clickable for the photo detail link */
}

/* =========================================================================
   Phase 3 — Auth pages (login / forgot / reset)
   ========================================================================= */

.piccommerce-auth {
    max-width: 420px;
    margin: 3rem auto;
}
.piccommerce-auth__card {
    padding: 2rem 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.piccommerce-auth__title {
    margin: 0 0 .5rem;
    font-size: 1.4rem;
    line-height: 1.2;
}
.piccommerce-auth__sub {
    color: #4b5563;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}
.piccommerce-auth__form {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.piccommerce-auth__label {
    font-size: .9rem;
    font-weight: 500;
    margin-top: .5rem;
    margin-bottom: .25rem;
    color: #1f2937;
}
.piccommerce-auth__input {
    width: 100%;
    padding: .65em .8em;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    background: #fff;
}
.piccommerce-auth__input:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    border-color: #2563eb;
}
.piccommerce-auth__submit {
    width: 100%;
    margin-top: 1rem;
}
.piccommerce-auth__alt {
    margin: 1rem 0 0;
    text-align: center;
    color: #6b7280;
    font-size: .9rem;
}
.piccommerce-auth__alt a { color: #2563eb; text-decoration: none; }
.piccommerce-auth__alt a:hover { text-decoration: underline; }

.piccommerce-auth__cta {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin: 1rem 0 0;
}

.piccommerce-notice-line {
    padding: .65em .8em;
    border-radius: 6px;
    margin: 0 0 .75rem;
    font-size: .95rem;
}
.piccommerce-notice-line--ok  { background: #d1fae5; color: #065f46; }
.piccommerce-notice-line--err { background: #fee2e2; color: #991b1b; }

/* =========================================================================
   Phase 4 — Photo detail two-column layout, side panel, modal, cart
   ========================================================================= */

.pc-photo__layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    align-items: start;
}
@media (min-width: 900px) {
    .pc-photo__layout {
        grid-template-columns: 1fr 360px;
    }
}

.pc-photo__panel {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem 1rem;
    position: sticky;
    top: 1rem;
}
.pc-photo__panel-section { margin-top: 1.25rem; }
.pc-photo__panel-h3 {
    margin: 0 0 .75rem;
    font-size: .95rem;
    font-weight: 600;
    color: #1f2937;
}
.pc-photo__panel-foot {
    margin-top: 1rem;
    text-align: right;
    font-size: .9rem;
}
.pc-photo__panel-foot a { color: #2563eb; text-decoration: none; }
.pc-photo__panel-foot a:hover { text-decoration: underline; }
.pc-photo__panel-warning {
    padding: .75rem .9rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #78350f;
    font-size: .9rem;
}
.pc-photo__panel-warning p { margin: 0 0 .5rem; }
.pc-photo__panel-warning p:last-child { margin: 0; }

.pc-active-package {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}
.pc-active-package__switcher {
    display: block;
    margin-bottom: .75rem;
    font-size: .85rem;
}
.pc-active-package__switcher-label {
    display: block;
    margin-bottom: .25rem;
    color: #4b5563;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.pc-active-package__switcher select {
    width: 100%;
    padding: .4em .6em;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: .9rem;
}
.pc-active-package__title {
    font-size: 1.1rem;
    margin: 0 0 .25rem;
    color: #111827;
}
.pc-active-package__progress {
    margin: 0 0 .75rem;
    font-size: .85rem;
}
.pc-active-package__progress--ok   { color: #047857; }
.pc-active-package__progress--warn { color: #b45309; }

.pc-slot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.pc-slot-row {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: .65rem .75rem;
}
.pc-slot-row--filled {
    background: #f3f4f6;
    opacity: .75;
}
.pc-slot-row__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .35rem;
}
.pc-slot-row__name { font-weight: 600; font-size: .95rem; color: #111827; }
.pc-slot-row__progress {
    font-size: .8rem;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}
.pc-slot-row__hint  { margin: 0; font-size: .85rem; color: #6b7280; }
.pc-slot-row__add   { width: 100%; }

.pc-size-select {
    display: flex;
    gap: .5rem;
    align-items: stretch;
}
.pc-size-select__select {
    flex: 1;
    padding: .55em .7em;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: .9rem;
}

/* ----- Modal ----- */
.pc-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.pc-modal.is-open { display: flex; }
.pc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
}
.pc-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.pc-modal__close {
    position: absolute;
    top: .5rem;
    right: .75rem;
    background: transparent;
    border: 0;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}
.pc-modal__close:hover { color: #111827; }
.pc-modal__title { margin: 0 0 .25rem; font-size: 1.2rem; }
.pc-modal__sub   { margin: 0 0 1rem; color: #6b7280; font-size: .9rem; }

.pc-package-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.pc-package-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .85rem 1rem;
    background: #fff;
}
.pc-package-card__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .25rem;
}
.pc-package-card__name {
    margin: 0;
    font-size: 1rem;
    color: #111827;
}
.pc-package-card__type {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    background: #f3f4f6;
    padding: .15rem .5rem;
    border-radius: 999px;
}
.pc-package-card__price {
    font-size: .95rem;
    font-weight: 600;
    color: #047857;
    margin-bottom: .35rem;
}
.pc-package-card__descr {
    margin: 0 0 .65rem;
    font-size: .85rem;
    color: #4b5563;
    line-height: 1.45;
}

/* ----- Cart ----- */
.piccommerce-cart {
    max-width: 880px;
    margin: 2rem auto;
}
.piccommerce-cart__head { margin-bottom: 1.25rem; }
.piccommerce-cart__title { margin: 0; font-size: 1.6rem; }
.piccommerce-cart__empty {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
}
.piccommerce-cart__empty-msg { margin: 0 0 1rem; color: #4b5563; font-size: 1rem; }

.pc-cart-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.pc-cart-row {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
}
.pc-cart-row--single {
    display: grid;
    gap: 1rem;
    grid-template-columns: 80px 1fr auto auto;
    align-items: center;
}
.pc-cart-row__thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
}
.pc-cart-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pc-cart-row__thumb-fallback {
    display: block;
    width: 100%;
    height: 100%;
    background: #e5e7eb;
}
.pc-cart-row__name { font-weight: 600; color: #111827; margin-bottom: .25rem; }
.pc-cart-row__meta {
    color: #6b7280;
    font-size: .85rem;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}
.pc-cart-row__meta a { color: #2563eb; text-decoration: none; }
.pc-cart-row__meta a:hover { text-decoration: underline; }
.pc-cart-row__price {
    font-weight: 600;
    font-size: 1rem;
    color: #047857;
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 5rem;
}

.pc-cart-row__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.pc-cart-row__pkg-name { margin: 0; font-size: 1.1rem; }
.pc-cart-row__pkg-meta {
    color: #6b7280;
    font-size: .85rem;
    display: flex;
    gap: .35rem;
    margin-top: .15rem;
}
.pc-cart-row__pkg-meta a { color: #2563eb; text-decoration: none; }
.pc-cart-row__head-right {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}
.pc-cart-row__active-pill {
    background: #047857;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    padding: .2rem .55rem;
    border-radius: 999px;
}
.pc-cart-row__progress {
    font-size: .8rem;
    padding: .2rem .55rem;
    border-radius: 999px;
}
.pc-cart-row__progress--ok   { background: #d1fae5; color: #065f46; }
.pc-cart-row__progress--warn { background: #fef3c7; color: #92400e; }
.pc-cart-row__price-line {
    font-weight: 600;
    color: #047857;
    margin: .5rem 0;
    font-size: 1rem;
}
.pc-cart-row__items {
    margin: .75rem 0 .25rem;
    border-top: 1px solid #e5e7eb;
    padding-top: .75rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.pc-pkg-item__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: .35rem;
}
.pc-pkg-item__name { font-weight: 600; font-size: .9rem; color: #1f2937; }
.pc-pkg-item__qty  { font-size: .8rem; color: #6b7280; font-variant-numeric: tabular-nums; }
.pc-pkg-item__empty { margin: 0; font-size: .8rem; color: #9ca3af; font-style: italic; }

.pc-mini-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.pc-mini-thumb {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}
.pc-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pc-mini-thumb__count {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, .75);
    color: #fff;
    font-size: .7rem;
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 1.2;
    font-weight: 600;
}
.pc-mini-thumb__remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    line-height: 14px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: 1rem;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    text-align: center;
    z-index: 1;
}
.pc-mini-thumb__remove:hover { background: #b91c1c; }

.pc-cart-row__pkg-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid #e5e7eb;
}

.pc-cart-footer {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.pc-cart-footer__total { font-size: 1.15rem; }
.pc-cart-footer__label  { color: #6b7280; margin-right: .5rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.pc-cart-footer__amount { font-weight: 700; color: #047857; }
.pc-cart-footer__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ----- piccommerce-btn size variant ----- */
.piccommerce-btn--sm { padding: .4em .8em; font-size: .85rem; }

/* =========================================================================
   Phase 5 — Checkout: address, payment, confirmation
   ========================================================================= */

.piccommerce-checkout {
    max-width: 920px;
    margin: 2rem auto;
}
.piccommerce-checkout__head { margin-bottom: 1.5rem; }
.piccommerce-checkout__title { margin: 0 0 .25rem; font-size: 1.6rem; }
.piccommerce-checkout__sub { margin: 0; color: #6b7280; font-size: .95rem; }

.piccommerce-checkout__form { max-width: 720px; margin: 0 auto; }

.pc-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}
.pc-field { display: flex; flex-direction: column; gap: .35rem; }
.pc-field--span-2 { grid-column: 1 / -1; }
.pc-field__label {
    font-size: .85rem;
    font-weight: 600;
    color: #374151;
}
.pc-field__req { color: #b91c1c; margin-left: .15rem; }
.pc-field__hint { font-size: .8rem; color: #6b7280; margin-top: .15rem; }
.pc-field input[type="text"],
.pc-field input[type="email"],
.pc-field input[type="tel"],
.pc-field input[type="password"] {
    width: 100%;
    padding: .55em .75em;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: .95rem;
    background: #fff;
    box-sizing: border-box;
}
.pc-field input:focus {
    outline: 2px solid #2563eb;
    outline-offset: -1px;
    border-color: #2563eb;
}

.piccommerce-checkout__create-account {
    margin-top: 1rem;
    padding: .75rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.piccommerce-checkout__create-account summary {
    cursor: pointer;
    font-weight: 600;
    color: #1f2937;
    font-size: .9rem;
}
.piccommerce-checkout__create-account[open] summary { margin-bottom: .75rem; }
.piccommerce-checkout__create-account-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    margin-top: .75rem;
}

.piccommerce-checkout__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.piccommerce-checkout__warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    color: #78350f;
}
.piccommerce-checkout__warn strong { display: block; margin-bottom: .25rem; }
.piccommerce-checkout__warn p { margin: 0; font-size: .9rem; }

/* ----- payment two-col ----- */
.pc-checkout__layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 820px) {
    .pc-checkout__layout {
        grid-template-columns: 1fr 360px;
        align-items: start;
    }
}
.pc-checkout__main { display: flex; flex-direction: column; gap: 1rem; }
.pc-checkout__summary { position: sticky; top: 1rem; }

.pc-checkout-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}
.pc-checkout-card__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .65rem;
}
.pc-checkout-card__title { margin: 0; font-size: 1.05rem; }
.pc-checkout-card__edit  {
    font-size: .85rem;
    color: #2563eb;
    text-decoration: none;
}
.pc-checkout-card__edit:hover { text-decoration: underline; }
.pc-checkout-card__hint  { color: #6b7280; font-size: .85rem; margin: 0 0 .75rem; }
.pc-checkout-card__rule  {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: .85rem 0;
}
.pc-checkout-card__body p { margin: 0 0 .35rem; line-height: 1.5; }
.pc-checkout-card__body p:last-child { margin-bottom: 0; }

.pc-checkout__back-link  { margin: 0; text-align: center; }
.pc-checkout__back-link a { color: #6b7280; font-size: .9rem; text-decoration: none; }
.pc-checkout__back-link a:hover { color: #2563eb; text-decoration: underline; }

/* ----- payment form ----- */
.pc-payment-form { display: flex; flex-direction: column; gap: 1rem; }
.pc-payment-form input {
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}
.pc-payment-form__error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: .65rem .9rem;
    border-radius: 6px;
    font-size: .9rem;
    margin: 0;
}
.pc-payment-form__spinner {
    display: inline-block;
    margin-left: .5rem;
    animation: pc-spin 1s linear infinite;
}
@keyframes pc-spin {
    from { transform: rotate(0); }
    to   { transform: rotate(360deg); }
}

.piccommerce-btn--block {
    display: block;
    width: 100%;
    text-align: center;
    padding: .85em 1.2em;
    font-size: 1rem;
    font-weight: 600;
}

/* ----- summary rows ----- */
.pc-summary-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.pc-summary-row__top {
    display: grid;
    gap: .65rem;
    grid-template-columns: auto 1fr auto;
    align-items: flex-start;
}
.pc-summary-row__thumb {
    width: 40px; height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: #f3f4f6;
}
.pc-summary-row__name { font-size: .9rem; font-weight: 600; color: #111827; line-height: 1.4; }
.pc-summary-row__sub  { display: block; font-weight: 400; font-size: .8rem; color: #6b7280; margin-top: .15rem; }
.pc-summary-row__price {
    font-size: .9rem;
    font-weight: 600;
    color: #047857;
    font-variant-numeric: tabular-nums;
}
.pc-summary-row__meta { margin: .15rem 0 .35rem; font-size: .8rem; color: #6b7280; }

.pc-summary-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .25rem;
}
.pc-summary-thumb {
    position: relative;
    width: 40px; height: 40px;
    border-radius: 3px;
    overflow: hidden;
    background: #f3f4f6;
}
.pc-summary-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-summary-thumb__count {
    position: absolute;
    bottom: 1px; right: 1px;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: .65rem;
    line-height: 1;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
}

.pc-summary-totals {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .35rem .85rem;
    margin: 0;
    font-size: .9rem;
}
.pc-summary-totals dt { color: #6b7280; }
.pc-summary-totals dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #111827;
}
.pc-summary-totals__total {
    font-size: 1.05rem !important;
    font-weight: 700;
    color: #047857 !important;
    margin-top: .35rem;
}

/* ----- confirmation ----- */
.piccommerce-checkout--confirm { max-width: 720px; }
.pc-confirm__hero {
    text-align: center;
    margin-bottom: 2rem;
}
.pc-confirm__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.pc-confirm__icon--ok   { color: #047857; }
.pc-confirm__icon--warn { color: #b45309; }
.pc-confirm__title { margin: 0 0 .5rem; font-size: 1.6rem; color: #111827; }
.pc-confirm__sub   { margin: 0; color: #4b5563; }
.pc-confirm__card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
.pc-confirm__h2 { margin: 0 0 1rem; font-size: 1.05rem; }
.pc-confirm__items { list-style: none; margin: 0 0 .85rem; padding: 0; display: flex; flex-direction: column; gap: .65rem; }
.pc-confirm__item-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
}
.pc-confirm__item-name  { font-weight: 600; color: #111827; font-size: .95rem; }
.pc-confirm__item-size  { font-weight: 400; color: #6b7280; font-size: .85rem; margin-left: .35rem; }
.pc-confirm__item-price {
    font-weight: 600;
    color: #047857;
    font-variant-numeric: tabular-nums;
}
.pc-confirm__item-meta { margin: .15rem 0 0; font-size: .8rem; color: #6b7280; }
.pc-confirm__txn { margin: .75rem 0 0; font-size: .8rem; color: #9ca3af; font-family: ui-monospace, monospace; }
.pc-confirm__cta { text-align: center; margin: 2rem 0 0; }
