
/* =========================================
   NUSA CIPTA PACKAGING
   STYLE.CSS - BAGIAN 1 DARI 3
   Dasar tampilan, header, navigasi, dan hero
========================================= */

:root {
  --primary: #1457a6;
  --primary-dark: #0b3973;
  --primary-light: #eaf3ff;
  --accent: #f4a62a;
  --text: #172b43;
  --muted: #64748b;
  --background: #f6f8fc;
  --surface: #ffffff;
  --border: #e1e8f0;
  --success: #16834a;
  --danger: #c62828;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(20, 50, 90, 0.08);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.65;
  font-size: 16px;
}

body,
input,
select,
textarea,
button {
  font-family: Arial, Helvetica, sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-size: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 76px 0;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading h2 {
  margin: 6px 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.7px;
}

.section-heading > p:last-child {
  color: var(--muted);
  margin: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* HEADER */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 3px 14px rgba(20, 50, 90, 0.04);
  backdrop-filter: blur(12px);
}

.header-content {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

.logo-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--primary-dark)
  );
  border-radius: 13px;
  font-size: 23px;
  font-weight: 800;
}

.logo strong,
.logo span {
  display: block;
}

.logo strong {
  font-size: 17px;
  line-height: 1.25;
}

.logo span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

#menuToggle {
  display: none;
  width: 44px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 24px;
}

#mainNav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

#mainNav a {
  color: #40516a;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

#mainNav a:hover,
#mainNav a:focus-visible {
  color: var(--primary);
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 9px;
}

#accountButton,
#cartButton {
  position: relative;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

#accountButton:hover,
#cartButton:hover {
  border-color: var(--primary);
  color: var(--primary);
}

#cartCount {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 5px;
  place-items: center;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

/* TOMBOL UMUM */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  line-height: 1.4;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 14px rgba(20, 87, 166, 0.18);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-secondary {
  background: #edf2f8;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #e1eaf5;
}

.btn-light {
  background: #fff;
  color: var(--primary-dark);
}

.btn-light:hover {
  background: #edf4ff;
}

.btn-full {
  width: 100%;
}

/* HERO / BERANDA */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0;
  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(91, 160, 255, 0.18),
      transparent 34%
    ),
    linear-gradient(135deg, #f4f8ff, #ffffff 62%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 850px;
}

.hero h1 {
  max-width: 820px;
  margin: 10px 0 20px;
  color: var(--primary-dark);
  font-size: clamp(34px, 5.5vw, 58px);
  line-height: 1.12;
  letter-spacing: -1.5px;
}

.hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
}

.hero .btn {
  margin-top: 15px;
}

/* FOKUS AKSESIBILITAS */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 121, 220, 0.35);
  outline-offset: 3px;
}

/* =========================================
   BAGIAN 2: KATALOG DAN KARTU PRODUK
========================================= */

.products-section {
  background: var(--background);
}

.product-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  margin: 0 0 28px;
}

.product-tools input,
.product-tools select {
  width: 100%;
  min-height: 48px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.product-tools input:focus,
.product-tools select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 87, 166, 0.1);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.product-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: #c5d8f2;
  box-shadow: 0 14px 34px rgba(20, 50, 90, 0.12);
}

.product-card h3,
.product-card .product-name {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.product-card p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.product-card img {
  width: 100%;
  height: 210px;
  margin-bottom: 18px;
  object-fit: contain;
  border-radius: 10px;
  background: #f7f9fc;
}

.product-card .product-price {
  margin: 8px 0 16px;
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
}

.product-card label {
  display: block;
  margin: 13px 0 6px;
  color: #34465e;
  font-size: 13px;
  font-weight: 700;
}

.product-card select,
.product-card input[type="number"],
.product-card input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d8e1ec;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.product-card select:focus,
.product-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 87, 166, 0.1);
}

.product-card [data-field="quantity"] {
  max-width: 140px;
}

.product-card [data-inline-add] {
  margin-top: 18px;
}

