:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #111111;
    --radius: 16px
}

* {
    box-sizing: border-box
}

html,
body,
#root {
    margin: 0;
    min-height: 100%;
    font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg)
}

img {
    max-width: 100%;
    display: block
}

.sp-root {
    min-height: 100vh
}

.sp-shell {
    width: min(1200px, calc(100% - 32px));
    margin-inline: auto
}

.sp-header {
    position: sticky;
    top: 0;
    z-index: 30;
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    backdrop-filter: saturate(180%) blur(8px);
    background: #ffffffe6;
    border-bottom: 1px solid var(--line)
}

.sp-header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.sp-brand-wrap {
    display: flex;
    align-items: center;
    gap: 10px
}

.sp-logo {
    height: 30px;
    width: auto;
    object-fit: contain
}

.sp-brand-fallback {
    font-weight: 800;
    letter-spacing: .4px
}

.sp-brand {
    font-weight: 800;
    text-decoration: none;
    color: var(--text)
}

.sp-main {
    padding: 26px 0 40px
}

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

.sp-gallery-col {
    min-width: 0
}

.sp-media-frame {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden
}

.sp-main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center
}

.sp-empty-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: #f9fafb
}

.sp-thumbs-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px
}

.sp-thumb-btn {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    background: #fff;
    cursor: pointer
}

.sp-thumb-btn.active {
    border-color: #111
}

.sp-thumb-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover
}

.sp-info-col {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px
}

.sp-stock {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600
}

.sp-stock.in {
    color: #0a7a35
}

.sp-stock.out {
    color: #0a7a35
}

.sp-title {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.12;
    letter-spacing: -.02em;
    word-break: break-word
}

.sp-price {
    margin: 12px 0 0;
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 700
}

.sp-description {
    margin: 14px 0 0;
    color: #1f2937;
    line-height: 1.75;
    white-space: pre-wrap
}

.sp-meta-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px
}

.sp-meta-grid>div {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff
}

.sp-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px
}

.sp-meta-grid strong {
    font-size: 14px
}

.sp-buy-box {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line)
}

.sp-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px
}

.sp-select {
    width: 140px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 14px
}

.sp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px
}

.sp-btn {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 11px 14px;
    background: #fff;
    color: #111;
    text-decoration: none;
    font-weight: 600;
    text-align: center
}

.sp-btn:hover {
    border-color: #9ca3af
}

.sp-btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff
}

.sp-btn-wide {
    flex: 1 1 220px
}

.is-disabled {
    pointer-events: none;
    opacity: .55
}

.sp-skeleton-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px
}

.sp-sk-image,
.sp-sk-line {
    background: linear-gradient(90deg, #f2f3f5 25%, #ebedf0 37%, #f2f3f5 63%);
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite linear;
    border-radius: 12px
}

.sp-sk-image {
    height: 360px;
    margin-bottom: 14px
}

.sp-sk-line {
    height: 16px;
    margin-bottom: 8px
}

.sp-sk-line.lg {
    width: 64%
}

.sp-sk-line.md {
    width: 86%
}

.sp-sk-line.sm {
    width: 48%
}

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

    to {
        background-position: 0 0
    }
}

.sp-notfound {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px
}

.sp-notfound h1 {
    margin: 0 0 8px
}

.sp-notfound p {
    margin: 0;
    color: var(--muted)
}

@media (max-width:1024px) {
    .sp-product-grid {
        grid-template-columns: 1fr
    }

    .sp-thumbs-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr))
    }
}

@media (max-width:640px) {
    .sp-shell {
        width: calc(100% - 20px)
    }

    .sp-main {
        padding-top: 14px
    }

    .sp-info-col {
        padding: 16px
    }

    .sp-thumbs-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }
}