/* ==========================================================================
RESET & CONFIGURATION
========================================================================== */
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html {
scroll-behavior: smooth;
scroll-padding-top: 70px;
}

:root {
--primary: #d97706;
--primary-hover: #b45309;
--primary-light: #fef3c7;
--accent: #dc2626;
--dark: #1e293b;
--dark-muted: #475569;
--light-bg: #fffbeb;
--border-color: #fde68a;
--white: #ffffff;
--font-main: 'Plus Jakarta Sans', sans-serif;
--radius-sm: 8px;
--radius-md: 14px;
--radius-lg: 20px;
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
font-family: var(--font-main);
color: var(--dark-muted);
background-color: #fafaf9;
line-height: 1.6;
overflow-x: hidden;
}

.container {
width: 92%;
max-width: 1200px;
margin: 0 auto;
}

/* ==========================================================================
TOP BAR & NAVIGATION
========================================================================== */
.top-bar {
background: var(--dark);
color: #fef08a;
font-size: 0.78rem;
padding: 0.5rem 0;
}

.top-bar-content {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
flex-wrap: wrap;
text-align: center;
}

.top-bar-content p {
flex: 1;
min-width: 200px;
}

.top-bar-links a {
color: var(--white);
text-decoration: none;
font-weight: 600;
white-space: nowrap;
background: rgba(255, 255, 255, 0.12);
padding: 0.2rem 0.6rem;
border-radius: 20px;
transition: var(--transition);
font-size: 0.75rem;
}

.top-bar-links a:hover {
background: #25d366;
color: var(--white);
}

.navbar-section {
background: var(--white);
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.navbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem 0;
flex-wrap: wrap;
gap: 10px;
}

.logo {
display: flex;
align-items: center;
gap: 8px;
text-decoration: none;
}

.logo-icon {
background: var(--primary);
color: var(--white);
width: 36px;
height: 36px;
border-radius: var(--radius-sm);
display: flex;
align-items: center;
justify-content: center;
font-size: 1.1rem;
flex-shrink: 0;
transition: var(--transition);
}

.logo:hover .logo-icon {
transform: rotate(15deg) scale(1.1);
background: var(--accent);
}

.logo-text {
font-size: 1.2rem;
font-weight: 800;
color: var(--dark);
}

.logo-text span { color: var(--primary); }
.logo-text.light { color: var(--white); }

.nav-menu ul {
display: flex;
list-style: none;
gap: 1rem;
flex-wrap: wrap;
justify-content: center;
}

.nav-menu a {
text-decoration: none;
color: var(--dark-muted);
font-weight: 600;
position: relative;
padding: 0.2rem 0;
white-space: nowrap;
transition: var(--transition);
font-size: 0.88rem;
}

.nav-menu a::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background: var(--primary);
border-radius: 2px;
transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
width: 100%;
}

.nav-menu a:hover, .nav-menu a.active {
color: var(--primary);
}

/* Admin Login Nav Link Styling */
.admin-login-link {
background: var(--primary-light);
color: var(--primary) !important;
padding: 0.3rem 0.8rem !important;
border-radius: 20px;
}
.admin-login-link:hover {
background: var(--primary) !important;
color: var(--white) !important;
}

/* Admin Stock Edit Controls */
.stock-edit-wrap {
display: flex;
align-items: center;
gap: 6px;
}
.stock-input {
width: 70px;
padding: 4px 6px;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
font-size: 0.85rem;
font-weight: 700;
text-align: center;
}
.btn-save-stock {
background: #10b981;
color: var(--white);
border: none;
padding: 4px 8px;
border-radius: var(--radius-sm);
cursor: pointer;
font-size: 0.75rem;
transition: var(--transition);
}
.btn-save-stock:hover {
background: #059669;
}

/* ==========================================================================
CART FLOATING BUTTON & DRAWER
========================================================================== */
.cart-float-btn {
position: fixed;
bottom: 30px;
right: 30px;
background: var(--primary);
color: var(--white);
width: 60px;
height: 60px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.4rem;
box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
cursor: pointer;
z-index: 1001;
transition: var(--transition);
border: none;
}

.cart-float-btn:hover {
background: var(--primary-hover);
transform: scale(1.1);
}

.cart-counter {
position: absolute;
top: -5px;
right: -5px;
background: var(--accent);
color: var(--white);
font-size: 0.75rem;
font-weight: 800;
width: 24px;
height: 24px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
border: 2px solid var(--white);
}

