body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--text-main);
    outline-offset: 3px;
}

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 5%;
}

h1,
h2,
h3 {
    font-weight: 500;
    letter-spacing: -0.02em;
}

header {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-pill);
    padding: 0.75rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-main);
    border-radius: 50%;
    display: inline-block;
    margin: 0 1px;
}

/* Jarak antar link sedikit dirapatkan karena link sekarang punya padding sendiri */
.nav-links {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* Beri bentuk pil dan padding pada semua link */
.nav-links a {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    transition:
        background 0.3s ease,
        opacity 0.3s ease;
}

/* Efek hover: muncul lingkaran transparan tipis */
.nav-links a:hover {
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

/* Menu yang sedang aktif: muncul pil iOS (tanpa garis bawah) */
.nav-links a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent-text);
    opacity: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-actions svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

main {
    padding: 130px 0 100px;
    position: relative;
    overflow: hidden;
}

main::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    width: 900px;
    height: 600px;
    transform: translateX(-70%);
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.07),
        transparent 65%
    );
    pointer-events: none;
}

.breadcrumb {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.breadcrumb a:hover {
    color: var(--text-main);
    opacity: 1;
}

.breadcrumb [aria-current] {
    color: var(--text-main);
}

.detail {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.gallery {
    position: sticky;
    top: 20px;
}

.gallery-main {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    color: var(--ok);
}

.thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.thumb {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    opacity: 0.55;
    transition:
        opacity 0.3s,
        border-color 0.3s;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb:hover {
    opacity: 0.85;
}

.thumb[aria-pressed="true"] {
    opacity: 1;
    border-color: var(--border-hover);
}

.product-category {
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.info h1 {
    font-size: 3.25rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.info .lead {
    color: #cccccc;
    font-size: 1.1rem;
    max-width: 46ch;
    margin-bottom: 2rem;
}

.price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.price {
    font-size: 2.25rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--accent-text);
}

.price-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.option-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.option-label strong {
    color: var(--text-main);
    font-weight: 500;
}

.variants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.variant-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.variant-btn:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

.variant-btn[aria-pressed="true"] {
    background: var(--text-main);
    color: var(--bg-color);
    border-color: var(--text-main);
}

.variant-btn.habis {
    text-decoration: line-through;
    opacity: 0.6;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    color: var(--ok);
}

.stock-status::before,
.gallery-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.stock-status.sedikit,
.gallery-badge.sedikit {
    color: var(--warn);
}

.stock-status.habis,
.gallery-badge.habis {
    color: var(--bad);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--accent);
    color: var(--accent-ink);
    padding: 1rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 500;
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.03);
    opacity: 1;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 1rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 500;
    transition: background 0.3s;
}

.btn-outline:hover {
    background: var(--surface-color);
    opacity: 1;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cta-row > * {
    flex: 1 1 200px;
}

.share-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.share-link:hover {
    color: var(--text-main);
    opacity: 1;
}

.pickup-card {
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: grid;
    gap: 1.25rem;
}

.pickup-card h3 {
    font-size: 1rem;
}

.pickup-card h4 {
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 400;
}

.pickup-card p {
    font-size: 0.9rem;
}

.pickup-card .muted {
    color: var(--text-muted);
}

.specs-section {
    margin-top: 100px;
    padding-top: 80px;
    border-top: 1px solid var(--border-color);
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 4rem;
}

.specs-grid h2 {
    font-size: 2.5rem;
    line-height: 1.15;
    margin-bottom: 0.5rem;
}

.specs-grid > div > p {
    color: var(--text-muted);
    max-width: 40ch;
}

.specs-list {
    display: grid;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.spec-row:first-child {
    padding-top: 0;
}

.spec-row dt {
    color: var(--text-muted);
}

.spec-row dd {
    text-align: right;
}

.related {
    margin-top: 100px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2.5rem;
}

.link-arrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.link-arrow:hover {
    color: var(--text-main);
    opacity: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.product-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.product-card:hover {
    background: var(--surface-hover);
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 2;
    color: var(--ok);
}

.product-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.product-badge.sedikit {
    color: var(--warn);
}

.product-badge.habis {
    color: var(--bad);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1.25rem;
    background: var(--surface-color);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.related .product-category {
    font-size: 0.65rem;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.product-price {
    font-size: 1rem;
    color: var(--text-muted);
}

footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-bottom address {
    font-style: normal;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-links a:hover {
    color: var(--accent-text);
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

@media (max-width: 1024px) {
    .detail {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .gallery {
        position: static;
    }
    .info h1 {
        font-size: 2.75rem;
    }
    .specs-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-container {
        width: 90%;
    }
    main {
        padding-top: 110px;
    }
    .info h1 {
        font-size: 2.25rem;
    }
    .price {
        font-size: 1.85rem;
    }
    .specs-grid h2,
    .section-header h2 {
        font-size: 2rem;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
