/* File: assets/css/style.css */
:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #0f766e;
    --primary-hover: #115e59;
    --accent: #d97706;
    --danger: #dc2626;
    --success: #16a34a;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.main-content { flex: 1; }

/* Notice Bar */
.notice-bar {
    background: linear-gradient(90deg, #0f172a, #134e4a);
    color: #f8fafc;
    font-size: 0.875rem;
    padding: 0.55rem 0;
    text-align: center;
}

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
}
.brand-logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; }
.brand-logo img { height: 36px; width: auto; object-fit: contain; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.header-search {
    flex: 1; min-width: 220px; display: flex; gap: 0.4rem;
}
.header-search input {
    flex: 1; padding: 0.6rem 0.9rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.92rem;
}
.header-search button {
    padding: 0.6rem 1.1rem; border: none; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 600; cursor: pointer;
}
.header-actions { display: flex; align-items: center; gap: 0.65rem; }
.icon-btn {
    position: relative; width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem; background: #fff; transition: transform .15s ease;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--primary); }
.icon-btn .badge {
    position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px;
    border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.72rem;
    font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.mobile-menu-toggle {
    display: none; border: 1px solid var(--border); background: #fff;
    border-radius: 8px; padding: 0.45rem 0.7rem; font-size: 1.1rem; cursor: pointer;
}

/* Main Nav */
.main-nav { background: #f1f5f9; border-top: 1px solid var(--border); }
.nav-inner { display: flex; gap: 0.35rem; overflow-x: auto; padding: 0.5rem 1rem; }
.nav-link {
    padding: 0.45rem 0.85rem; border-radius: 8px; font-size: 0.9rem; font-weight: 500;
    white-space: nowrap; transition: background .15s ease;
}
.nav-link:hover { background: #e2e8f0; }
.pill-off {
    background: #fee2e2; color: #b91c1c; font-size: 0.7rem; padding: 0.1rem 0.4rem;
    border-radius: 999px; margin-left: 0.25rem; font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.6rem 1.15rem; border-radius: 10px; font-weight: 600; font-size: 0.92rem;
    border: 1px solid transparent; cursor: pointer; transition: all .18s ease;
}
.btn-sm { padding: 0.42rem 0.8rem; font-size: 0.84rem; }
.btn-lg { padding: 0.8rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: #fff; color: var(--ink); }
.btn-disabled { background: #cbd5e1; color: #64748b; cursor: not-allowed; }
.btn-link-danger { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 0.85rem; font-weight: 600; }

/* Hero */
.hero-section {
    background: linear-gradient(125deg, #0f172a 0%, #134e4a 65%, #0f766e 100%);
    background-size: cover; background-position: center; color: #fff; padding: 4rem 0;
}
.hero-content { max-width: 720px; }
.hero-kicker {
    display: inline-block; background: rgba(255,255,255,0.16); padding: 0.3rem 0.8rem;
    border-radius: 999px; font-size: 0.82rem; font-weight: 600; margin-bottom: 1rem;
}
.hero-content h1 { font-size: clamp(1.85rem, 4vw, 2.85rem); line-height: 1.15; margin-bottom: 0.9rem; }
.hero-content p { color: #e2e8f0; font-size: 1.05rem; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* Sections & Grids */
.page-section { padding: 2.2rem 1rem; }
.section-heading { margin-bottom: 1.4rem; }
.section-heading h1, .section-heading h2 { font-size: 1.55rem; margin-bottom: 0.25rem; }
.section-heading p { color: var(--muted); font-size: 0.95rem; }
.section-heading-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.category-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.35rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.6rem;
    transition: transform .2s ease, border-color .2s ease;
}
.category-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.category-off { opacity: 0.78; }
.category-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.category-card p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.category-cta { color: var(--primary); font-weight: 600; font-size: 0.9rem; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.product-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
    transition: transform .2s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-thumb-wrap { position: relative; aspect-ratio: 4 / 3; background: #e2e8f0; overflow: hidden; }
.product-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1); color: #475569; font-weight: 700; text-align: center; padding: 1rem;
}
.img-placeholder-lg { min-height: 360px; border-radius: var(--radius); }
.wish-toggle-btn {
    position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
    border: none; background: rgba(255,255,255,0.92); color: #475569; font-size: 1.1rem; cursor: pointer;
}
.wish-toggle-btn.active { color: #e11d48; }
.section-tag {
    position: absolute; bottom: 10px; left: 10px; background: rgba(15,23,42,0.78); color: #fff;
    font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 999px;
}
.stock-overlay {
    position: absolute; top: 10px; left: 10px; background: #dc2626; color: #fff;
    font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 999px; font-weight: 700;
}
.product-card-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.product-title { font-size: 1rem; line-height: 1.35; }
.product-price-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: auto; }
.price { font-size: 1.08rem; font-weight: 800; color: var(--primary); }
.price small { font-weight: 500; color: var(--muted); font-size: 0.78rem; }

/* Product Details & Goj Calculator */
.breadcrumb { font-size: 0.86rem; color: var(--muted); margin-bottom: 1.2rem; }
.breadcrumb a:hover { color: var(--primary); }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2rem; align-items: start; }
.gallery-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #fff; }
.gallery-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 0.6rem; margin-top: 0.75rem; flex-wrap: wrap; }
.gallery-thumb-btn {
    width: 72px; height: 72px; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; padding: 0; cursor: pointer; background: #fff;
}
.gallery-thumb-btn.active { border-color: var(--primary); }
.gallery-thumb-btn img { width: 100%; height: 100%; object-fit: cover; }
.product-meta-row { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.6rem; }
.section-pill { background: #ccfbf1; color: #115e59; padding: 0.22rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.stock-badge { padding: 0.22rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.stock-in { background: #dcfce7; color: #166534; }
.stock-out { background: #fee2e2; color: #991b1b; }
.detail-price { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin: 0.7rem 0 1rem; }
.price-unit { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.product-description { color: #334155; margin-bottom: 1.4rem; }

.goj-calc-box {
    background: #f0fdfa; border: 1px solid #99f6e4; border-radius: var(--radius);
    padding: 1.15rem; margin-bottom: 1.2rem;
}
.goj-calc-box h3 { font-size: 1.05rem; margin-bottom: 0.3rem; color: #115e59; }
.calc-rule { font-size: 0.85rem; color: #475569; margin-bottom: 0.85rem; }
.preset-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.preset-btn {
    padding: 0.48rem 0.95rem; border-radius: 8px; border: 1px solid #5eead4;
    background: #fff; color: #0f766e; font-weight: 700; cursor: pointer;
}
.preset-btn.active { background: #0f766e; color: #fff; border-color: #0f766e; }
.custom-goj-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.calc-summary {
    margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px dashed #5eead4;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
}
.calc-price-highlight { color: #0f766e; font-size: 1.18rem; }

.qty-action-row { display: flex; gap: 0.7rem; align-items: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.qty-box { width: 84px; }
.qty-box input { width: 100%; padding: 0.65rem; border: 1px solid var(--border); border-radius: 10px; }
.flex-1 { flex: 1; min-width: 170px; }

/* Forms & Cards */
.card-panel, .summary-card, .maintenance-card, .empty-state, .payment-box, .success-card, .error-box {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow);
}
.card-panel + .card-panel { margin-top: 1.2rem; }
.form-group { margin-bottom: 0.95rem; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.35rem; color: #334155; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.65rem 0.85rem; border: 1px solid var(--border); border-radius: 10px; font-size: 0.94rem; background: #fff;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }

/* Cart & Checkout */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: start; }
.cart-item-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1rem; display: grid; grid-template-columns: 96px 1fr auto; gap: 1rem; align-items: center; margin-bottom: 0.9rem;
}
.cart-item-img { width: 96px; height: 84px; border-radius: 10px; overflow: hidden; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.45rem; }
.meta-chip { background: #f1f5f9; padding: 0.2rem 0.55rem; border-radius: 6px; font-size: 0.78rem; color: #334155; }
.meta-highlight { background: #ccfbf1; color: #115e59; font-weight: 700; }
.cart-item-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.qty-btn { border: none; background: #f1f5f9; width: 30px; height: 32px; cursor: pointer; font-weight: 700; }
.cart-qty-input { width: 46px; border: none; text-align: center; font-weight: 600; }
.cart-line-total { font-weight: 800; color: var(--primary); }

.summary-row { display: flex; justify-content: space-between; margin-bottom: 0.65rem; font-size: 0.95rem; }
.summary-divider { border-top: 1px solid var(--border); margin: 0.85rem 0; }
.total-row { font-size: 1.15rem; color: var(--primary); }
.discount-row { color: var(--success); }
.summary-note { font-size: 0.84rem; color: var(--muted); margin: 0.8rem 0 1rem; }

.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 0.7rem; }
.radio-card {
    border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem; display: flex; gap: 0.65rem; align-items: flex-start; cursor: pointer;
}
.radio-card strong { display: block; font-size: 0.95rem; }
.radio-card span { font-size: 0.83rem; color: var(--muted); }
.sub-radio-box { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.coupon-input-row { display: flex; gap: 0.6rem; }
.coupon-feedback { margin-top: 0.55rem; font-size: 0.88rem; font-weight: 600; }
.checkout-mini-list { list-style: none; }
.checkout-mini-list li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; }
.mini-meta { font-size: 0.78rem; color: var(--muted); }

/* Payment & Success */
.payment-box, .success-card, .maintenance-card, .error-box { max-width: 600px; margin: 1rem auto; text-align: center; }
.payment-box { text-align: left; }
.payment-amount-banner {
    background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 12px; padding: 1rem;
    display: flex; justify-content: space-between; align-items: center; margin: 1rem 0;
}
.payment-amount-banner strong { font-size: 1.5rem; color: var(--primary); }
.success-icon {
    width: 64px; height: 64px; border-radius: 50%; background: #dcfce7; color: #16a34a;
    font-size: 2rem; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.tracking-pill {
    background: #0f172a; color: #fff; border-radius: 12px; padding: 0.85rem 1.2rem;
    display: inline-flex; flex-direction: column; margin: 1rem 0;
}
.tracking-pill span { font-size: 0.78rem; opacity: 0.8; }
.tracking-pill strong { font-size: 1.35rem; letter-spacing: 0.05em; }
.success-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; text-align: left; margin: 1.2rem 0; font-size: 0.92rem; }
.success-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.error-code { font-size: 4rem; font-weight: 900; color: var(--primary); display: block; line-height: 1; margin-bottom: 0.5rem; }

/* Dashboard */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; }
.dashboard-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.profile-mini { text-align: center; padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 0.9rem; }
.avatar-lg, .avatar-placeholder { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 0.6rem; object-fit: cover; }
.avatar-placeholder { background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; }
.user-id-badge { display: inline-block; background: #e0f2fe; color: #0369a1; font-weight: 700; font-size: 0.8rem; padding: 0.2rem 0.65rem; border-radius: 999px; margin-top: 0.3rem; }
.dash-nav { display: flex; flex-direction: column; gap: 0.3rem; }
.dash-nav a { padding: 0.6rem 0.85rem; border-radius: 8px; font-weight: 500; font-size: 0.92rem; }
.dash-nav a.active, .dash-nav a:hover { background: #f0fdfa; color: var(--primary); }
.text-danger { color: var(--danger) !important; }
.stats-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.stat-card span { display: block; font-size: 0.84rem; color: var(--muted); }
.stat-card strong { font-size: 1.5rem; color: var(--primary); }
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 0.7rem; border-bottom: 1px solid var(--border); text-align: left; }
.order-card-head, .order-card-foot, .panel-head-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.order-items-mini { list-style: none; margin: 0.8rem 0; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; padding: 0.6rem 0; }
.order-items-mini li { display: flex; justify-content: space-between; padding: 0.3rem 0; font-size: 0.9rem; }

/* Status Badges & Alerts & Toasts */
.status-pill, .status-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.status-active, .status-complete, .status-delivered { background: #dcfce7; color: #166534; }
.status-off, .status-cancelled { background: #fee2e2; color: #991b1b; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-processing { background: #dbeafe; color: #1e40af; }

.flash-wrap { margin-top: 1rem; }
.alert { padding: 0.85rem 1rem; border-radius: 10px; margin-bottom: 0.65rem; font-size: 0.92rem; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }

.filter-bar { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 0.7rem; margin-bottom: 1.5rem; }
.filter-bar input, .filter-bar select { padding: 0.65rem 0.85rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.sort-form { display: flex; align-items: center; gap: 0.5rem; }
.sort-form select { padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
    background: #0f172a; color: #fff; padding: 0.75rem 1.15rem; border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.22); font-size: 0.9rem; font-weight: 600;
    animation: slideUp .25s ease;
}
.toast-error { background: #dc2626; }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Footer */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 3rem; padding-top: 2.5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.8rem; padding-bottom: 2rem; }
.site-footer h4 { color: #fff; margin-bottom: 0.7rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a:hover { color: #5eead4; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1rem 0; font-size: 0.85rem; text-align: center; }

@media (max-width: 860px) {
    .product-detail-grid, .cart-layout, .checkout-layout, .dashboard-layout, .filter-bar { grid-template-columns: 1fr; }
    .form-grid-2, .radio-cards, .stats-grid-3 { grid-template-columns: 1fr; }
    .cart-item-card { grid-template-columns: 76px 1fr; }
    .cart-item-controls { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
    .mobile-menu-toggle { display: inline-flex; }
    .main-nav { display: none; }
    .main-nav.open { display: block; }
}