.cart-drawer-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(3px);
z-index: 2000;
opacity: 0;
visibility: hidden;
transition: var(--transition);
}

.cart-drawer-overlay.active {
opacity: 1;
visibility: visible;
}

.cart-drawer {
position: fixed;
top: 0;
right: -420px;
width: 100%;
max-width: 400px;
height: 100%;
background: var(--white);
z-index: 2001;
box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
display: flex;
flex-direction: column;
transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.active {
right: 0;
}

.cart-drawer-header {
padding: 1.2rem 1.5rem;
background: var(--dark);
color: var(--white);
display: flex;
justify-content: space-between;
align-items: center;
}

.cart-drawer-header h3 {
font-size: 1.1rem;
display: flex;
align-items: center;
gap: 8px;
}

.close-cart-btn {
background: transparent;
border: none;
color: var(--white);
font-size: 1.2rem;
cursor: pointer;
transition: var(--transition);
}

.close-cart-btn:hover {
color: var(--primary);
}

.cart-action-top {
padding: 0.8rem 1.2rem;
background: var(--primary-light);
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--border-color);
}

.cart-action-top span {
font-size: 0.82rem;
font-weight: 700;
color: var(--primary-hover);
}

.btn-add-more {
background: var(--primary);
color: var(--white);
border: none;
padding: 0.35rem 0.8rem;
border-radius: var(--radius-sm);
font-size: 0.78rem;
font-weight: 700;
cursor: pointer;
text-decoration: none;
transition: var(--transition);
display: inline-flex;
align-items: center;
gap: 4px;
}

.btn-add-more:hover {
background: var(--primary-hover);
}

.cart-drawer-body {
padding: 1.2rem 1.5rem;
overflow-y: auto;
flex-grow: 1;
display: flex;
flex-direction: column;
gap: 1rem;
}

.cart-empty-state {
text-align: center;
padding: 3rem 1rem;
color: #94a3b8;
}

.cart-empty-state i {
font-size: 3rem;
margin-bottom: 0.8rem;
color: #cbd5e1;
}

.cart-item {
display: flex;
align-items: center;
gap: 12px;
padding-bottom: 1rem;
border-bottom: 1px solid #f1f5f9;
}

.cart-item-img {
width: 55px;
height: 55px;
border-radius: var(--radius-sm);
object-fit: cover;
background: #e2e8f0;
flex-shrink: 0;
}

.cart-item-info {
flex-grow: 1;
}

.cart-item-title {
font-size: 0.9rem;
font-weight: 700;
color: var(--dark);
margin-bottom: 2px;
}

.cart-item-price {
font-size: 0.82rem;
font-weight: 800;
color: var(--primary);
}

.cart-item-controls {
display: flex;
align-items: center;
gap: 8px;
margin-top: 6px;
}

.qty-btn {
width: 24px;
height: 24px;
background: #f1f5f9;
border: none;
border-radius: 4px;
font-weight: 700;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: var(--transition);
}

.qty-btn:hover {
background: var(--primary);
color: var(--white);
}

.cart-item-qty {
font-size: 0.85rem;
font-weight: 700;
color: var(--dark);
min-width: 20px;
text-align: center;
}

.cart-item-remove {
background: transparent;
border: none;
color: #cbd5e1;
cursor: pointer;
font-size: 0.95rem;
transition: var(--transition);
padding: 4px;
}

.cart-item-remove:hover {
color: var(--accent);
}

.cart-drawer-footer {
padding: 1.2rem 1.5rem;
background: #f8fafc;
border-top: 1px solid #e2e8f0;
}

.cart-total-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
font-size: 1rem;
}

.cart-total-row strong {
color: var(--dark);
}

.cart-total-price {
font-size: 1.2rem;
font-weight: 800;
color: var(--primary);
}

