* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f8f4ea;
  color: #1f2d20;
}

.hero {
  min-height: 80vh;
  background: linear-gradient(120deg, rgba(248,244,234,0.96), rgba(222,235,205,0.88)), radial-gradient(circle at 80% 20%, #b7d68a, transparent 35%);
  padding: 24px 7%;
}

.navbar { display: flex; justify-content: space-between; align-items: center; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 22px; }

.logo { width: 52px; height: 52px; object-fit: contain; border-radius: 50%; }

.logo-placeholder {
  width: 52px; height: 52px; background: white; border-radius: 50%;
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.nav-link, .main-btn, .secondary-btn {
  text-decoration: none; background: #245c37; color: white; padding: 13px 22px;
  border-radius: 999px; font-weight: 800; display: inline-block; border: none; cursor: pointer;
}

.nav-link { background: white; color: #245c37; }

.hero-content { display: grid; align-items: center; min-height: 62vh; max-width: 790px; }

.eyebrow { color: #597b36; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; }

h1 { font-size: clamp(42px, 7vw, 76px); margin: 10px 0; line-height: 0.95; }

.hero-text { font-size: 20px; line-height: 1.7; max-width: 650px; color: #4b5b49; }

.how, .menu-section, .cart-section { padding: 70px 7%; text-align: center; }

h2 { font-size: clamp(30px, 4vw, 48px); margin: 0 0 12px; }

.section-subtitle { color: #64715f; margin-bottom: 36px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 35px; }

.step-card, .drink-card, .success-card, .cart-box, .admin-item {
  background: rgba(255,255,255,0.84); border: 1px solid rgba(36,92,55,0.1);
  border-radius: 28px; box-shadow: 0 18px 45px rgba(30, 60, 35, 0.08);
}

.step-card { padding: 28px; }

.step-card span {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  background: #dfeecb; color: #245c37; border-radius: 50%; font-weight: 900;
}

.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; text-align: left; }

.drink-card { overflow: hidden; }

.drink-image-wrap {
  height: 240px;
  background: #dfeecb;
}

.drink-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
  padding: 10px;
}

.drink-placeholder { height: 100%; display: grid; place-items: center; font-size: 70px; }

.drink-info { padding: 24px; }

.drink-info h3 { margin: 0 0 8px; font-size: 24px; }

.drink-info p { color: #60705d; min-height: 48px; }

.mini-form, .checkout-form, .outside-form { display: grid; gap: 10px; }

label { font-weight: 900; font-size: 14px; color: #2d412c; text-align: left; }

input, select, textarea {
  width: 100%; padding: 13px 14px; border: 1px solid #d9dfd2;
  border-radius: 15px; font-size: 15px; background: white;
}

button {
  background: #245c37; color: white; border: 0; border-radius: 999px;
  padding: 14px 20px; font-weight: 900; cursor: pointer;
}

.cart-box { max-width: 850px; margin: 0 auto; padding: 28px; text-align: left; }

.empty-cart { text-align: center; color: #64715f; }

.cart-item {
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid #e1e6da;
}

.cart-item p { margin: 6px 0 0; color: #64715f; }

.cart-actions { display: flex; align-items: center; gap: 10px; }

.cart-actions input { width: 75px; }

.cart-actions button { background: #f2dada; color: #8e2828; padding: 10px 14px; }

.cart-total, .receipt-total {
  display: flex; justify-content: space-between; font-size: 22px; font-weight: 900; margin: 20px 0;
}

.checkout-form { margin-top: 24px; }

footer { padding: 26px 7%; text-align: center; color: #6a7567; }

.simple-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

.success-card { width: min(650px, 100%); padding: 36px; text-align: center; }

.success-card h1 { font-size: 42px; }

.order-code {
  font-size: 30px; font-weight: 900; background: #dfeecb; color: #245c37;
  padding: 16px; border-radius: 18px; margin: 20px 0; letter-spacing: 3px;
}

.receipt { text-align: left; background: #fbfcf7; border-radius: 22px; padding: 20px; margin: 20px 0; }

.receipt-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e1e6da; }

.small-note { color: #64715f; }

.text-link { display: block; margin-top: 18px; color: #245c37; font-weight: 900; }

.admin-body { padding: 28px 7%; }

.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }

.admin-header h1 { font-size: 44px; }

.admin-link { color: #245c37; font-weight: 900; margin-left: 12px; }

.admin-link.danger { color: #a23232; }

.admin-form { display: grid; gap: 24px; }

.admin-item { padding: 28px; }

.admin-item h2 { font-size: 26px; text-align: left; }

.admin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.save-btn, .secondary-admin-btn { width: fit-content; padding: 15px 24px; }

.secondary-admin-btn { background: #e5efd7; color: #245c37; }

.error { color: #a23232; font-weight: 900; }

@media (max-width: 950px) {
  .steps, .menu-grid { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 1fr; }
  .cart-actions { flex-wrap: wrap; }
  .navbar { gap: 12px; }
  .brand { font-size: 18px; }
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card,
.admin-panel {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(36,92,55,0.1);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(30, 60, 35, 0.08);
}

.stat-card {
  padding: 24px;
}

.stat-card span {
  display: block;
  color: #60705d;
  font-weight: 800;
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 34px;
  color: #245c37;
}

.admin-panel {
  padding: 24px;
  margin-bottom: 24px;
}

.admin-panel h2 {
  text-align: left;
  font-size: 26px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 16px;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid #e1e6da;
  text-align: left;
}

.admin-table th {
  background: #edf5df;
  color: #245c37;
}

@media (max-width: 950px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
/* Cups + best seller dashboard update */
.stats-grid-four {
  grid-template-columns: repeat(4, 1fr);
}

.best-seller-panel {
  background: linear-gradient(135deg, #edf5df, #ffffff);
}

.best-seller-panel p {
  font-size: 22px;
  font-weight: 900;
  color: #245c37;
  margin: 8px 0 0;
}

@media (max-width: 1100px) {
  .stats-grid-four {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .stats-grid-four {
    grid-template-columns: 1fr;
  }
}

/* Loyalty account/profile system */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.account-section { padding: 70px 7%; text-align: center; background: #eef6df; }
.account-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 920px; margin: 0 auto; text-align: left; }
.account-card { background: rgba(255,255,255,0.9); border: 1px solid rgba(36,92,55,0.12); border-radius: 28px; box-shadow: 0 18px 45px rgba(30,60,35,0.08); padding: 28px; display: grid; gap: 12px; }
.account-card h3 { margin: 0 0 8px; font-size: 26px; }
.logged-in-card { max-width: 1080px; margin: 0 auto; grid-template-columns: 1.2fr 1.4fr .8fr auto; align-items: center; text-align: left; }
.stamp-box strong, .free-box strong { display: block; font-size: 34px; color: #245c37; }
.stamp-box span, .free-box span { color: #60705d; font-weight: 800; }
.stamp-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.stamp { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #edf1e8; filter: grayscale(1); opacity: .45; }
.stamp.filled { background: #dfeecb; filter: none; opacity: 1; }
.account-message { max-width: 820px; margin: 0 auto 20px; padding: 14px 18px; border-radius: 18px; font-weight: 900; }
.account-message.success { background: #dfeecb; color: #245c37; }
.account-message.error, .login-warning { background: #f2dada; color: #8e2828; }
.login-warning { padding: 14px 18px; border-radius: 18px; font-weight: 900; text-align: center; margin-bottom: 12px; }
.loyalty-checkout { background: #edf5df; border: 1px solid #d9e8c7; border-radius: 20px; padding: 18px; display: grid; gap: 8px; margin-bottom: 14px; }
.loyalty-checkout span { color: #60705d; font-weight: 800; }
.checkbox-line { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.checkbox-line input { width: auto; }
.free-line { color: #245c37; font-weight: 900; }
.account-page-body { background: #f6f2e8; color: #1d2b1f; min-height: 100vh; }
.account-topbar { width: min(1180px, 92%); margin: 0 auto; padding: 22px 0; display: flex; justify-content: space-between; align-items: center; }
.back-link { color: #245c37; font-weight: 900; text-decoration: none; }
.mini-brand { justify-content: flex-end; }
.account-page { width: min(1100px, 92%); margin: 0 auto; padding: 20px 0 70px; }
.account-hero-card, .profile-card { background: rgba(255,255,255,0.9); border: 1px solid rgba(36,92,55,0.12); border-radius: 32px; box-shadow: 0 18px 45px rgba(30,60,35,0.08); padding: 34px; margin-bottom: 24px; }
.account-hero-card h1, .profile-main h1 { font-size: clamp(36px, 6vw, 70px); margin: 0 0 10px; color: #1d2b1f; line-height: .95; }
.account-hero-card p, .profile-main p { color: #60705d; font-weight: 800; }
.account-grid-page { max-width: none; }
.profile-card { display: grid; gap: 22px; }
.profile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.profile-stat { background: #edf5df; border: 1px solid #d9e8c7; border-radius: 24px; padding: 22px; }
.profile-stat strong { display: block; font-size: 38px; color: #245c37; }
.profile-stat span { color: #60705d; font-weight: 900; }
.big-stamps .stamp { width: 48px; height: 48px; font-size: 24px; }
.profile-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.profile-actions form { margin: 0; }
@media (max-width: 950px) { .account-grid, .logged-in-card { grid-template-columns: 1fr; } .nav-actions { flex-wrap: wrap; justify-content: flex-end; } }
@media (max-width: 800px) { .account-topbar { align-items: flex-start; gap: 12px; flex-direction: column; } .profile-stats { grid-template-columns: 1fr; } .account-hero-card, .profile-card { padding: 24px; } }

/* Sales report served/sold/free cards */
.stats-grid-five {
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 1250px) {
  .stats-grid-five { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .stats-grid-five { grid-template-columns: 1fr; }
}


/* Checkout loading / duplicate-click protection */
.checkout-form button[disabled] {
  opacity: .75;
  cursor: not-allowed;
}
.checkout-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(29, 43, 31, .64);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.checkout-loading-overlay.show {
  display: flex;
}
.checkout-loading-card {
  width: min(420px, 92vw);
  background: #fffaf0;
  color: #1d2b1f;
  border-radius: 28px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
  border: 1px solid rgba(36,92,55,.14);
}
.checkout-loading-card h3 {
  margin: 12px 0 8px;
  font-size: 24px;
}
.checkout-loading-card p {
  margin: 0;
  color: #60705d;
  font-weight: 800;
}
.checkout-spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  border: 6px solid #dfe8d1;
  border-top-color: #245c37;
  animation: checkoutSpin .8s linear infinite;
}
@keyframes checkoutSpin {
  to { transform: rotate(360deg); }
}
