/* Shop widget — drawer + preview modal. Cart button itself is in the nav (see style.css). */

/* Add to cart button inherits template .btn classes — no extra styling needed here */
.shop-add-btn.shop-added {
    background: #16a34a !important;
    color: #fff !important;
}

/* Overlay */
.shop-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.shop-cart-overlay.is-open { opacity: 1; pointer-events: auto; }

/* Drawer */
.shop-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(440px, 100vw);
    background: #fff;
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.12);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    font-family: inherit;
}
.shop-cart-drawer.is-open { transform: translateX(0); }

.shop-cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.shop-cart-drawer-header h3 { font-size: 20px; font-weight: 800; color: var(--ink, #0f172a); margin: 0; }
.shop-cart-close {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--ink, #0f172a);
}
.shop-cart-close:hover { background: #f5f5f5; }

.shop-cart-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.shop-cart-empty { text-align: center; padding: 60px 0; color: #94a3b8; font-size: 15px; }

.shop-cart-line {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.shop-cart-line:last-child { border-bottom: none; }
.shop-cart-img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: #f8fafc;
    object-fit: contain;
    padding: 6px;
    flex-shrink: 0;
}
.shop-cart-info { flex: 1; min-width: 0; }
.shop-cart-title { font-weight: 700; font-size: 13px; color: var(--ink, #0f172a); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.shop-cart-price { font-weight: 700; font-size: 15px; color: var(--primary, #1a2b7f); margin-bottom: 10px; }
.shop-cart-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 2px;
}
.shop-qty-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    color: var(--ink, #0f172a);
    font-family: inherit;
}
.shop-qty-btn:hover { background: #f5f5f5; }
.shop-qty-input {
    width: 36px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--ink, #0f172a);
    outline: none;
    -moz-appearance: textfield;
}
.shop-qty-input::-webkit-outer-spin-button,
.shop-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.shop-line-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shop-line-remove:hover { background: #fef2f2; color: #dc2626; }

.shop-cart-footer {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--border, #e2e8f0);
    background: #fff;
}
.shop-cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--muted, #64748b);
}
.shop-cart-subtotal strong { color: var(--ink, #0f172a); font-size: 22px; }
.shop-cart-checkout {
    width: 100%;
    padding: 16px;
    background: var(--primary, #1a2b7f);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.15s;
    font-family: inherit;
}
.shop-cart-checkout:hover { background: var(--primary-dark, #141f5e); }

/* Preview modal */
.shop-preview-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.shop-preview-modal.is-open { opacity: 1; pointer-events: auto; }
.shop-preview-modal-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    transform: translateY(16px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.shop-preview-modal.is-open .shop-preview-modal-card { transform: translateY(0); }
.shop-preview-modal-icon { font-size: 48px; color: var(--primary, #1a2b7f); margin-bottom: 18px; }
.shop-preview-modal-card h3 { font-size: 22px; margin: 0 0 12px; color: var(--ink, #0f172a); }
.shop-preview-modal-card .shop-preview-modal-lead {
    font-size: 14px; line-height: 1.55; color: var(--muted, #64748b);
    margin: 0 0 16px;
}
.shop-preview-steps {
    text-align: left;
    counter-reset: step;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}
.shop-preview-steps li {
    position: relative;
    counter-increment: step;
    padding: 10px 14px 10px 44px;
    margin-bottom: 8px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink, #0f172a);
}
.shop-preview-steps li::before {
    content: counter(step);
    position: absolute;
    left: 12px;
    top: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary, #1a2b7f);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.shop-preview-modal-footnote {
    font-size: 13px;
    color: var(--muted, #64748b);
    margin: 4px 0 22px;
    font-style: italic;
}
.shop-preview-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.shop-preview-cta {
    background: var(--primary, #1a2b7f);
    color: #fff;
    padding: 14px 22px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: inherit;
    transition: background 0.15s;
}
.shop-preview-cta:hover { background: var(--primary-dark, #141f5e); }
.shop-preview-dismiss {
    background: transparent;
    color: var(--muted, #64748b);
    border: 1px solid var(--border, #e2e8f0);
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}
.shop-preview-dismiss:hover { background: #f8fafc; }

@media (max-width: 480px) {
    .shop-cart-drawer { width: 100vw; }
}
