/* =========================================================
   Kedai Emas Lelong - stylesheet utama
   Palet: emas pada netral hangat. Light + dark.
   Tiada animasi hiasan: gerakan hanya pada hover/pilihan.
   ========================================================= */

:root {
    --gold: #b8860b;
    --gold-strong: #8a6508;
    --gold-soft: #faf3e0;
    --ink: #1c1a17;
    --ink-soft: #4c473f;
    --muted: #635d54;
    --bg: #faf8f4;
    --surface: #ffffff;
    --surface-2: #f2eee6;
    --line: #ddd6c9;
    --wa: #12803d;
    --wa-strong: #0d5c2c;
    --danger: #a32114;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(28, 26, 23, 0.07);
    --shadow: 0 4px 12px rgba(28, 26, 23, 0.1);
    --shadow-lg: 0 12px 28px rgba(28, 26, 23, 0.16);
    --header-h: 68px;
    --container: 1180px;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

[data-theme="dark"] {
    --gold: #e6b422;
    --gold-strong: #f2ca52;
    --gold-soft: #2e2614;
    --ink: #f4efe5;
    --ink-soft: #d5cec0;
    --muted: #b0a898;
    --bg: #141210;
    --surface: #1c1a17;
    --surface-2: #26231e;
    --line: #3a3630;
    --wa: #22a559;
    --wa-strong: #35bd6a;
    --danger: #ef6a5c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 0.5rem;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }
a { color: inherit; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

button, input, select {
    font: inherit;
    color: inherit;
}

/* Setiap kawalan interaktif mesti tunjukkan cursor pointer */
a,
button,
select,
summary,
label[for],
[role="button"] {
    cursor: pointer;
}

:disabled,
[aria-disabled="true"] {
    cursor: not-allowed !important;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background: var(--gold);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}

.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ------------------------------------------------------------- Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    margin-right: auto;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--gold);
    color: #fff;
    flex: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
}

.brand-text small {
    font-size: 0.72rem;
    color: var(--muted);
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex: none;
}

.site-nav ul {
    display: flex;
    gap: 0.35rem;
}

.site-nav a {
    display: block;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--ink-soft);
}

.site-nav a:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.site-nav a[aria-current="page"] {
    color: var(--gold-strong);
    background: var(--gold-soft);
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
    border-color: var(--gold);
    color: var(--gold-strong);
}

.theme-toggle .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.cart-count:empty {
    display: none;
}

.cart-btn .cart-count {
    display: grid;
}
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    grid-template-rows: repeat(3, 2px);
    align-content: center;
    justify-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    padding: 0 10px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    margin: 0;
    border-radius: 2px;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------- Hero */

.hero {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
}

.hero-copy {
    min-width: 0;
}

.eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-strong);
    margin-bottom: 0.75rem;
}

.hero h1 {
    margin-bottom: 1rem;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--ink-soft);
    max-width: 46ch;
    margin-bottom: 1.75rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2.25rem;
    margin: 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.hero-stats dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.hero-stats dd {
    margin: 0.15rem 0 0;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold-strong);
}

.hero-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.75rem;
}

.showcase-tile {
    display: block;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
    text-decoration: none;
}

.showcase-tile:first-child {
    grid-row: span 2;
}

.showcase-tile img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.showcase-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 1.5rem 0.7rem 0.6rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
    color: #fff;
}

.showcase-name {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
}

.showcase-price {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f2ca52;
}

/* ------------------------------------------------------------ Sections */

.section {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section-alt {
    background: var(--surface-2);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.section-head h2 {
    margin: 0;
}

.section-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gold-strong);
    text-decoration: none;
    white-space: nowrap;
}

.section-link:hover {
    text-decoration: underline;
}

.page-head {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: clamp(1.75rem, 4vw, 2.75rem) 0;
}

.page-head h1 {
    margin: 0.35rem 0 0.5rem;
}

.page-sub {
    color: var(--ink-soft);
    margin: 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--gold-strong);
    text-decoration: underline;
}

.empty-state,
.empty-state-block {
    text-align: center;
    padding: 3rem 1.25rem;
    color: var(--muted);
}

.empty-state-block h2 {
    margin-bottom: 0.5rem;
}

.prose {
    max-width: 68ch;
}

.prose h2 {
    margin-top: 2rem;
}

.prose ul {
    list-style: disc;
    padding-left: 1.35rem;
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: 0.4rem;
}

.prose a {
    color: var(--gold-strong);
    font-weight: 600;
}

/* ------------------------------------------------------------ Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.7rem 1.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--gold-strong);
    border-color: var(--gold-strong);
}

.btn-wa {
    background: var(--wa);
    border-color: var(--wa);
    color: #fff;
}

.btn-wa:hover:not(:disabled) {
    background: var(--wa-strong);
    border-color: var(--wa-strong);
}

.btn-outline {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold-strong);
}

.btn-sm {
    min-height: 38px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.btn-lg {
    min-height: 52px;
    padding: 0.9rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* --------------------------------------------------------- Categories */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.category-grid a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    height: 100%;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.category-grid a:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-sm);
}

