/* ============================================================
   automaticgate.id — Design System
   Font: DM Sans (body) + Syne (display)
   Palette: Deep Navy × Sky Blue × White × Gold accent
   ============================================================ */

@import url('https://fonts.bunny.net/css?family=plus-jakarta-sans:300,400,500,600,700,800|outfit:400,500,600,700,800&display=swap');

/* ── Variables ──────────────────────────────────────────── */
:root {
  --navy:     #0a1628;
  --navy-80:  #162240;
  --blue:     #1a73e8;
  --blue-lt:  #4d9eff;
  --sky:      #e8f2ff;
  --gold:     #f5a623;
  --white:    #ffffff;
  --gray-10:  #f7f9fc;
  --gray-30:  #d4dce8;
  --gray-60:  #8898b0;
  --text:     #1c2b42;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --shadow-card:  0 4px 24px rgba(10,22,40,.08), 0 1px 4px rgba(10,22,40,.04);
  --shadow-hover: 0 12px 40px rgba(26,115,232,.18), 0 2px 8px rgba(10,22,40,.06);
  --shadow-nav:   0 2px 20px rgba(10,22,40,.12);

  --transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-lt); }
img { display: block; max-width: 100%; }

/* ── Navbar ─────────────────────────────────────────────── */
.ag-nav {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(212,220,232,.5);
  box-shadow: var(--shadow-nav);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: .875rem 0;
  transition: padding var(--transition);
}

.ag-nav .navbar-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--navy) !important;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ag-nav .navbar-brand span { color: var(--blue); }

.ag-nav .nav-link {
  font-weight: 500;
  font-size: .925rem;
  color: var(--navy) !important;
  padding: .4rem .9rem !important;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.ag-nav .nav-link:hover,
.ag-nav .nav-link.active {
  background: var(--sky);
  color: var(--blue) !important;
}

.ag-nav .btn-nav-cta {
  background: var(--blue);
  color: var(--white) !important;
  border-radius: var(--radius-sm);
  padding: .45rem 1.1rem !important;
  font-weight: 600;
  font-size: .9rem;
  box-shadow: 0 2px 12px rgba(26,115,232,.3);
}

.ag-nav .btn-nav-cta:hover {
  background: var(--navy);
  box-shadow: 0 4px 18px rgba(10,22,40,.25);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  min-height: 88vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-80) 60%, #1a3a6b 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 70% 50%, rgba(26,115,232,.18) 0%, transparent 60%),
    radial-gradient(ellipse 400px 400px at 20% 80%, rgba(77,158,255,.1) 0%, transparent 55%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(26,115,232,.2);
  border: 1px solid rgba(26,115,232,.4);
  color: var(--blue-lt);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 1.25rem;
}

.hero-title .accent { color: var(--blue-lt); }

.hero-desc {
  font-size: 1.08rem;
  color: rgba(255,255,255,.72);
  max-width: 520px;
  margin-bottom: 2.2rem;
  font-weight: 300;
}

.btn-hero-primary {
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: .85rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(26,115,232,.4);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.btn-hero-primary:hover {
  background: var(--blue-lt);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(26,115,232,.5);
  color: var(--white);
}

.btn-hero-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.35);
  padding: .85rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 1rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.btn-hero-outline:hover {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.08);
  color: var(--white);
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.hero-stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.hero-stat-num span { color: var(--gold); }

.hero-stat-label {
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  font-weight: 400;
  margin-top: .25rem;
}

/* Hero illustration side */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card-float {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: var(--white);
  animation: floatY 4s ease-in-out infinite;
}

@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* ── Section Header ─────────────────────────────────────── */
.section-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .5rem;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .75rem;
}

.section-desc {
  color: var(--gray-60);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Product Card ───────────────────────────────────────── */
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-30);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.product-img-wrap {
  position: relative;
  background: var(--sky);
  aspect-ratio: 4/3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.product-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--gray-60);
  gap: .5rem;
}

.product-img-placeholder i { font-size: 2.5rem; opacity: .4; }

.product-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: var(--blue);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.product-body {
  padding: 1.25rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: .75rem;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .4rem;
}

.product-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .5rem;
  line-height: 1.3;
}

.product-desc {
  font-size: .875rem;
  color: var(--gray-60);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  padding: 1rem 1.4rem 1.25rem;
  border-top: 1px solid var(--gray-30);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.product-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
}

.btn-wa {
  background: #25d366;
  color: var(--white);
  border: none;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-wa:hover {
  background: #1da851;
  color: var(--white);
  transform: scale(1.04);
}

.btn-cart {
  background: var(--sky);
  color: var(--blue);
  border: 1.5px solid transparent;
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: all var(--transition);
}

.btn-cart:hover {
  border-color: var(--blue);
  background: rgba(26,115,232,.08);
  color: var(--blue);
}

/* ── Search Bar ─────────────────────────────────────────── */
.search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.search-wrap input {
  width: 100%;
  padding: .875rem 1.25rem .875rem 3rem;
  border: 2px solid var(--gray-30);
  border-radius: var(--radius-xl);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
}

.search-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}