.btn-checkout {
width: 100%;
background: #25d366;
color: var(--white);
border: none;
padding: 0.85rem;
border-radius: var(--radius-md);
font-weight: 700;
font-size: 0.95rem;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
cursor: pointer;
text-decoration: none;
transition: var(--transition);
box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-checkout:hover {
background: #20ba5a;
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.btn-checkout.disabled {
background: #cbd5e1;
cursor: not-allowed;
box-shadow: none;
}

/* ==========================================================================
CUSTOM DIALOG MODAL
========================================================================== */
.custom-dialog-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(3px);
z-index: 3000;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
visibility: hidden;
transition: var(--transition);
}

.custom-dialog-overlay.active {
opacity: 1;
visibility: visible;
}

.custom-dialog {
background: var(--white);
width: 90%;
max-width: 400px;
border-radius: var(--radius-lg);
padding: 1.5rem;
box-shadow: 0 15px 35px rgba(0,0,0,0.2);
text-align: center;
transform: scale(0.9);
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-dialog-overlay.active .custom-dialog {
transform: scale(1);
}

.custom-dialog-icon {
font-size: 2.5rem;
color: var(--primary);
margin-bottom: 0.8rem;
}

.custom-dialog h3 {
font-size: 1.2rem;
color: var(--dark);
margin-bottom: 0.5rem;
}

.custom-dialog p {
font-size: 0.9rem;
color: var(--dark-muted);
margin-bottom: 1.2rem;
}

.custom-dialog input {
width: 100%;
padding: 0.75rem;
border: 2px solid var(--border-color);
border-radius: var(--radius-sm);
font-size: 1rem;
text-align: center;
font-weight: 700;
outline: none;
margin-bottom: 1.2rem;
font-family: var(--font-main);
}

.custom-dialog input:focus {
border-color: var(--primary);
}

.custom-dialog-buttons {
display: flex;
gap: 10px;
}

.custom-dialog-btn {
flex: 1;
padding: 0.7rem;
border-radius: var(--radius-sm);
font-weight: 700;
font-size: 0.9rem;
cursor: pointer;
border: none;
transition: var(--transition);
}

.btn-dialog-cancel {
background: #f1f5f9;
color: var(--dark-muted);
}

.btn-dialog-cancel:hover {
background: #e2e8f0;
}

.btn-dialog-confirm {
background: var(--primary);
color: var(--white);
}

.btn-dialog-confirm:hover {
background: var(--primary-hover);
}

.btn-dialog-whatsapp {
background: #25d366;
color: var(--white);
}

.btn-dialog-whatsapp:hover {
background: #20ba5a;
}

/* ==========================================================================
HERO SECTION
========================================================================== */
.hero {
position: relative;
background: #1e293b;
color: var(--white);
padding: 4rem 0;
text-align: center;
isolation: isolate;
overflow: hidden;
}
.hero-bg-layer {
position: absolute;
inset: 0;
z-index: -1;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
opacity: 0;
transition: opacity 1.1s ease-in-out;
will-change: opacity;
pointer-events: none;
}
.hero-bg-layer.visible { opacity: 1; }
.hero-overlay { display: none; }
.hero-content { position: relative; z-index: 1; }
.hero-slide-copy { opacity: 1; transform: translateY(0); transition: opacity .45s ease, transform .45s ease; }
.hero-slide-copy.changing { opacity: 0; transform: translateY(12px); }

.badge-hero {
background: rgba(217, 119, 6, 0.35);
border: 1px solid var(--primary);
padding: 0.35rem 1rem;
border-radius: 30px;
font-size: 0.78rem;
font-weight: 700;
display: inline-block;
margin-bottom: 0.8rem;
backdrop-filter: blur(5px);
}

.hero-content h1 {
font-size: 2.1rem;
font-weight: 800;
margin-bottom: 0.8rem;
line-height: 1.25;
}

.hero-content h1 span { color: #fde047; }

.hero-content p {
font-size: 0.98rem;
color: #f1f5f9;
margin-bottom: 1.5rem;
max-width: 600px;
margin-left: auto;
margin-right: auto;
padding: 0 10px;
}

.hero-buttons {
display: flex;
justify-content: center;
gap: 0.8rem;
flex-wrap: wrap;
}

.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 0.75rem 1.4rem;
border-radius: var(--radius-md);
font-weight: 700;
text-decoration: none;
transition: var(--transition);
font-size: 0.9rem;
}

.btn-primary {
background: var(--primary);
color: var(--white);
box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
}

.btn-primary:hover {
background: var(--primary-hover);
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(217, 119, 6, 0.6);
}

.btn-outline {
border: 2px solid var(--white);
color: var(--white);
}

.btn-outline:hover {
background: var(--white);
color: var(--dark);
transform: translateY(-2px);
}

/* ==========================================================================
TABLE SECTION
========================================================================== */
.section { padding: 3rem 0; }
.bg-light { background-color: var(--light-bg); }

.section-header {
text-align: center;
margin-bottom: 2rem;
padding: 0 10px;
}

.sub-title {
color: var(--primary);
font-weight: 800;
text-transform: uppercase;
font-size: 0.75rem;
letter-spacing: 1px;
display: block;
margin-bottom: 0.3rem;
}

.section-header h2 {
font-size: 1.75rem;
color: var(--dark);
font-weight: 800;
margin-bottom: 0.4rem;
}

.section-header p {
font-size: 0.88rem;
color: var(--dark-muted);
}

.table-card {
background: var(--white);
border-radius: var(--radius-md);
border: 1px solid var(--border-color);
overflow: hidden;
box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.table-responsive {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
width: 100%;
}

.data-table {
width: 100%;
border-collapse: collapse;
text-align: left;
min-width: 680px;
}

.data-table th {
background-color: #fef3c7;
color: var(--dark);
padding: 0.85rem;
font-size: 0.75rem;
text-transform: uppercase;
font-weight: 700;
white-space: nowrap;
}

.data-table td {
padding: 0.8rem;
border-bottom: 1px solid #fef3c7;
vertical-align: middle;
white-space: nowrap;
transition: var(--transition);
font-size: 0.9rem;
}

.data-table tbody tr:hover {
background-color: #fff7ed;
}

.code-col { font-weight: 700; color: #94a3b8; font-size: 0.8rem; }

.img-box-table {
width: 44px;
height: 44px;
border-radius: var(--radius-sm);
overflow: hidden;
position: relative;
background: #e2e8f0;
}

.img-box-table img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}

.img-fallback {
display: none;
width: 100%;
height: 100%;
background: #fed7aa;
color: #9a3412;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 0.6rem;
gap: 2px;
}

.product-name-cell strong { display: block; color: var(--dark); font-size: 0.9rem; }
.product-name-cell small { color: #78350f; font-size: 0.75rem; }

.category-tag {
padding: 0.25rem 0.7rem;
border-radius: 20px;
font-size: 0.72rem;
font-weight: 700;
display: inline-block;
}

.category-tag.jajanan { background: #fef3c7; color: #b45309; }
.category-tag.minuman { background: #e0f2fe; color: #0369a1; }
.category-tag.cemilan { background: #fce7f3; color: #be185d; }
.category-tag.utama { background: #e0e7ff; color: #3730a3; }

.price-cell { font-weight: 800; color: var(--dark); }
.old-price-table {
text-decoration: line-through;
color: #94a3b8;
display: block;
font-weight: 500;
font-size: 0.75rem;
}

.status-badge {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 0.75rem;
font-weight: 700;
padding: 0.25rem 0.7rem;
border-radius: 20px;
}

.status-badge.available { background: #dcfce7; color: #15803d; }
.status-badge.warning { background: #fef9c3; color: #854d0e; }
.status-badge.outofstock { background: #ffe4e6; color: #be123c; }

.btn-table-action {
background: var(--primary-light);
color: var(--primary);
border: none;
width: 38px;
height: 38px;
border-radius: 50%;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
text-decoration: none;
transition: var(--transition);
}

.btn-table-action:hover:not(.disabled) {
background: var(--primary);
color: var(--white);
transform: scale(1.1);
}

.btn-table-action.disabled {
background: #f1f5f9;
color: #cbd5e1;
cursor: not-allowed;
}

/* ==========================================================================
CARD GRID
========================================================================== */
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 1.2rem;
}

.product-card {
background: var(--white);
border-radius: var(--radius-md);
border: 1px solid #fef3c7;
overflow: hidden;
position: relative;
display: flex;
flex-direction: column;
transition: var(--transition);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.product-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 25px rgba(217, 119, 6, 0.12);
border-color: var(--primary);
}

.card-badge {
position: absolute;
top: 10px;
left: 10px;
background: var(--accent);
color: var(--white);
font-size: 0.7rem;
font-weight: 800;
padding: 0.25rem 0.7rem;
border-radius: 20px;
z-index: 10;
}

.card-badge.promo { background: #2563eb; }

.card-image {
height: 180px;
background: #fed7aa;
position: relative;
overflow: hidden;
}

.card-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}

.product-card:hover .card-image img {
transform: scale(1.05);
}

.card-fallback {
display: none;
width: 100%;
height: 100%;
background: #fed7aa;
color: #9a3412;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 0.75rem;
gap: 4px;
}

.card-overlay {
position: absolute;
inset: 0;
background: rgba(30, 41, 59, 0.5);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: var(--transition);
}

@media (hover: hover) {
.product-card:hover .card-overlay {
opacity: 1;
}
}
@media (hover: none) {
.card-overlay { opacity: 1; background: linear-gradient(to top, rgba(30,41,59,0.7) 0%, transparent 60%); }
}

.btn-quick-view {
background: var(--white);
color: var(--dark);
padding: 0.45rem 1rem;
border-radius: var(--radius-sm);
text-decoration: none;
font-weight: 700;
font-size: 0.8rem;
transition: var(--transition);
}

.card-content {
padding: 1.2rem;
display: flex;
flex-direction: column;
flex-grow: 1;
}

.card-category {
font-size: 0.72rem;
font-weight: 700;
color: var(--primary);
text-transform: uppercase;
margin-bottom: 0.3rem;
}

.card-title {
font-size: 1.05rem;
font-weight: 800;
color: var(--dark);
margin-bottom: 0.4rem;
}

.card-desc {
font-size: 0.85rem;
color: var(--dark-muted);
margin-bottom: 1.2rem;
flex-grow: 1;
}

.card-bottom {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #f1f5f9;
padding-top: 0.8rem;
}

.price-wrap {
display: flex;
flex-direction: column;
}

.current-price {
font-size: 1rem;
font-weight: 800;
color: var(--dark);
}

.old-price {
font-size: 0.75rem;
color: #94a3b8;
text-decoration: line-through;
}

.btn-card-buy {
background: var(--primary-light);
color: var(--primary);
padding: 0.45rem 0.9rem;
border-radius: var(--radius-sm);
text-decoration: none;
font-weight: 700;
font-size: 0.8rem;
display: inline-flex;
align-items: center;
gap: 5px;
transition: var(--transition);
border: none;
cursor: pointer;
}

.btn-card-buy:hover {
background: var(--primary);
color: var(--white);
}

/* ==========================================================================
FOOTER
========================================================================== */
.footer {
background: var(--dark);
color: #cbd5e1;
padding: 3rem 0 1.5rem;
text-align: center;
}

.footer-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 1.2rem;
}

.footer-logo {
margin-bottom: 0.2rem;
}

.footer-tagline {
max-width: 480px;
font-size: 0.9rem;
margin-bottom: 0.2rem;
padding: 0 10px;
}

.team-credits {
background: rgba(255, 255, 255, 0.05);
padding: 0.9rem 1.2rem;
border-radius: var(--radius-sm);
border: 1px solid rgba(255, 255, 255, 0.1);
width: 100%;
max-width: 450px;
}

.team-credits p {
font-size: 0.82rem;
color: var(--white);
margin-bottom: 0.3rem;
}

.team-list {
display: flex;
justify-content: center;
gap: 8px;
font-size: 0.82rem;
flex-wrap: wrap;
color: #fde047;
}

.team-list .dot {
color: #94a3b8;
}

.social-hover-links {
display: flex;
gap: 0.8rem;
margin: 0.5rem 0;
}

.social-btn {
width: 38px;
height: 38px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.08);
color: var(--white);
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
font-size: 1rem;
transition: var(--transition);
}

.social-btn.whatsapp:hover { background: #25d366; transform: translateY(-2px); }
.social-btn.instagram:hover { background: #e1306c; transform: translateY(-2px); }
.social-btn.tiktok:hover { background: #000000; transform: translateY(-2px); }

.visitor-badge {
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.15);
padding: 0.45rem 1rem;
border-radius: 30px;
font-size: 0.82rem;
color: #fde047;
font-weight: 600;
margin-top: 0.2rem;
}

.visitor-badge strong {
color: var(--white);
font-weight: 800;
}

.copyright {
border-top: 1px solid rgba(255, 255, 255, 0.1);
width: 100%;
padding-top: 1.2rem;
margin-top: 0.5rem;
font-size: 0.82rem;
color: #94a3b8;
}

.copyright strong { color: var(--white); }

@media (max-width: 576px) {
.hero-content h1 { font-size: 1.8rem; }
.section-header h2 { font-size: 1.5rem; }
.navbar { justify-content: center; }
.nav-menu ul { gap: 0.8rem; }
}
/* ===== Riwayat Pesanan & Riwayat Stok ===== */
.custom-dialog.wide {
    max-width: 720px;
    text-align: left;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.custom-dialog.wide h3 { text-align: center; }
.history-scroll {
    overflow-y: auto;
    flex: 1;
    margin-bottom: 1rem;
}
.history-item {
    border: 1px solid var(--border-color);
    background: var(--light-bg);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    margin-bottom: 0.8rem;
}
.history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.history-badge {
    background: var(--primary-light);
    color: var(--primary-hover);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}
.history-meta {
    font-size: 0.78rem;
    color: var(--dark-muted);
    margin: 4px 0 8px;
}
.history-item ul { list-style: none; padding: 0; margin: 0 0 8px; }
.history-item li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.85rem;
    padding: 3px 0;
}
.history-total { text-align: right; font-weight: 800; color: var(--primary-hover); }
.history-table-wrap { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.history-table th, .history-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}
.history-table th { background: var(--primary-light); color: var(--dark); }
.diff-minus { color: var(--accent); font-weight: 700; }
.diff-plus { color: #16a34a; font-weight: 700; }

/* ===== Form Checkout & Simulasi Pembayaran ===== */
.custom-dialog.checkout {
    max-width: 480px;
    text-align: left;
    max-height: 92vh;
    overflow-y: auto;
}
.custom-dialog.checkout h3 { text-align: center; margin-bottom: 0.8rem; }
.custom-dialog.checkout input,
.custom-dialog.checkout textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    outline: none;
    margin-bottom: 0.8rem;
    font-family: var(--font-main);
}
.custom-dialog.checkout textarea { resize: vertical; min-height: 70px; }
.custom-dialog.checkout input:focus,
.custom-dialog.checkout textarea:focus { border-color: var(--primary); }
.custom-dialog.checkout input[type="radio"] { width: auto; margin: 0; padding: 0; }
.form-label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.form-error { color: var(--accent); font-size: 0.8rem; font-weight: 700; margin-bottom: 0.8rem !important; }
.checkout-summary {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
}
.checkout-summary div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.checkout-summary .sum-total { border-top: 1px dashed var(--border-color); margin-top: 4px; padding-top: 6px; font-weight: 800; color: var(--primary-hover); }
.pay-options { display: grid; gap: 8px; margin-bottom: 1rem; }
.pay-option {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}
.pay-option:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.pay-option i { font-size: 1.2rem; color: var(--primary); width: 24px; text-align: center; }
.pay-option strong { display: block; font-size: 0.88rem; }
.pay-option small { color: var(--dark-muted); font-size: 0.74rem; }
.sim-banner {
    background: #fef3c7;
    border: 1px dashed var(--primary);
    color: var(--primary-hover);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}
.pay-center { text-align: center; }
.va-number {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--dark);
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.7rem;
    margin: 0.4rem 0 1rem;
}
.qris-box { font-size: 7rem; color: var(--dark); line-height: 1; margin: 0.5rem 0; }
.pay-total { font-size: 1.1rem; font-weight: 800; color: var(--primary-hover); margin-bottom: 1.2rem; }
.history-detail { font-size: 0.8rem; color: var(--dark-muted); border-top: 1px dashed var(--border-color); margin-top: 8px; padding-top: 6px; }
.history-detail div { padding: 1px 0; }


/* ===== Pencarian & Kategori ===== */
.catalog-tools { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1rem; }
.search-box { position: relative; }
.search-controls { display: grid; grid-template-columns: auto 190px minmax(220px, 1fr); align-items: center; gap: 10px; }
.search-mode-wrap { font-size: .88rem; font-weight: 800; color: var(--dark); white-space: nowrap; }
.search-controls select, .search-box input { width: 100%; min-width: 0; padding: .75rem 1rem; border: 2px solid var(--border-color); border-radius: var(--radius-md); font: inherit; font-size: .92rem; outline: none; background: var(--white); color: var(--dark); }
.search-controls select:focus, .search-box input:focus { border-color: var(--primary); }
.search-input-wrap { position: relative; min-width: 0; }
.search-input-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.search-input-wrap input { padding-left: 2.6rem; }
.search-controls [hidden], .search-input-wrap[hidden] { display: none !important; }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 2px solid var(--border-color); background: var(--white); color: var(--dark-muted); padding: 0.4rem 0.95rem; border-radius: 999px; font: inherit; font-weight: 700; font-size: 0.8rem; cursor: pointer; transition: var(--transition); }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.no-result { text-align: center; padding: 1.5rem; font-weight: 600; }
.data-table .img-box-table, .data-table .product-name-cell { cursor: pointer; }
.data-table .product-name-cell:hover strong { color: var(--primary); }

/* ===== Menu Favorit: berjalan otomatis ===== */
.fav-viewport { overflow: hidden; padding: 1.6rem 0; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.fav-viewport.dragging { cursor: grabbing; }
.fav-track { display: flex; gap: 1.2rem; width: max-content; will-change: transform; transform: translate3d(0,0,0); }
.fav-track .product-card { flex: 0 0 260px; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s, border-color 0.35s; }
.fav-track .product-card:hover { transform: scale(1.07); z-index: 5; }
.fav-track .card-image, .fav-track .card-title { cursor: pointer; }
.fav-track img { pointer-events: none; -webkit-user-drag: none; }
.fav-hint { text-align: center; font-size: 0.78rem; color: #94a3b8; }

/* ===== Modal Detail ===== */
.custom-dialog.detail { max-width: 460px; text-align: left; max-height: 92vh; overflow-y: auto; padding: 0; position: relative; }
.detail-img { width: 100%; height: 220px; object-fit: cover; display: block; background: #fed7aa; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.detail-body { padding: 1.2rem 1.4rem 1.4rem; }
.custom-dialog.detail h3 { margin: 0.5rem 0 0.2rem; }
.custom-dialog.detail .detail-sub { margin-bottom: 0.6rem; }
.detail-price { font-weight: 800; color: var(--primary); margin-bottom: 1rem; }
.detail-price small { color: var(--dark-muted); font-weight: 600; }
.detail-body h4 { font-size: 0.85rem; color: var(--dark); margin-bottom: 0.5rem; }
.ing-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.2rem; }
.ing-list li { background: var(--primary-light); color: var(--primary-hover); font-size: 0.78rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 999px; }
.detail-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(255,255,255,0.92); color: var(--dark); cursor: pointer; font-size: 1rem; z-index: 2; }
.custom-dialog-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Keranjang: checkbox & jumlah ===== */
.cart-check { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.cart-selectall { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 700; color: var(--dark); cursor: pointer; }
.cart-item.unchecked { opacity: 0.55; }
.cart-qty-input { width: 52px; text-align: center; border: 1px solid var(--border-color); border-radius: 4px; padding: 2px; font: inherit; font-weight: 700; font-size: 0.85rem; color: var(--dark); }
.qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Login / Daftar & peringatan non-member ===== */
.auth-tabs { display: flex; gap: 6px; margin-bottom: 0.9rem; }
.auth-tabs .chip { flex: 1; }
.guest-warn { background: #fff7ed; border: 1px dashed var(--accent); color: #9a3412; border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.9rem; text-align: left; }
.guest-warn a { color: var(--primary-hover); font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .fav-track .product-card { transition: none; } }


/* ===== Hero slider & tombol indikator ===== */
.hero-dots { display:flex; justify-content:center; gap:9px; margin-top:1.6rem; }
.hero-dot { width:10px; height:10px; border:0; border-radius:50%; background:rgba(255,255,255,.5); cursor:pointer; transition:all .25s ease; }
.hero-dot.active { width:28px; border-radius:20px; background:#fde047; }
.hero-slide-copy { min-height:145px; }
.edit-product-btn { margin-left:5px; background:#334155; color:#fff; }
.edit-product-btn:hover { background:#1e293b; }
@media (max-width:576px) {
.hero-slide-copy { min-height:190px; }
.hero-dots { margin-top:1.1rem; }
.search-controls { grid-template-columns: 1fr; gap: 7px; }
.search-mode-wrap { white-space: normal; }
}

.guest-auth-actions { display:flex; gap:8px; margin-top:9px; flex-wrap:wrap; }
.guest-auth-btn { border:0; border-radius:8px; padding:7px 14px; background:var(--primary); color:#fff; font:inherit; font-size:.78rem; font-weight:800; cursor:pointer; }
.guest-auth-btn:hover { background:var(--primary-hover); }
.guest-auth-btn.warn-register { background:#334155; }