.category-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.category-count {
    font-size: 0.82rem;
    color: var(--muted);
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--ink-soft);
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.filter-chip:hover {
    border-color: var(--gold);
    color: var(--gold-strong);
}

.filter-chip.is-active {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.filter-count {
    font-size: 0.75rem;
    opacity: 0.75;
}

/* ----------------------------------------------------------- Products */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow);
}

.product-media {
    display: block;
    background: var(--surface-2);
}

.product-media img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem 1.1rem 1.2rem;
}

.product-cat {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.product-name {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    line-height: 1.35;
}

.product-name a {
    text-decoration: none;
}

.product-name a:hover {
    color: var(--gold-strong);
}

.product-price {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold-strong);
}

.product-stock {
    margin: 0 0 0.9rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.product-stock.is-out {
    color: var(--danger);
    font-weight: 600;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.product-actions .btn {
    flex: 1 1 auto;
}

/* Tombol tambah ke keranjang: hover dan state aktif jelas */
.js-add-cart {
    position: relative;
}

.js-add-cart:not(:disabled):hover {
    background: var(--gold-strong);
    border-color: var(--gold-strong);
}

.js-add-cart:disabled {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--muted);
}

/* ------------------------------------------------------------- Toolbar */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.search-form {
    display: flex;
    flex: 1 1 320px;
    max-width: 520px;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.search-form input::placeholder {
    color: var(--muted);
}

.sort-form select {
    min-height: 44px;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
}

/* ---------------------------------------------------------- Pagination */

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2.5rem;
}

.page-link {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink-soft);
}

.page-link:hover {
    border-color: var(--gold);
    color: var(--gold-strong);
}

.page-link.is-current {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

/* ------------------------------------------------------- Product detail */

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
    padding-top: 1.75rem;
}

.detail-gallery {
    min-width: 0;
}

.detail-main-image {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
}

.detail-main-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.detail-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.thumb-btn {
    width: 76px;
    height: 76px;
    padding: 0;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    cursor: pointer;
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-btn.is-active {
    border-color: var(--gold);
}

.detail-cat {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.detail-info h1 {
    margin-bottom: 0.75rem;
}

.detail-price {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.1rem);
    font-weight: 700;
    color: var(--gold-strong);
    margin-bottom: 0.5rem;
}

.detail-stock {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-bottom: 1.5rem;
}

.detail-stock.is-low {
    color: var(--gold-strong);
    border-color: var(--gold);
}

.detail-stock.is-out {
    color: var(--danger);
    border-color: var(--danger);
}

.detail-desc {
    margin-bottom: 1.5rem;
}

.detail-desc h2 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.detail-desc p {
    color: var(--ink-soft);
    margin: 0;
}

.detail-specs {
    margin: 0 0 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}

.detail-specs > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
}

.detail-specs > div:last-child {
    border-bottom: none;
}

.detail-specs dt {
    font-size: 0.88rem;
    color: var(--muted);
}

.detail-specs dd {
    margin: 0;
    font-weight: 600;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.detail-assurance {
    display: grid;
    gap: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.detail-assurance li {
    position: relative;
    padding-left: 1.6rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.detail-assurance li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 0.85rem;
    height: 0.5rem;
    border-left: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    transform: rotate(-45deg);
}

.related {
    margin-top: clamp(2.5rem, 5vw, 4rem);
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}

.related h2 {
    margin-bottom: 1.5rem;
}

/* Wrapper artikel detail produk */
article.product-detail {
    display: block;
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

/* --------------------------------------------------------------- Cart */

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 2rem;
    align-items: start;
}

.cart-main-col {
    min-width: 0;
}

/* Penunjuk dua langkah */
.cart-steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    list-style: none;
}

.cart-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
}

.cart-step-label {
    line-height: 1.35;
}

.cart-step + .cart-step::before {
    content: "";
    display: block;
    width: 28px;
    height: 2px;
    background: var(--line);
    margin-right: 0.35rem;
    border-radius: 2px;
}

.cart-step.is-active {
    color: var(--gold-strong);
}

.cart-step-num {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: none;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 0.78rem;
    font-weight: 700;
}

.cart-step.is-active .cart-step-num {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

/* Panel butiran penghantaran */
.cart-panel {
    padding: 1.35rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.cart-panel-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.cart-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.cart-content {
    min-width: 0;
}

.cart-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
}

.cart-empty h2 {
    margin-bottom: 0.5rem;
}

.cart-empty a {
    color: var(--gold-strong);
    font-weight: 600;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.cart-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: var(--surface-2);
}

.cart-table tbody tr:last-child td {
    border-bottom: none;
}

.cart-item-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 600;
}