.search-wrap .search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-60);
  font-size: 1rem;
}

/* ── Feature/Why Section ────────────────────────────────── */
.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-30);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--sky);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--blue);
  margin-bottom: 1.25rem;
}

/* ── Partners/Brands strip ───────────────────────────────── */
.brands-strip {
  background: var(--gray-10);
  border-top: 1px solid var(--gray-30);
  border-bottom: 1px solid var(--gray-30);
  padding: 1.75rem 0;
  overflow: hidden;
}

.brands-inner {
  display: flex;
  gap: 3rem;
  align-items: center;
  animation: scrollBrands 20s linear infinite;
  width: max-content;
}

@keyframes scrollBrands {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.brand-item {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-60);
  white-space: nowrap;
  letter-spacing: .02em;
}

/* ── Cart Sidebar ───────────────────────────────────────── */
.cart-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 58px;
  height: 58px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(10,22,40,.3);
  cursor: pointer;
  transition: all var(--transition);
  z-index: 999;
}

.cart-toggle:hover { background: var(--blue); transform: scale(1.08); }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--gold);
  color: var(--navy);
  font-size: .68rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 360px;
  background: var(--white);
  box-shadow: -4px 0 40px rgba(10,22,40,.14);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-30);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--gray-30);
}

.cart-item {
  display: flex;
  gap: .75rem;
  padding: .875rem 0;
  border-bottom: 1px solid var(--gray-10);
  align-items: flex-start;
}

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

.cart-item-name { font-weight: 600; font-size: .9rem; color: var(--navy); }
.cart-item-price { font-size: .85rem; color: var(--blue); font-weight: 600; }

.btn-remove { background: none; border: none; color: var(--gray-60); cursor: pointer; padding: .25rem; transition: color var(--transition); }
.btn-remove:hover { color: #e53935; }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,.4);
  z-index: 1049;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

/* ── Contact ─────────────────────────────────────────────── */
.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-30);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: all var(--transition);
}

.contact-card:hover { border-color: var(--blue); box-shadow: var(--shadow-card); }

.contact-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--sky);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────── */
.ag-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 4rem 0 2rem;
}

.footer-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.5px;
}

.footer-brand span { color: var(--blue-lt); }

.footer-tagline { font-size: .9rem; margin-top: .5rem; color: rgba(255,255,255,.5); }

.footer-heading {
  font-family: 'Outfit', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.4);
  margin-bottom: 1rem;
}

.footer-link {
  display: block;
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  margin-bottom: .5rem;
  transition: color var(--transition);
}

.footer-link:hover { color: var(--blue-lt); }

.footer-divider { border-color: rgba(255,255,255,.1); margin: 2rem 0 1rem; }

.footer-copy { font-size: .82rem; color: rgba(255,255,255,.4); }

/* ── Loading Spinner ─────────────────────────────────────── */
.spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 5rem 0;
  color: var(--gray-60);
}

.spinner-ring {
  width: 44px;
  height: 44px;
  border: 3px solid var(--gray-30);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast Notification ──────────────────────────────────── */
.toast-container-custom {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.toast-custom {
  min-width: 260px;
  max-width: 360px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(10,22,40,.16);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  border-left: 4px solid var(--blue);
  animation: slideInRight .3s ease forwards;
}

.toast-custom.success { border-left-color: #2ecc71; }
.toast-custom.error   { border-left-color: #e53935; }
.toast-custom.warning { border-left-color: var(--gold); }

@keyframes slideInRight {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination .page-link {
  border: 1.5px solid var(--gray-30);
  color: var(--navy);
  border-radius: var(--radius-sm) !important;
  font-weight: 500;
  font-size: .9rem;
  padding: .45rem .9rem;
  transition: all var(--transition);
}

.pagination .page-link:hover,
.pagination .page-item.active .page-link {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--gray-60);
}

.empty-state i { font-size: 3.5rem; margin-bottom: 1.25rem; opacity: .35; }

/* ── Misc helpers ────────────────────────────────────────── */
.bg-sky  { background: var(--sky) !important; }
.bg-gray { background: var(--gray-10) !important; }
.text-navy { color: var(--navy) !important; }
.text-blue { color: var(--blue) !important; }
.text-gold { color: var(--gold) !important; }

.section-py  { padding-top: 5rem; padding-bottom: 5rem; }
.section-py-sm { padding-top: 3rem; padding-bottom: 3rem; }

.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 991px) {
  .hero { min-height: auto; padding: 5rem 0 4rem; }
  .hero-visual { margin-top: 3rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
  .cart-drawer { width: 100%; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 1.6rem; }
  .product-footer { flex-wrap: wrap; }
  .btn-wa, .btn-cart { flex: 1; justify-content: center; }
}

@media (max-width: 576px) {
  .hero-stats { gap: 1.25rem; }
  .hero-stat-num { font-size: 1.5rem; }
}
