/* ============================================================
   Swag Shop — Public page styles
   Add to site.css or load as a separate stylesheet
   ============================================================ */

/* ── Page header ── */
.shop-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.shop-title {
    margin: 0 0 0.25rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text);
}

.shop-subtitle {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 1rem;
}

/* ── States ── */
.shop-coming-soon,
.shop-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

.shop-loading {
    padding: 3rem;
    text-align: center;
    color: var(--color-text-muted);
}

/* ── Category filters ── */
.shop-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.shop-filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.shop-filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.shop-filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-inverse);
    font-weight: 600;
}

/* ── Product grid ── */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* ── Product card ── */
.shop-card {
    background: var(--color-card-bg, #fff);
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
}

.shop-card-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--color-bg, #f5f3f0);
    overflow: hidden;
}

.shop-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}

.shop-card:hover .shop-card-image img {
    transform: scale(1.04);
}

.shop-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--color-text-muted);
    opacity: 0.3;
}

.shop-card-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.shop-card-body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-card-category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    margin-bottom: 0.3rem;
}

.shop-card-title {
    margin: 0 0 0.3rem;
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.35;
}

.shop-card-variants {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0 0 0.5rem;
}

.shop-card-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.shop-card-price {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.shop-price-current {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}

.shop-price-lg {
    font-size: 1.4rem;
}

.shop-price-was {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.shop-card-shipping {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: right;
}

.shop-card-source {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
    font-style: italic;
}

/* ── Modal backdrop ── */
.shop-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
}

/* ── Modal ── */
.shop-modal {
    background: var(--color-surface, #fff);
    border-radius: 16px;
    max-width: 820px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.shop-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.07);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.shop-modal-close:hover {
    background: rgba(0, 0, 0, 0.14);
}

.shop-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

/* ── Modal images ── */
.shop-modal-images {
    border-radius: 16px 0 0 16px;
    overflow: hidden;
    background: var(--color-bg, #f5f3f0);
}

.shop-modal-main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.shop-modal-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: var(--color-bg, #f5f3f0);
    flex-wrap: wrap;
}

.shop-modal-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s;
    opacity: 0.7;
}

.shop-modal-thumb.active,
.shop-modal-thumb:hover {
    border-color: var(--color-primary);
    opacity: 1;
}

/* ── Modal info ── */
.shop-modal-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shop-modal-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
}

.shop-modal-price {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.shop-modal-description {
    margin: 0;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.shop-modal-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.shop-modal-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.shop-modal-value {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text);
}

.shop-modal-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 8px;
    font-size: 0.92rem;
    background: var(--color-card-bg, #fff);
    color: var(--color-text);
    transition: border-color 0.15s;
}

.shop-modal-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-focus, rgba(0,174,239,0.15));
}

.shop-checkout-error {
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, var(--color-danger) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-danger) 20%, transparent);
    border-radius: 8px;
    color: var(--color-danger);
    font-size: 0.88rem;
}

.shop-buy-btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 600;
}