.cart-item-link img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--surface-2);
    flex: none;
}

.cart-qty {
    width: 72px;
    min-height: 40px;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.cart-remove {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--danger);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.cart-remove:hover {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}

.cart-summary {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    position: sticky;
    top: calc(var(--header-h) + 1rem);
}

.cart-summary h2 {
    font-size: 1.28rem;
    margin-bottom: 0.9rem;
}

.summary-rows {
    margin: 0 0 1rem;
}

.summary-rows > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
}

.summary-rows dt {
    color: var(--muted);
    font-size: 0.9rem;
}

.summary-rows dd {
    margin: 0;
    font-weight: 600;
}

.summary-total {
    border-bottom: none;
    padding-top: 0.8rem;
    margin-top: 0.35rem;
    border-top: 2px solid var(--gold);
}

.summary-total dt {
    color: var(--ink);
    font-weight: 600;
    font-size: 1rem;
}

.summary-total dd {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2vw, 1.8rem);
    color: var(--gold-strong);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cart-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cart-summary-actions .btn {
    margin: 0;
}

.cart-continue-shopping {
    background: #727b84;
    border-color: #727b84;
    color: #fff;
}

.cart-continue-shopping:hover {
    background: #606a74;
    border-color: #606a74;
    color: #fff;
}

.cart-process-btn svg {
    flex: none;
}

.cart-summary-quiet-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 1.5rem;
}

.cart-text-action {
    border: 0;
    padding: 0.25rem 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cart-text-action:hover {
    color: var(--ink);
}

.cart-back-action {
    color: var(--ink-soft);
}

.cart-back-action:hover {
    color: var(--gold-strong);
}

.cart-clear-action {
    margin-left: auto;
    color: var(--danger);
}

.cart-clear-action:hover {
    color: var(--danger);
}

.confirm-dialog {
    width: min(420px, calc(100% - 2rem));
    max-width: none;
    border: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    color: var(--ink);
}

.confirm-dialog::backdrop {
    background: rgba(20, 18, 16, 0.6);
    backdrop-filter: blur(3px);
}

.confirm-dialog-card {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.confirm-dialog-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 0.85rem;
    border-radius: 50%;
    background: rgba(163, 33, 20, 0.1);
    color: var(--danger);
}

.confirm-dialog-card h2 {
    margin: 0 0 0.45rem;
    font-size: 1.2rem;
}

.confirm-dialog-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.confirm-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.confirm-dialog-actions .btn {
    min-height: 44px;
    margin: 0;
}

.cart-dialog-confirm {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}

.cart-dialog-confirm:hover {
    border-color: #8d1d13;
    background: #8d1d13;
    color: #fff;
}

/* ------------------------------------------------------- Borang pesanan */

.order-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}
.order-form-title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 0.35rem;
}

.field .req {
    color: var(--danger);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.95rem;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--muted);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: var(--danger);
}

.field-error {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    color: var(--danger);
}

/* ------------------------------------------------------------ Contact */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.contact-card {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.contact-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.contact-card p {
    color: var(--ink-soft);
}

.contact-card a:not(.btn) {
    color: var(--gold-strong);
    font-weight: 600;
}

.contact-steps {
    padding-left: 1.3rem;
    list-style: decimal;
    color: var(--ink-soft);
}

.contact-steps li {
    margin-bottom: 0.4rem;
}

/* ------------------------------------------------------------- Footer */

.site-footer {
    margin-top: clamp(2.5rem, 5vw, 4rem);
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding-top: clamp(2rem, 4vw, 3rem);
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.footer-col {
    min-width: 0;
}

.footer-about {
    min-width: 0;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--gold-strong);
    margin-bottom: 0.85rem;
}

.footer-note {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}

.footer-title {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 0.85rem;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.55rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.footer-links a {
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--gold-strong);
    text-decoration: underline;
}

.footer-contact li {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
}

.footer-contact svg {
    flex: none;
    margin-top: 0.25rem;
    color: var(--gold);
}

.footer-contact a {
    color: var(--gold-strong);
    font-weight: 600;
    text-decoration: none;
}

.site-footer-bottom {
    padding: 1.25rem;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
}

.site-footer-bottom p {
    margin: 0;
}

/* -------------------------------------------------- WhatsApp floating */

.wa-float {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 950;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--wa);
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.wa-float:hover {
    background: var(--wa-strong);
}

/* --------------------------------------------------------------- Toast */

.toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 1rem);
    z-index: 1200;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: calc(100vw - 2rem);
    text-align: center;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* -------------------------------------------------------- Responsive */

