:root {
    --accent: #fe2c55;
    --accent-dark: #d71943;
    --ink: #161823;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f7f7f8;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(22, 24, 35, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--white);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }

.site-shell { min-height: 100vh; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(220px, 540px) auto;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 190px;
}
.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #111;
}
.brand-fallback {
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: #111;
    box-shadow: -4px 0 0 #25f4ee, 4px 0 0 #fe2c55;
}
.brand-copy strong { display: block; font-size: 16px; }
.brand-copy span { color: var(--muted); font-size: 12px; }
.search-form {
    display: flex;
    background: var(--soft);
    border: 1px solid transparent;
    border-radius: 999px;
    overflow: hidden;
}
.search-form:focus-within { border-color: #cfd3da; background: #fff; }
.search-form input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 13px 18px;
    min-width: 0;
}
.search-form button {
    border: 0;
    border-left: 1px solid var(--line);
    background: transparent;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 700;
}
.top-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 14px;
    font-weight: 700;
    white-space: nowrap;
}

.profile-strip {
    background: linear-gradient(180deg, #fff, #fff7f9);
    border-bottom: 1px solid #f1dce2;
}
.profile-inner {
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 18px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.profile-avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    object-fit: cover;
    background: #111;
    border: 3px solid #fff;
    box-shadow: var(--shadow);
}
.profile-copy { flex: 1; }
.profile-copy h1 { margin: 0 0 4px; font-size: clamp(22px, 3vw, 34px); }
.profile-copy p { margin: 0; color: var(--muted); }
.bio-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}
.bio-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
    transition: .2s ease;
}
.bio-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.page-wrap {
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto;
    padding: 26px 0 56px;
}
.category-section { margin-bottom: 26px; }
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 16px;
}
.section-heading h2 { margin: 0; font-size: 23px; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.category-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(106px, 1fr);
    overflow-x: auto;
    gap: 14px;
    padding: 4px 2px 12px;
    scrollbar-width: thin;
}
.category-card {
    text-align: center;
    border-radius: 16px;
    padding: 12px 8px;
    border: 1px solid transparent;
    transition: .2s ease;
}
.category-card:hover, .category-card.active {
    border-color: #ffd1dc;
    background: #fff6f8;
    color: var(--accent-dark);
}
.category-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 9px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--soft);
    font-size: 31px;
}
.category-card span:last-child { display: block; font-size: 13px; font-weight: 750; line-height: 1.25; }

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.catalog-toolbar h2 { margin: 0; font-size: 25px; }
.result-meta { color: var(--muted); font-size: 13px; }
.sort-select {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 10px 34px 10px 12px;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px 16px;
}
.product-card { min-width: 0; position: relative; }
.product-image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    background: var(--soft);
}
.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.product-card:hover .product-image { transform: scale(1.035); }
.product-badge, .shipping-badge {
    position: absolute;
    left: 8px;
    border-radius: 5px;
    color: #fff;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    padding: 6px 7px;
    box-shadow: 0 3px 8px rgba(0,0,0,.12);
}
.product-badge { top: 8px; background: var(--accent); }
.shipping-badge { bottom: 8px; background: #00a8a8; }
.share-card-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.94);
    box-shadow: 0 5px 14px rgba(0,0,0,.12);
    cursor: pointer;
}
.product-info { padding: 10px 2px 0; }
.product-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}
.seller-name { color: var(--muted); font-size: 12px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    color: #f59e0b;
    font-size: 12px;
}
.rating-row .sold { color: var(--muted); }
.price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;
    margin-top: 6px;
}
.current-price { color: var(--accent); font-size: 18px; font-weight: 900; }
.old-price { color: #9ca3af; font-size: 11px; text-decoration: line-through; }
.discount-text { color: var(--accent); font-size: 11px; font-weight: 800; }
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 20px;
    border: 1px dashed #d5d8dd;
    border-radius: 18px;
    background: var(--soft);
}
.empty-state .emoji { font-size: 52px; }
.empty-state h3 { margin: 14px 0 6px; }
.empty-state p { color: var(--muted); margin: 0; }
.pagination { display: flex; justify-content: center; gap: 7px; margin-top: 34px; }
.pagination a, .pagination span {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    border: 1px solid var(--line);
    font-weight: 700;
}
.pagination .active { background: var(--accent); border-color: var(--accent); color: #fff; }

.disclosure {
    margin-top: 38px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #fff8e7;
    border: 1px solid #f5df9d;
    color: #705b19;
    font-size: 13px;
    line-height: 1.5;
}
.site-footer {
    border-top: 1px solid var(--line);
    background: #fafafa;
    padding: 28px 0;
    color: var(--muted);
    font-size: 13px;
}
.footer-inner {
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

/* Product detail */
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.product-detail {
    display: grid;
    grid-template-columns: minmax(320px, 520px) 1fr;
    gap: 42px;
    align-items: start;
}
.detail-image-box { position: sticky; top: 94px; }
.detail-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    background: var(--soft);
}
.detail-copy h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 40px); line-height: 1.15; }
.detail-seller { color: var(--muted); margin-bottom: 10px; }
.detail-rating { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.detail-rating strong { color: #f59e0b; }
.detail-price-box {
    margin: 20px 0;
    padding: 18px;
    background: #fff5f7;
    border-radius: 14px;
}
.detail-price { color: var(--accent); font-weight: 950; font-size: 34px; }
.detail-old-price { margin-left: 8px; color: #9ca3af; text-decoration: line-through; }
.detail-discount { margin-left: 8px; color: var(--accent); font-weight: 800; }
.detail-description { color: #4b5563; line-height: 1.75; }
.buy-btn {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
    font-size: 17px;
    box-shadow: 0 10px 20px rgba(254,44,85,.2);
}
.buy-btn:hover { background: var(--accent-dark); }
.checkout-note { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.share-panel { margin-top: 22px; }
.share-panel h3 { margin: 0 0 10px; font-size: 15px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.share-action {
    border: 1px solid var(--line);
    background: #fff;
    min-height: 40px;
    border-radius: 9px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-weight: 750;
    font-size: 13px;
}
.related-section { margin-top: 55px; }
.related-section h2 { margin-bottom: 18px; }
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: #111;
    color: #fff;
    padding: 11px 16px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
    z-index: 100;
    font-size: 13px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.mobile-search { display: none; }

@media (max-width: 1050px) {
    .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .topbar-inner { grid-template-columns: 1fr auto; min-height: 64px; gap: 12px; }
    .topbar .search-form { display: none; }
    .brand { min-width: 0; }
    .brand-copy span { display: none; }
    .mobile-search { display: flex; margin: 14px 0 20px; }
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .detail-image-box { position: static; }
}

@media (max-width: 620px) {
    .topbar-inner, .profile-inner, .page-wrap, .footer-inner { width: min(100% - 22px, 1240px); }
    .brand-logo { width: 39px; height: 39px; }
    .brand-copy strong { font-size: 14px; }
    .top-action { min-height: 38px; padding: 0 11px; font-size: 13px; }
    .profile-inner { align-items: flex-start; padding-top: 17px; }
    .profile-avatar { width: 60px; height: 60px; }
    .profile-copy h1 { font-size: 21px; }
    .profile-copy p { font-size: 13px; }
    .bio-links { margin-left: -78px; margin-top: 17px; padding-top: 2px; }
    .bio-link { font-size: 12px; min-height: 34px; }
    .page-wrap { padding-top: 19px; }
    .section-heading h2, .catalog-toolbar h2 { font-size: 20px; }
    .category-row { grid-auto-columns: 88px; gap: 9px; }
    .category-icon { width: 58px; height: 58px; font-size: 26px; }
    .category-card span:last-child { font-size: 11px; }
    .catalog-toolbar { align-items: flex-start; }
    .sort-select { padding: 8px 26px 8px 9px; font-size: 12px; max-width: 132px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
    .product-image-wrap { border-radius: 9px; }
    .product-title { font-size: 13px; min-height: 35px; }
    .current-price { font-size: 16px; }
    .old-price, .discount-text { font-size: 10px; }
    .shipping-badge { font-size: 9px; }
    .share-card-btn { width: 31px; height: 31px; }
    .detail-copy h1 { font-size: 25px; }
    .detail-price { font-size: 29px; }
    .related-section .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v1.0.3 — Promosi Live IoT */
.iot-live-promo {
    margin: 4px 0 30px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
    gap: 24px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #17344a;
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 10%, rgba(37,244,238,.14), transparent 34%),
        radial-gradient(circle at 92% 80%, rgba(255,199,0,.14), transparent 30%),
        linear-gradient(135deg, #07111d 0%, #0b1726 55%, #07111d 100%);
    color: #fff;
    box-shadow: 0 22px 52px rgba(4,16,29,.18);
}
.iot-live-copy { padding: clamp(24px, 4vw, 46px); align-self: center; }
.iot-live-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(254,44,85,.14);
    border: 1px solid rgba(254,44,85,.55);
    color: #ff9aaf;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .07em;
}
.live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fe2c55;
    box-shadow: 0 0 0 0 rgba(254,44,85,.65);
    animation: livePulse 1.7s infinite;
}
@keyframes livePulse { 70% { box-shadow: 0 0 0 9px rgba(254,44,85,0); } 100% { box-shadow: 0 0 0 0 rgba(254,44,85,0); } }
.iot-live-copy h2 { margin: 16px 0 10px; font-size: clamp(27px, 4vw, 45px); line-height: 1.08; letter-spacing: -.03em; }
.iot-live-copy p { margin: 0; max-width: 680px; color: #c9d5df; line-height: 1.65; font-size: 15px; }
.iot-live-schedule { margin-top: 18px; color: #ffe16c; font-weight: 800; font-size: 14px; }
.iot-live-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.iot-live-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border-radius: 11px;
    font-weight: 850;
    font-size: 14px;
    transition: .2s ease;
}
.iot-live-btn:hover { transform: translateY(-2px); }
.iot-live-btn.primary { color: #fff; background: #fe2c55; box-shadow: 0 9px 20px rgba(254,44,85,.24); }
.iot-live-btn.secondary { color: #07111d; background: #ffd43b; }
.iot-live-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.11); color: #93a7b8; font-size: 12px; line-height: 1.55; }
.iot-live-poster { display: block; min-height: 500px; background: #030a10; overflow: hidden; }
.iot-live-poster img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .35s ease; }
.iot-live-poster:hover img { transform: scale(1.018); }
.iot-category-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: #101c2b;
    color: #ffd43b;
    border: 1px solid #27455f;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}
.category-card { position: relative; }
.category-card.iot-special {
    border-color: #ffd43b;
    background: linear-gradient(180deg, #fff9d6, #fffdf4);
    color: #4d3c00;
}
.category-card.iot-special .category-icon { background: #101c2b; color: #ffd43b; box-shadow: 0 8px 18px rgba(16,28,43,.14); }
.category-card.iot-special.active { box-shadow: 0 0 0 3px rgba(255,212,59,.25); }
.category-khas-label {
    position: absolute;
    top: 4px;
    right: 5px;
    display: inline-flex !important;
    align-items: center;
    min-height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fe2c55;
    color: #fff;
    font-size: 8px !important;
    font-weight: 950 !important;
    letter-spacing: .08em;
}

@media (max-width: 900px) {
    .iot-live-promo { grid-template-columns: 1fr 330px; }
    .iot-live-poster { min-height: 450px; }
}
@media (max-width: 720px) {
    .iot-live-promo { grid-template-columns: 1fr; gap: 0; }
    .iot-live-poster { min-height: 0; max-height: none; order: -1; }
    .iot-live-poster img { aspect-ratio: 2 / 2.35; object-fit: cover; object-position: center top; }
    .iot-live-copy { padding: 24px 20px 26px; }
    .iot-live-copy h2 { font-size: 28px; }
    .iot-live-actions { display: grid; grid-template-columns: 1fr; }
    .iot-live-btn { width: 100%; }
    .section-heading { align-items: flex-start; }
    .iot-category-shortcut { font-size: 11px; min-height: 36px; padding: 0 11px; }
}
@media (max-width: 480px) {
    .iot-live-promo { border-radius: 16px; margin-bottom: 23px; }
    .iot-live-poster img { aspect-ratio: 4 / 5.25; }
    .iot-live-copy p { font-size: 14px; }
    .section-heading { display: grid; grid-template-columns: 1fr; }
    .iot-category-shortcut { width: fit-content; }
}