.shop-modal-trust {
    margin: 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* Override the global `svg { display: block }` reset in site.css so the
   padlock + Stripe wordmark SVGs in shop trust badges flow inline with the
   surrounding text. Covers every trust-badge variant across the shop pages. */
.shop-modal-trust svg,
.cart-trust svg,
.checkout-trust svg {
    display: inline-block;
    vertical-align: middle;
}

/* ── Order complete ── */
.shop-order-complete {
    max-width: 520px;
    margin: 4rem auto;
    text-align: center;
}

.shop-order-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.shop-order-subtitle {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.shop-order-summary {
    background: var(--color-card-bg, #fff);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.shop-order-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
    padding: 0.35rem 0;
    color: var(--color-text-muted);
}

.shop-order-total {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-weight: 700;
    color: var(--color-text);
    font-size: 1rem;
}

.shop-order-delivery {
    background: var(--color-primary-tint-light, rgba(122, 21, 48, 0.05));
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    text-align: left;
    margin-bottom: 1rem;
}

/* ── Variant option buttons (public modal) ── */
.shop-variant-options {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.shop-variant-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    background: transparent;
    color: var(--color-text);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.shop-variant-btn:hover {
    border-color: var(--color-primary);
    background: rgba(0, 0, 0, 0.03);
}

.shop-variant-btn.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.shop-variant-upcharge {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ── Stock indicator ── */
.shop-stock-indicator {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 0;
}

.shop-stock-out {
    color: var(--color-danger);
}

.shop-stock-low {
    color: var(--color-warning);
}

/* ── Shipping option radio rows (public modal) ── */
.shop-shipping-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 8px 12px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    margin-top: 0.4rem;
    font-size: 0.9rem;
    transition: border-color 0.15s, background 0.15s;
}

.shop-shipping-option.active {
    border-color: var(--color-primary);
    background: rgba(0, 0, 0, 0.02);
}

.shop-shipping-option input[type="radio"] {
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.shop-shipping-cost {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.shop-shipping-free {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--color-success);
    font-weight: 600;
}

/* ── Personalization fields ── */
.shop-modal-help {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
}

.shop-modal-charcount {
    display: block;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-align: right;
    margin-top: 0.1rem;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .shop-modal-body {
        grid-template-columns: 1fr;
    }

    .shop-modal-images {
        border-radius: 16px 16px 0 0;
    }

    .shop-modal-info {
        padding: 1.25rem;
    }

    .shop-modal {
        max-height: 95vh;
    }
}


/* ══════════════════════════════════════════════════════════
   Cart button (legacy — cart now lives in MainLayout's global nav)

   The .shop-header rule that used to live here turned the page header
   into a flex row to position the cart button alongside the H1. Once
   the cart button moved out, the flex layout kept stacking the H1 and
   the description side-by-side. Removed so the original block layout
   above (padding-bottom + border-bottom) takes effect again and the
   description flows below the H1 at full width.
   ══════════════════════════════════════════════════════════ */

.shop-cart-btn {
    position: relative;
    background: var(--color-surface, #1e2235);
    border: 1.5px solid var(--color-border, #2e3347);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--color-text, #e2e8f0);
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.shop-cart-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: var(--color-border-hover, #3e4560);
}

.shop-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--color-primary, #e5ae20);
    color: var(--color-text-inverse);
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

/* ══════════════════════════════════════════════════════════
   Cart drawer
   ══════════════════════════════════════════════════════════ */

.shop-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    animation: fadeIn 0.2s ease;
}

.shop-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    background: var(--color-surface, #1e2235);
    border-left: 1px solid var(--color-border, #2e3347);
    z-index: 1101;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 32px rgba(0,0,0,0.4);
}

.shop-cart-drawer.open {
    transform: translateX(0);
}

.shop-cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--color-border, #2e3347);
    flex-shrink: 0;
}

.shop-cart-drawer-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.shop-cart-drawer-close {
    background: none;
    border: none;
    color: var(--color-text-muted, #8891aa);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.shop-cart-drawer-close:hover {
    background: rgba(255,255,255,0.06);
    color: var(--color-text, #e2e8f0);
}

/* ── Empty state ── */
.shop-cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted, #8891aa);
}

/* ── Items list ── */
.shop-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shop-cart-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--color-border, #2e3347);
    border-radius: 10px;
    padding: 0.75rem;
}

.shop-cart-item-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}

.shop-cart-item-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.shop-cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.shop-cart-item-title {
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.3;
}

.shop-cart-item-variant,
.shop-cart-item-shipping {
    font-size: 0.78rem;
    color: var(--color-text-muted, #8891aa);
}

.shop-cart-item-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.35rem;
}

.shop-cart-item-subtotal {
    font-weight: 700;
    font-size: 0.9rem;
}

.shop-cart-item-remove {
    background: none;
    border: none;
    color: var(--color-text-muted, #8891aa);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.2rem;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.15s;
    line-height: 1;
    margin-top: 2px;
}

.shop-cart-item-remove:hover { color: var(--color-danger); }

/* ── Qty controls ── */
.shop-cart-qty {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.shop-cart-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1.5px solid var(--color-btn-outline, var(--color-primary));
    background: transparent;
    color: var(--color-btn-outline, var(--color-primary));
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    line-height: 1;
}

.shop-cart-qty-btn:hover:not(:disabled) {
    background: var(--color-btn-outline-hover-bg, rgba(122, 21, 48, 0.08));
}

.shop-cart-qty-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.shop-cart-qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ── Footer / totals ── */
.shop-cart-footer {
    border-top: 1px solid var(--color-border, #2e3347);
    padding: 1rem 1.25rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shop-cart-totals {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.shop-cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--color-text-muted, #8891aa);
}

.shop-cart-grand-total {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text, #e2e8f0);
    padding-top: 0.35rem;
    border-top: 1px solid var(--color-border, #2e3347);
    margin-top: 0.15rem;
}

.shop-checkout-btn {
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem;
}

.shop-view-cart-link {
    text-align: center;
    font-size: 0.83rem;
    color: var(--color-primary, #e5ae20);
    text-decoration: none;
}

.shop-view-cart-link:hover { text-decoration: underline; }

/* ── Modal qty selector ── */
.shop-modal-qty {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* ══════════════════════════════════════════════════════════
   Shipping admin — two-panel layout
   ══════════════════════════════════════════════════════════ */

/* ── Variant option image (buyer-facing PDP buttons) ── */
.shop-variant-btn-img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}