/* ==============================================================================================================================
   [ SHOP / PUBLIC STOREFRONT ]
   Description: Own look of the public storefront (independent from the internal panel layout).
   ============================================================================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,300..500,0..1,0");

:root {
    --shop-bg: #f7f7f5;
    --shop-surface: #ffffff;
    --shop-text: #15171c;
    --shop-muted: #6b7079;
    --shop-line: #e7e7e3;
    --shop-accent: #2563eb;
    --shop-accent-soft: #e8efff;
    --shop-success: #16803c;
    --shop-danger: #b42318;
    --shop-radius: 18px;
    --shop-radius-sm: 12px;
    --shop-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
    --shop-shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.06), 0 18px 40px rgba(16, 24, 40, 0.12);
    --shop-max: 1200px;
}

* { box-sizing: border-box; }

/* Elements with layout display rules must still honor the hidden attribute */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body.public-runtime {
    margin: 0;
    background: var(--shop-bg);
    color: var(--shop-text);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

.material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-weight: normal;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    display: inline-block;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
}

.shop-container {
    width: 100%;
    max-width: var(--shop-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ------------------------------------------------------------------ [ HEADER ] */

.shop-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(247, 247, 245, 0.82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--shop-line);
}

.shop-header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 72px;
}

.shop-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--shop-text);
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.shop-brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--shop-text);
    color: #fff;
    font-size: 21px;
}

.shop-nav { display: flex; gap: 24px; flex: 1; }

.shop-nav a {
    color: var(--shop-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.shop-nav a:hover { color: var(--shop-text); }

.shop-header-actions { display: flex; gap: 8px; }

.shop-icon-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--shop-line);
    border-radius: 999px;
    background: var(--shop-surface);
    color: var(--shop-text);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.shop-icon-button:hover:not(:disabled) { background: var(--shop-accent-soft); }
.shop-icon-button:disabled { opacity: 0.55; cursor: default; }

/* ------------------------------------------------------------------ [ MAIN / FOOTER ] */

.shop-main { flex: 1; }

.shop-notice {
    margin: 20px 0 0;
    padding: 14px 18px;
    border: 1px solid rgba(180, 35, 24, 0.25);
    border-radius: var(--shop-radius-sm);
    background: #fdf1f0;
    color: var(--shop-danger);
    font-size: 14px;
    font-weight: 600;
}

.shop-footer {
    margin-top: 72px;
    border-top: 1px solid var(--shop-line);
    background: var(--shop-surface);
}

.shop-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 28px;
    padding-bottom: 28px;
    color: var(--shop-muted);
    font-size: 14px;
}

/* ------------------------------------------------------------------ [ HERO ] */

.shop-hero {
    padding: 64px 0 40px;
    background:
        radial-gradient(900px 300px at 15% 0%, rgba(37, 99, 235, 0.10), transparent 70%),
        radial-gradient(700px 260px at 90% 10%, rgba(16, 128, 60, 0.07), transparent 70%);
}

.shop-eyebrow {
    margin: 0 0 10px;
    color: var(--shop-accent);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.shop-hero-title {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.shop-hero-subtitle {
    margin: 14px 0 0;
    max-width: 520px;
    color: var(--shop-muted);
    font-size: 17px;
}

/* ------------------------------------------------------------------ [ CATALOG ] */

.shop-catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 20px;
    min-height: 24px;
}

.shop-catalog-count { color: var(--shop-muted); font-size: 14px; font-weight: 600; }

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px 24px;
}

.shop-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 0;
    border-radius: var(--shop-radius);
    background: var(--shop-surface);
    box-shadow: var(--shop-shadow);
    overflow: hidden;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shop-card:hover { transform: translateY(-4px); box-shadow: var(--shop-shadow-hover); }
.shop-card:focus-visible { outline: 3px solid var(--shop-accent); outline-offset: 3px; }

.shop-card-media {
    position: relative;
    aspect-ratio: 4 / 5;
    background: #f0f0ec;
    overflow: hidden;
}

.shop-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.shop-card:hover .shop-card-media img { transform: scale(1.05); }

.shop-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px 20px;
}

