:root {
  --bg-cream: #FAF8F3;
  --bg-sage-soft: #EEF3EE;
  --surface: #FFFFFF;
  --sage-primary: #3D5A45;
  --sage-hover: #2E4635;
  --sage-dark: #26382B;
  --sage-tint: #E4ECE5;
  --text-main: #1F2922;
  --text-muted: #627066;
  --border: #DCE4DD;
  --danger-bg: #FDECEC;
  --danger-text: #B42318;
  --ok-bg: #DCFCE7;
  --ok-text: #15803D;
  --radius-lg: 16px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.hidden {
  display: none !important;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* NAVBAR */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.navbar-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--sage-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
}

.nav-link.active {
  color: var(--sage-primary);
}

.nav-admin-btn {
  padding: 9px 18px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.15s;
}

.nav-admin-btn.active {
  background: var(--sage-primary);
  color: #fff;
  border-color: var(--sage-primary);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: 0.15s;
}

.btn-primary {
  background: var(--sage-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--sage-hover);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-sage-soft);
}

.btn-full {
  width: 100%;
}

/* HERO */
.hero {
  background: var(--bg-sage-soft);
  padding: 52px 0;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  line-height: 1.12;
  font-weight: 800;
  color: var(--sage-dark);
  margin-bottom: 16px;
}

.hero-copy p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 440px;
  margin-bottom: 24px;
}

.hero-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #dfe8e0;
  aspect-ratio: 4 / 4.4;
  max-width: 440px;
  margin-left: auto;
  box-shadow: 0 12px 30px rgba(38, 56, 43, 0.08);
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-badge {
  position: absolute;
  right: 14px;
  bottom: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sage-dark);
}

/* CATALOG */
.catalog-section {
  padding: 44px 0 72px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: 1.55rem;
  font-weight: 800;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.pill-btn.active {
  background: var(--sage-primary);
  color: #fff;
  border-color: var(--sage-primary);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-media {
  position: relative;
  aspect-ratio: 3 / 3.8;
  background: var(--bg-sage-soft);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--sage-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 99px;
}

.variant-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
}

.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--sage-dark);
  font-weight: 800;
  cursor: pointer;
}

.slide-arrow.prev { left: 8px; }
.slide-arrow.next { right: 8px; }

.slide-dots {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
}

.slide-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}

.slide-dot.active {
  background: var(--sage-dark);
}

.product-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.prod-cat {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.prod-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.prod-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.prod-price {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--sage-dark);
}

.prod-strike {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.prod-sizes {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.btn-cart-card {
  margin-top: auto;
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-cart-card:hover {
  background: var(--bg-sage-soft);
  border-color: var(--sage-primary);
}

/* CARDS & FORMS */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.auth-wrap {
  padding: 64px 20px;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-card h2 {
  margin-bottom: 6px;
}

.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.5;
}

.field-group {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
  color: var(--text-main);
}

.input:focus {
  outline: 2px solid rgba(61, 90, 69, 0.22);
  border-color: var(--sage-primary);
}

.textarea {
  resize: vertical;
}

.mt-8 { margin-top: 8px; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ADMIN SUBNAV */
.admin-subnav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.admin-subnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-tabs {
  display: flex;
  gap: 22px;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 14px 4px;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  cursor: pointer;
}

.tab-btn.active {
  color: var(--sage-primary);
  border-bottom-color: var(--sage-primary);
}

.logout-btn {
  background: none;
  border: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.admin-content {
  padding: 28px 20px 64px;
}

.size-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-chip {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.size-chip.active {
  background: var(--sage-primary);
  color: #fff;
  border-color: var(--sage-primary);
}

.helper-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.upload-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 1.5px dashed var(--sage-primary);
  border-radius: 10px;
  background: var(--bg-sage-soft);
  color: var(--sage-dark);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.variant-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.variant-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  background: var(--bg-cream);
}

.variant-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 6px;
}

.variant-item input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.variant-remove {
  width: 100%;
  padding: 4px;
  border: none;
  border-radius: 6px;
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-list-section {
  margin-top: 30px;
}

.admin-list-section h3 {
  margin-bottom: 14px;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-prod-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-prod-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-prod-left img {
  width: 58px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-sage-soft);
}

.admin-prod-actions {
  display: flex;
  gap: 8px;
}

.btn-sm-edit {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  background: var(--sage-tint);
  color: var(--sage-dark);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-sm-del {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  background: var(--danger-bg);
  color: var(--danger-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

/* ORDERS */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.order-code {
  font-weight: 800;
  font-size: 1rem;
}

.order-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.order-customer {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.order-customer a {
  color: var(--sage-primary);
}

.order-address {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.order-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid #f0f3f0;
  font-size: 0.9rem;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  font-weight: 800;
  font-size: 1.05rem;
}

/* ONGKIR TAB */
.bullet-info {
  margin: 14px 0 18px 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.check-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
}

.badge-err {
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
}

/* FLOATING CART & MODALS */
.floating-cart {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--sage-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(38, 56, 43, 0.28);
  cursor: pointer;
  z-index: 50;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #d97706;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 34, 27, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}

.modal-card {
  background: var(--surface);
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.modal-wide {
  max-width: 640px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.suggestions-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  max-height: 180px;
  overflow-y: auto;
  margin-top: 4px;
}

.suggestion-item {
  padding: 9px 12px;
  font-size: 0.86rem;
  cursor: pointer;
  border-bottom: 1px solid #f2f4f2;
}

.suggestion-item:hover {
  background: var(--bg-sage-soft);
}

.summary-box {
  background: var(--bg-sage-soft);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.summary-row.total {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 1.05rem;
}

.error-text {
  color: var(--danger-text);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

/* FOOTER */
.footer {
  background: var(--sage-dark);
  color: #ffffff;
  padding: 22px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.footer-brand {
  font-weight: 800;
}

@media (max-width: 768px) {
  .hero-grid,
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .hero-card {
    margin: 0 auto;
  }
}