@media (max-width: 1024px) {
    .site-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

/* Tablet: grid produk dan footer lebih padat */
@media (max-width: 1024px) and (min-width: 769px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.15rem;
    }

    .site-footer-grid {
        gap: 1.5rem;
    }

    .detail-grid {
        gap: 2rem;
    }

    .cart-layout {
        gap: 1.5rem;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 860px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-showcase {
        max-width: 420px;
    }
}

/* --------------------------------------------------------------- Stars */

.stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: var(--gold);
    vertical-align: middle;
    line-height: 1;
}

.stars svg {
    display: block;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.rating-row .rating-value {
    font-weight: 700;
    color: var(--gold-strong);
}

.rating-row .rating-count {
    color: var(--muted);
}

.sold-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.sold-row strong {
    color: var(--ink-soft);
    font-weight: 600;
}

.sold-row .dot-sep {
    opacity: 0.5;
}

.sold-row .stock-out {
    color: var(--danger);
    font-weight: 600;
}

/* --------------------------------------------------------- Muat lebih banyak */

.load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.load-more-wrap .btn {
    min-width: 240px;
}

.load-more-status {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.load-more-wrap .btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ------------------------------------------------------------ Testimoni */

.testimonials {
    background: var(--surface-2);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.35rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.testimonial-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.testimonial-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}

.testimonial-who {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.testimonial-loc {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.testimonial-stars {
    margin: 0;
}

.testimonial-comment {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
    line-height: 1.55;
}

.testimonial-product {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: auto 0 0;
    padding-top: 0.65rem;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-strong);
}

.testimonial-product svg {
    flex: none;
}

/* ------------------------------------------- Sidebar mudah alih (mobile) */

@media (max-width: 768px) {
    .nav-toggle {
        display: grid;
        place-items: center;
        order: -1;
        z-index: 980;
        flex: none;
    }

    .site-header {
        z-index: 970;
    }

    .site-header-inner {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .brand {
        flex: 1;
        min-width: 0;
    }

    .brand-text small {
        display: none;
    }

    .brand-logo {
        width: 34px;
        height: 34px;
    }

    .site-nav {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(290px, 82vw);
        z-index: 975;
        display: block;
        background: var(--surface);
        border-right: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
        padding: calc(var(--header-h) + 0.75rem) 0.9rem 1.5rem;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        visibility: hidden;
    }

    .site-nav.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0.2rem;
    }

    .site-nav a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 0 0.9rem;
        font-size: 1rem;
        border-radius: var(--radius-sm);
    }

    .site-nav a[aria-current="page"] {
        border-left: 3px solid var(--gold);
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 960;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        border: 0;
        padding: 0;
        width: 100%;
    }

    .nav-backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }

    body {
        font-size: 15px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        flex: 1 1 auto;
    }

    .sort-form select {
        width: 100%;
    }

    /* Tabel keranjang bertukar kepada format kad pada skrin kecil */
    .cart-table thead {
        display: none;
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        border-bottom: 1px solid var(--line);
        padding: 0.5rem 0;
    }

    .cart-table tr:last-child {
        border-bottom: none;
    }

    .cart-table td {
        border-bottom: none;
        padding: 0.35rem 0.75rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--muted);
    }

    .cart-table td[data-label="Produk"] {
        padding-top: 0.75rem;
    }

    .cart-table td[data-label="Buang"] {
        padding-bottom: 0.75rem;
    }

    .detail-actions .btn {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.85rem;
    }

    .product-body {
        padding: 0.75rem 0.8rem 0.9rem;
    }

    .product-name {
        font-size: 0.92rem;
    }

    .product-price {
        font-size: 1rem;
    }

    .product-actions {
        flex-direction: column;
        gap: 0.4rem;
    }

    .product-actions .btn {
        width: 100%;
    }

    .hero-stats {
        gap: 1.25rem;
    }

    .hero-stats dd {
        font-size: 1.3rem;
    }

    .hero-actions .btn {
        flex: 1 1 auto;
    }

    .cart-summary {
        padding: 1.15rem;
    }

    .cart-summary-quiet-actions {
        align-items: flex-start;
    }

    .cart-clear-action {
        margin-left: 0;
    }

    .site-header-inner {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
        gap: 0.4rem;
    }

    .nav-toggle,
    .site-header-actions .icon-btn {
        width: 40px;
        height: 40px;
    }

    .brand {
        gap: 0.45rem;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
    }

    .brand-text strong {
        font-size: 0.91rem;
        white-space: nowrap;
        letter-spacing: -0.02em;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-text {
        min-width: 0;
        overflow: hidden;
    }

    .site-header-actions {
        gap: 0.25rem;
    }

    .detail-actions .btn {
        flex: 1 1 100%;
    }

    .showcase-name {
        font-size: 0.72rem;
    }

    .showcase-price {
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