.shop-card-category {
    color: var(--shop-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.shop-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.shop-card-price {
    margin: 4px 0 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.shop-card-price-prefix { color: var(--shop-muted); font-size: 13px; font-weight: 600; }

.shop-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--shop-text);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.shop-badge-muted { background: rgba(21, 23, 28, 0.78); backdrop-filter: blur(6px); }

.shop-image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #b9b9b2;
}

.shop-image-placeholder .material-symbols-outlined { font-size: 56px; }

/* Skeleton */
.shop-card-skeleton {
    aspect-ratio: 4 / 6;
    cursor: default;
    background: linear-gradient(100deg, #ececE8 30%, #f6f6f3 50%, #ececE8 70%);
    background-size: 300% 100%;
    animation: shop-shimmer 1.4s ease-in-out infinite;
}

.shop-card-skeleton:hover { transform: none; box-shadow: var(--shop-shadow); }

@keyframes shop-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* States */
.shop-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 72px 24px;
    color: var(--shop-muted);
    text-align: center;
}

.shop-state-icon { font-size: 48px; color: #c4c4bd; }
.shop-state-text { margin: 0; max-width: 420px; }

/* ------------------------------------------------------------------ [ PRODUCT ] */

.shop-product { padding-top: 28px; }

.shop-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    padding: 8px 14px 8px 10px;
    border: 1px solid var(--shop-line);
    border-radius: 999px;
    background: var(--shop-surface);
    color: var(--shop-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.shop-back:hover { background: var(--shop-accent-soft); }
.shop-back .material-symbols-outlined { font-size: 19px; }

.shop-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.shop-gallery { display: flex; flex-direction: column; gap: 14px; }

.shop-gallery-main {
    aspect-ratio: 4 / 5;
    border-radius: var(--shop-radius);
    background: #f0f0ec;
    overflow: hidden;
    box-shadow: var(--shop-shadow);
}

.shop-gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.shop-gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }

.shop-thumb {
    width: 74px;
    height: 92px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--shop-radius-sm);
    background: #f0f0ec;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.shop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-thumb.is-selected { border-color: var(--shop-text); }

.shop-product-info { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 14px; }

.shop-product-title {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.shop-product-price {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.shop-variants { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }

.shop-variant-label { margin: 0 0 10px; color: var(--shop-muted); font-size: 14px; }
.shop-variant-label strong { color: var(--shop-text); }

.shop-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.shop-chip {
    min-width: 52px;
    padding: 10px 16px;
    border: 1.5px solid var(--shop-line);
    border-radius: 999px;
    background: var(--shop-surface);
    color: var(--shop-text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.shop-chip:hover:not(:disabled) { border-color: var(--shop-text); }
.shop-chip.is-selected { border-color: var(--shop-text); background: var(--shop-text); color: #fff; }
.shop-chip.is-unavailable:not(.is-selected) { color: var(--shop-muted); text-decoration: line-through; }
.shop-chip:disabled { opacity: 0.35; cursor: not-allowed; }

.shop-availability { margin: 6px 0 0; font-size: 14px; font-weight: 700; }
.shop-availability.is-in { color: var(--shop-success); }
.shop-availability.is-out { color: var(--shop-danger); }

.shop-buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
    padding: 17px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--shop-text);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.shop-buy-button:hover:not(:disabled) { transform: translateY(-1px); }
.shop-buy-button:disabled { opacity: 0.45; cursor: not-allowed; }

.shop-buy-note { margin: 0; color: var(--shop-muted); font-size: 13px; text-align: center; min-height: 18px; }

.shop-product-description {
    margin-top: 18px;
    padding-top: 22px;
    border-top: 1px solid var(--shop-line);
}

.shop-product-description h2 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.shop-product-description p { margin: 0; color: var(--shop-muted); white-space: pre-line; }

/* ------------------------------------------------------------------ [ ACCOUNT ] */

.shop-account { padding-top: 40px; padding-bottom: 64px; }

.shop-account-guest {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.shop-account-panel {
    background: var(--shop-surface);
    border: 1px solid var(--shop-line);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 32px;
}

.shop-account-customer { max-width: 560px; }

.shop-account-title { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.shop-account-subtitle { margin: 0 0 24px; color: var(--shop-muted); }

.shop-form { display: flex; flex-direction: column; gap: 16px; }

.shop-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }

.shop-field input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--shop-line);
    border-radius: var(--shop-radius-sm);
    background: var(--shop-bg);
    color: var(--shop-text);
    font: inherit;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s;
}

.shop-field input:focus { outline: none; border-color: var(--shop-accent); background: var(--shop-surface); }

.shop-input-shell { position: relative; display: block; }
.shop-input-shell input { padding-right: 48px; }

.shop-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--shop-muted);
    cursor: pointer;
}

.shop-password-toggle:hover { background: var(--shop-line); color: var(--shop-text); }

.shop-form-message { margin: 0; min-height: 20px; font-size: 14px; font-weight: 600; }
.shop-form-message.is-error { color: var(--shop-danger); }
.shop-form-message.is-success { color: var(--shop-success); }

.shop-primary-button,
.shop-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 24px;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.shop-primary-button { border: 0; background: var(--shop-text); color: #fff; }
.shop-secondary-button { border: 1px solid var(--shop-line); background: var(--shop-surface); color: var(--shop-text); }

.shop-primary-button:hover:not(:disabled),
.shop-secondary-button:hover:not(:disabled) { transform: translateY(-1px); }

.shop-primary-button:disabled,
.shop-secondary-button:disabled { opacity: 0.45; cursor: not-allowed; }

.shop-link-button {
    align-self: center;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: var(--shop-accent);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

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

.shop-account-reset { max-width: 560px; }

/* ------------------------------------------------------------------ [ CART ] */

.shop-cart-button { position: relative; }

.shop-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--shop-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
}

.shop-cart { padding-top: 40px; padding-bottom: 64px; }
.shop-cart > .shop-account-title { margin-bottom: 24px; }

.shop-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.shop-cart-lines { display: flex; flex-direction: column; gap: 12px; }
.shop-cart-lines .shop-form-message:empty { display: none; }
.shop-cart-lines #shop-cart-items { display: flex; flex-direction: column; gap: 12px; }

.shop-cart-line {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    background: var(--shop-surface);
    border: 1px solid var(--shop-line);
    border-radius: var(--shop-radius);
}

.shop-cart-line.is-unavailable { border-color: rgba(180, 35, 24, 0.35); }

.shop-cart-line-media {
    width: 96px;
    height: 96px;
    overflow: hidden;
    border-radius: var(--shop-radius-sm);
    background: var(--shop-bg);
}

.shop-cart-line-media img { width: 100%; height: 100%; object-fit: cover; }
.shop-cart-line-media .shop-image-placeholder .material-symbols-outlined { font-size: 32px; }

.shop-cart-line-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.shop-cart-line-variant,
.shop-cart-line-price { margin: 0; color: var(--shop-muted); font-size: 14px; }
.shop-cart-line-message { margin: 6px 0 0; color: var(--shop-danger); font-size: 13px; font-weight: 700; }

.shop-cart-line-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.shop-cart-line-subtotal { margin: 0; font-size: 17px; font-weight: 800; }

.shop-quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--shop-line);
    border-radius: 999px;
    background: var(--shop-bg);
}

.shop-quantity-button {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--shop-text);
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.shop-quantity-button:disabled { opacity: 0.35; cursor: not-allowed; }
.shop-quantity-value { min-width: 28px; text-align: center; font-weight: 700; }

.shop-cart-summary { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 14px; }
.shop-cart-summary-title { margin: 0; font-size: 20px; font-weight: 800; }

.shop-cart-summary-rows {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 0;
    margin: 0;
}

.shop-cart-summary-rows dt { color: var(--shop-muted); font-size: 14px; }
.shop-cart-summary-rows dd { margin: 0; padding-left: 16px; text-align: right; font-weight: 600; font-size: 14px; }
.shop-cart-summary-rows .shop-cart-summary-total {
    padding-top: 10px;
    border-top: 1px solid var(--shop-line);
    color: var(--shop-text);
    font-size: 18px;
    font-weight: 800;
}

.shop-account-data {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 10px 24px;
    margin: 8px 0 20px;
}

.shop-account-data dt { color: var(--shop-muted); font-size: 14px; font-weight: 600; }
.shop-account-data dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ------------------------------------------------------------------ [ RESPONSIVE ] */

@media (max-width: 900px) {
    .shop-product-layout { grid-template-columns: 1fr; gap: 28px; }
    .shop-product-info { position: static; }
    .shop-account-guest { grid-template-columns: 1fr; }
    .shop-cart-layout { grid-template-columns: 1fr; }
    .shop-cart-summary { position: static; }
}

@media (max-width: 600px) {
    .shop-container { padding: 0 16px; }
    .shop-header-inner { height: 64px; gap: 16px; }
    .shop-nav { display: none; }
    .shop-brand-name { font-size: 18px; }
    .shop-header-actions { margin-left: auto; }
    .shop-hero { padding: 40px 0 24px; }
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
    .shop-card-body { padding: 12px 12px 16px; }
    .shop-card-title { font-size: 14px; }
    .shop-card-price { font-size: 16px; }
    .shop-cart-line { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
    .shop-cart-line-media { width: 72px; height: 72px; }
    .shop-cart-line-controls { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
    .shop-badge { top: 10px; left: 10px; padding: 4px 9px; font-size: 11px; }
}