.product-card .status-message {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* PESAN STATUS */

.status-message {
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.status-message:empty {
  display: none;
}

#emptyProducts {
  padding: 25px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

/* BANNER WHATSAPP */

.custom-banner {
  padding: 52px 0;
  background: linear-gradient(
    120deg,
    var(--primary-dark),
    var(--primary)
  );
  color: #fff;
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.banner-content > div {
  max-width: 720px;
}

.banner-content .eyebrow {
  color: #cfe2ff;
}

.banner-content h2 {
  margin: 4px 0 10px;
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.25;
}

.banner-content p:not(.eyebrow) {
  margin: 0;
  color: #e2edff;
}

.banner-content .btn {
  flex-shrink: 0;
}

/* RESPONSIF KATALOG */

@media (max-width: 1000px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-content {
    gap: 14px;
  }

  #mainNav {
    gap: 14px;
  }

  .logo strong {
    font-size: 15px;
  }
}

@media (max-width: 700px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .product-card {
    padding: 18px;
  }

  .product-card img {
    height: 190px;
  }

  .product-tools {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .banner-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .banner-content .btn {
    width: 100%;
  }
}

/* =========================================
   BAGIAN 3: MENU HP, TENTANG, MODAL, FOOTER
========================================= */

/* TENTANG KAMI */

.about-section {
  background: #fff;
}

.about-content {
  max-width: 900px;
}

.about-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text h2 {
  margin: 8px 0 18px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
}

.about-text p {
  color: var(--muted);
}

.about-text .btn {
  margin-top: 18px;
}

/* KONTAK */

.contact-section {
  background: var(--background);
}

.contact-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-card h3 {
  margin-top: 0;
  font-size: 24px;
}

.contact-card p {
  margin-bottom: 22px;
  color: var(--muted);
}

/* FOOTER */

.site-footer {
  padding: 30px 0;
  background: #0b2444;
  color: #fff;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-content strong {
  font-size: 17px;
}

.footer-content p {
  margin: 5px 0 0;
  color: #c6d5e8;
  font-size: 13px;
}

/* JENDELA MODAL */

.modal {
  width: min(560px, calc(100% - 28px));
  max-width: 560px;
  max-height: 85vh;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.modal::backdrop {
  background: rgba(7, 22, 42, 0.62);
  backdrop-filter: blur(3px);
}

.modal-content {
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.modal-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f9fc;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.modal-close:hover {
  background: #eaf1fb;
  color: var(--primary);
}

/* FORM LOGIN DAN DAFTAR */

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
}

.auth-tabs button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f5f7fb;
  color: var(--text);
  font-weight: 700;
}

.auth-tabs button:hover,
.auth-tabs button:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}

#accountForm label {
  display: block;
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 700;
}

#accountForm input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
}

#accountForm input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(20, 87, 166, 0.1);
}

#authSubmit {
  margin-top: 20px;
}

#accountSession {
  padding: 16px;
  border-radius: 10px;
  background: var(--primary-light);
  overflow-wrap: anywhere;
}

#accountSession p {
  margin-top: 0;
}

/* DETAIL PRODUK */

#productDetailContent {
  overflow-wrap: anywhere;
}

#productDetailContent img {
  width: 100%;
  max-height: 320px;
  margin: 0 auto 18px;
  object-fit: contain;
  border-radius: 12px;
  background: #f7f9fc;
}

#productDetailContent h3 {
  margin-top: 0;
}

#productDetailContent p {
  color: var(--muted);
}

/* KERANJANG */

#cartItems {
  display: grid;
  gap: 12px;
}

#cartItems > * {
  min-width: 0;
}

.cart-summary {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.cart-total strong {
  color: var(--primary);
  font-size: 21px;
  overflow-wrap: anywhere;
}

#checkoutMessage {
  overflow-wrap: anywhere;
}

/* MENU DAN HEADER DI HP */

@media (max-width: 800px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .section {
    padding: 54px 0;
  }

  .header-content {
    min-height: 68px;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .logo {
    flex: 1 1 auto;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 20px;
  }

  .logo strong {
    font-size: 14px;
  }

  .logo span {
    font-size: 10px;
  }

  #menuToggle {
    display: inline-grid;
    place-items: center;
    order: 2;
  }

  .header-buttons {
    order: 3;
    gap: 6px;
  }

  #accountButton,
  #cartButton {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
  }

  #mainNav {
    display: none;
    order: 4;
    flex: 0 0 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    border-top: 1px solid var(--border);
  }

  #mainNav.active {
    display: flex;
  }

  #mainNav a {
    display: block;
    padding: 12px 8px;
    border-radius: 8px;
  }

  #mainNav a:hover {
    background: var(--primary-light);
  }

  .hero {
    padding: 60px 0;
  }

  .hero h1 {
    letter-spacing: -0.8px;
  }

  .hero p {
    font-size: 15px;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

/* HP KECIL */

@media (max-width: 420px) {
  .container {
    width: calc(100% - 24px);
  }

  .logo {
    gap: 8px;
  }

  .logo strong {
    font-size: 12px;
  }

  .logo span {
    font-size: 9px;
  }

  .header-content {
    column-gap: 7px;
  }

  #menuToggle {
    width: 38px;
    height: 38px;
  }

  #accountButton,
  #cartButton {
    padding: 7px 8px;
    font-size: 11px;
  }

  .modal-content {
    padding: 18px;
  }

  .contact-card {
    padding: 22px 16px;
  }
}
