/* ShopCore Catalog Mode — store styles. Follows ShopCore's tokens, which follow the Template. */
.sccat {
    --sccat-accent: var(--shopcore-accent, var(--cms-accent, #2563eb));
    --sccat-accent-ink: var(--shopcore-accent-ink, #fff);
    --sccat-line: var(--shopcore-line, #e5e7eb);
    --sccat-soft: var(--shopcore-soft, #f8fafc);
    --sccat-muted: var(--shopcore-muted, #6b7280);
    --sccat-bad: var(--shopcore-bad, #b91c1c);
    --sccat-ok: var(--shopcore-ok, #15803d);
    --sccat-radius: var(--shopcore-radius, 10px);
}
.sccat-actions { margin: 1rem 0 1.25rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.sccat-button {
    --sccat-accent: var(--shopcore-accent, var(--cms-accent, #2563eb));
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 44px; padding: .65em 1.4em; border-radius: var(--shopcore-radius, 10px);
    font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
    border: 2px solid var(--sccat-accent); transition: filter .15s, background .15s, color .15s;
}
/* Templates often colour every link inside product cards (a, a:hover, a:visited). The button keeps its own
   colours in every state, so its text never takes the template's link colour. Change them with
   --sccat-button-bg and --sccat-button-ink, or in Catalog Mode → Settings → Extra CSS. */
.sccat-button { --sccat-button-bg: var(--sccat-accent); --sccat-button-ink: var(--shopcore-accent-ink, #fff); }
a.sccat-button.sccat-button--button, a.sccat-button.sccat-button--button:link, a.sccat-button.sccat-button--button:visited,
a.sccat-button.sccat-button--button:hover, a.sccat-button.sccat-button--button:focus, a.sccat-button.sccat-button--button:active,
button.sccat-button.sccat-button--button, button.sccat-button.sccat-button--button:hover {
    background: var(--sccat-button-bg) !important; border-color: var(--sccat-button-bg) !important;
    color: var(--sccat-button-ink) !important; text-decoration: none !important;
}
a.sccat-button.sccat-button--button:hover, button.sccat-button.sccat-button--button:hover { filter: brightness(1.08); }
a.sccat-button.sccat-button--outline, a.sccat-button.sccat-button--outline:link, a.sccat-button.sccat-button--outline:visited {
    background: transparent !important; border-color: var(--sccat-button-bg) !important;
    color: var(--sccat-button-bg) !important; text-decoration: none !important;
}
a.sccat-button.sccat-button--outline:hover, a.sccat-button.sccat-button--outline:focus {
    background: var(--sccat-button-bg) !important; color: var(--sccat-button-ink) !important;
}
a.sccat-button.sccat-button--link, a.sccat-button.sccat-button--link:visited, a.sccat-button.sccat-button--link:hover {
    border: 0 !important; padding: 0; min-height: 0; background: none !important;
    color: var(--sccat-button-bg) !important; text-decoration: underline !important; text-underline-offset: 3px;
}
.sccat-button:focus-visible { outline: 3px solid var(--sccat-accent); outline-offset: 3px; }
.sccat-loop { width: 100%; }
.sccat-button--link.sccat-loop { width: auto; }

.sccat-price-text { font-size: .95em; font-weight: 600; color: var(--shopcore-muted, #6b7280); }
.sccat-price-text a { color: inherit; }

/* Inquiry window */
.sccat-dialog {
    width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0;
    border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, .28); color: inherit; background: var(--cms-surface, #fff);
}
.sccat-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.sccat-dialog[open] { animation: sccat-in .18s ease-out; }
@keyframes sccat-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.sccat-close-form { position: sticky; top: 0; display: flex; justify-content: flex-end; margin: 0; height: 0; }
.sccat-close {
    margin: .6rem .6rem 0 0; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--shopcore-soft, #f1f5f9); color: inherit; font-size: 1.5rem; line-height: 1;
}
.sccat-close:focus-visible { outline: 3px solid var(--shopcore-accent, #2563eb); }

.sccat-form { padding: 1.6rem 1.6rem 1.4rem; display: grid; gap: .9rem; }
.sccat-inline-form .sccat-form { padding: 1.4rem; border: 1px solid var(--shopcore-line, #e5e7eb); border-radius: var(--shopcore-radius, 10px); background: var(--shopcore-soft, #f8fafc); }
.sccat-form-title { margin: 0; padding-right: 2.5rem; font-size: 1.3rem; line-height: 1.3; }
.sccat-form-intro { margin: -.4rem 0 0; color: var(--shopcore-muted, #6b7280); }
.sccat-form-product {
    margin: 0; padding: .7rem .9rem; border-radius: 10px; background: var(--shopcore-soft, #f8fafc);
    border: 1px solid var(--shopcore-line, #e5e7eb); display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline;
}
.sccat-form-product span, .sccat-form-product small { color: var(--shopcore-muted, #6b7280); }
.sccat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.sccat-field { margin: 0; display: grid; gap: .3rem; }
.sccat-field label { font-weight: 600; font-size: .92rem; }
.sccat-req { color: var(--shopcore-bad, #b91c1c); }
.sccat-field input, .sccat-field textarea {
    width: 100%; box-sizing: border-box; font: inherit; padding: .6rem .75rem; min-height: 44px;
    border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #111827;
}
.sccat-field textarea { resize: vertical; min-height: 104px; }
.sccat-field input:focus, .sccat-field textarea:focus { outline: 2px solid var(--shopcore-accent, #2563eb); outline-offset: 1px; border-color: transparent; }
.sccat-field--consent label { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; }
.sccat-field--consent input { width: auto; min-height: 0; margin-top: .2rem; }
.sccat-field.is-invalid input, .sccat-field.is-invalid textarea { border-color: var(--shopcore-bad, #b91c1c); }
.sccat-error { color: var(--shopcore-bad, #b91c1c); font-size: .85rem; }
.sccat-error:empty { display: none; }
.sccat-form-actions { margin: .2rem 0 0; }
.sccat-submit { width: 100%; }
.sccat-submit[disabled] { opacity: .7; cursor: progress; }
.sccat-form-message { padding: .75rem .9rem; border-radius: 10px; font-weight: 600; }
.sccat-form-message.is-ok { background: #ecfdf5; color: #065f46; }
.sccat-form-message.is-error { background: #fef2f2; color: #991b1b; }
.sccat-form.is-sent .sccat-field, .sccat-form.is-sent .sccat-grid, .sccat-form.is-sent .sccat-form-actions, .sccat-form.is-sent .sccat-form-intro { display: none; }
.sccat-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Closed cart */
.sccat-closed { text-align: center; padding: 2.5rem 1rem; border: 1px dashed var(--shopcore-line, #e5e7eb); border-radius: var(--shopcore-radius, 10px); }

/* Notice bar */
.sccat-notice {
    position: relative; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 1rem;
    padding: .7rem 3rem .7rem 1rem; text-align: center; font-size: .95rem; line-height: 1.4;
    background: var(--sccat-notice-bg, #111827); color: var(--sccat-notice-ink, #fff);
}
.sccat-notice--bottom { position: fixed; left: 0; right: 0; bottom: 0; }
.sccat-notice-close {
    position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0;
    border-radius: 50%; background: transparent; color: inherit; font-size: 1.35rem; cursor: pointer;
}
.sccat-notice-close:hover { background: rgba(255, 255, 255, .15); }
.sccat-notice-close:focus-visible { outline: 2px solid currentColor; }
html.sccat-has-bottom-notice body { padding-bottom: 3.2rem; }

@media (max-width: 560px) {
    .sccat-grid { grid-template-columns: 1fr; }
    .sccat-form { padding: 1.3rem 1.1rem 1.1rem; }
    .sccat-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto auto 0; border-radius: 16px 16px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .sccat-dialog[open] { animation: none; } .sccat-button { transition: none; } }
[dir="rtl"] .sccat-notice { padding: .7rem 1rem .7rem 3rem; }
[dir="rtl"] .sccat-notice-close { right: auto; left: .5rem; }
[dir="rtl"] .sccat-form-title { padding-right: 0; padding-left: 2.5rem; }
