@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Brand Color System & Tokens --- */
:root {
  --color-cream: #F3EBD8;
  --color-matcha: #B6BB79;
  --color-matcha-dark: #4E5B35;
  --color-pink-soft: #F9D0CE;
  --color-pink-deep: #F297A0;
  --color-white: #FFFFFF;
  --color-gray-light: #F7F5F0;
  --color-gray-text: #7C8B6B;

  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Inter', sans-serif;

  --shadow-soft: 0 8px 24px rgba(78, 91, 53, 0.05);
  --shadow-card: 0 4px 16px rgba(78, 91, 53, 0.04);
  --shadow-active: 0 12px 32px rgba(78, 91, 53, 0.08);

  --radius-screen: 36px;
  --radius-card: 28px;
  --radius-pill: 99px;

  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Global Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-cream);
  color: var(--color-matcha-dark);
  font-family: var(--font-body);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Full-Width Web Application Container */
.app-shell {
  width: 100%;
  min-height: 100vh;
  background-color: var(--color-cream);
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Screen Wrapper */
.app-screen {
  display: none;
  width: 100%;
  min-height: 100vh;
  background-color: var(--color-cream);
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.app-screen.active {
  display: flex;
  opacity: 1;
}

/* Header Bar */
.app-header-bar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-cream);
  z-index: 100;
}

.mini-brand-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-matcha-dark);
}

.brand-badge-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mini-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--color-matcha-dark);
  letter-spacing: -0.01em;
}

.icon-btn-header {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--color-matcha-dark);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 101;
}

.icon-btn-header:hover {
  background-color: rgba(78, 91, 53, 0.08);
}

.header-center-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-matcha-dark);
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: var(--color-pink-deep);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Screen Content Area */
.screen-content {
  flex: 1;
  padding: 12px 24px 100px;
}

/* --- HOME SCREEN --- */
.greeting-hero h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-matcha-dark);
  margin-top: 8px;
  margin-bottom: 24px;
}

/* 2x2 Category Cards Grid */
.ref-category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.ref-cat-card {
  background-color: #E3E8C4;
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-card);
}

.ref-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-active);
}

.ref-cat-img-bg {
  height: 120px;
  background-color: var(--color-white);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}

.cat-real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-cat-card h2 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-matcha-dark);
  margin-bottom: 6px;
}

.ref-cat-card p {
  font-size: 11px;
  color: var(--color-gray-text);
  line-height: 1.4;
}

/* Bottom Pill Navigation Bar */
.ref-bottom-pill-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  height: 60px;
  background-color: #E3E8C4;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 12px;
  box-shadow: 0 8px 30px rgba(78, 91, 53, 0.15);
  z-index: 1000;
}

.ref-nav-item {
  color: var(--color-matcha-dark);
  font-size: 18px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 44px;
  height: 44px;
}

.pill-active-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-matcha-dark);
  color: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(78, 91, 53, 0.2);
}

/* --- MENU CATALOG --- */
.cat-tabs-scroll-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.cat-tabs-scroll-bar::-webkit-scrollbar {
  display: none;
}

.cat-pill-tab {
  background-color: var(--color-white);
  border: 1px solid rgba(78, 91, 53, 0.15);
  color: var(--color-matcha-dark);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.cat-pill-tab:hover {
  background-color: var(--color-pink-soft);
}

.cat-pill-tab.active {
  background-color: var(--color-matcha-dark);
  color: var(--color-cream);
  border-color: var(--color-matcha-dark);
}

.ref-search-wrapper {
  background-color: #E3E8C4;
  border-radius: var(--radius-pill);
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.search-leading-icon {
  color: var(--color-matcha-dark);
  opacity: 0.6;
  font-size: 14px;
}

.ref-search-wrapper input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-matcha-dark);
}

.mic-icon-btn {
  background: none;
  border: none;
  color: var(--color-matcha-dark);
  font-size: 14px;
  cursor: pointer;
  opacity: 0.7;
}

/* Drinks List Cards */
.ref-drinks-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ref-drink-card {
  background-color: var(--color-white);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: var(--transition-fast);
}

.ref-drink-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-active);
}

.drink-img-box {
  width: 75px;
  height: 85px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
}

.real-drink-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drink-info-box {
  flex: 1;
}

.drink-name-txt {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-matcha-dark);
  margin-bottom: 4px;
}

.drink-desc-txt {
  font-size: 12px;
  color: var(--color-gray-text);
  line-height: 1.35;
  margin-bottom: 10px;
}

.drink-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drink-price-txt {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-pink-deep);
}

.size-pills-group {
  display: flex;
  gap: 6px;
}

.size-pill {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--color-gray-light);
  color: var(--color-matcha-dark);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.size-pill.active {
  background-color: var(--color-matcha-dark);
  color: var(--color-cream);
}

/* --- SHOPPING CART --- */
.ref-shipping-card {
  background-color: var(--color-white);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.shipping-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-matcha-dark);
  margin-bottom: 10px;
}

.truck-icon {
  font-size: 16px;
}

.shipping-bar-bg {
  height: 8px;
  background-color: #EAE6D9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.shipping-bar-fill {
  height: 100%;
  background-color: var(--color-matcha);
  border-radius: 4px;
}

.shipping-subtext {
  font-size: 11px;
  color: var(--color-gray-text);
  text-align: right;
}

.ref-cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.ref-cart-card {
  background-color: var(--color-white);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-card);
  position: relative;
}

.ref-cart-img {
  width: 65px;
  height: 75px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.real-drink-img-cart {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-cart-details {
  flex: 1;
}

.ref-cart-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.ref-cart-meta {
  font-size: 12px;
  color: var(--color-pink-deep);
  margin-bottom: 8px;
}

.ref-cart-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ref-cart-price {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-pink-deep);
}

.ref-qty-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--color-gray-light);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}

.ref-qty-btn {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-matcha-dark);
  cursor: pointer;
}

.ref-qty-val {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
}

.ref-cart-trash-btn {
  background: none;
  border: none;
  color: var(--color-gray-text);
  font-size: 14px;
  cursor: pointer;
}

.ref-summary-card {
  background-color: var(--color-white);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.ref-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--color-matcha-dark);
  margin-bottom: 10px;
}

.ref-summary-row.total-row {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-top: 14px;
  margin-bottom: 0;
}

.pink-total-text {
  color: var(--color-pink-deep);
}

/* Payment Tabs */
.ref-payment-section {
  background-color: #F8F3EA;
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.payment-section-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.payment-tabs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.payment-tab {
  background-color: var(--color-white);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 6px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-matcha-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.payment-tab.active {
  border-color: var(--color-matcha-dark);
  box-shadow: var(--shadow-soft);
}

/* Clean Pink CTA Button (Non-stretched, sleek) */
.btn-pink-cta {
  background-color: var(--color-pink-deep);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-pill);
  height: 50px;
  padding: 0 32px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(242, 151, 160, 0.4);
  transition: var(--transition-fast);
}

.btn-pink-cta:hover {
  transform: translateY(-2px);
  background-color: #e2838c;
}

/* PRODUCT DETAIL SCREEN */
.detail-hero-graphic {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 16px;
}

.detail-real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-card);
}

.detail-card-panel {
  background-color: var(--color-white);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.detail-card-panel h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-price {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-pink-deep);
  margin-bottom: 12px;
}

.detail-desc {
  font-size: 13px;
  color: var(--color-gray-text);
  line-height: 1.45;
  margin-bottom: 20px;
}

.detail-option-label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.pill-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.pill-opt {
  background-color: var(--color-gray-light);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 10px;
  font-family: var(--font-heading);
  font-size: 13px;
  cursor: pointer;
}

.pill-opt.active {
  background-color: var(--color-matcha-dark);
  color: var(--color-cream);
}

.detail-bottom-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.qty-stepper-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background-color: var(--color-gray-light);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
}

.qty-stepper-box .qty-btn {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.qty-stepper-box .qty-val {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
}

/* Map Widget */
.map-widget {
  height: 240px;
  background-color: #E2DAC5;
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
}

.road-v { width: 36px; height: 100%; left: 45%; position: absolute; background: #FAF6ED; }
.road-h { height: 36px; width: 100%; top: 50%; position: absolute; background: #FAF6ED; }
.marker-dest { position: absolute; top: 20%; left: 45%; color: var(--color-pink-deep); font-size: 24px; }
.marker-courier { position: absolute; top: 50%; left: 45%; color: var(--color-matcha-dark); font-size: 20px; animation: moveRider 6s infinite alternate; }

@keyframes moveRider {
  0% { top: 70%; }
  100% { top: 30%; }
}

.ref-card-box {
  background-color: var(--color-white);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.box-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ref-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(78, 91, 53, 0.2);
  border-radius: 14px;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
}

.timeline-stepper {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step { display: flex; align-items: center; gap: 12px; font-family: var(--font-heading); font-size: 14px; }
.dot { width: 24px; height: 24px; border-radius: 50%; background: #ddd; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.step.completed .dot { background: var(--color-matcha); color: white; }
.step.active .dot { background: var(--color-pink-deep); color: white; }

.text-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.profile-avatar-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--color-matcha);
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.ref-card-box h2 {
  text-align: center;
  margin: 0 auto;
}

.member-tag {
  background: var(--color-matcha-dark);
  color: var(--color-cream);
  font-size: 12px;
  font-family: var(--font-heading);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin: 8px auto 0;
  text-align: center;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.stamp {
  height: 56px;
  background: var(--color-gray-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
}

.stamp.active { background: rgba(182, 187, 121, 0.3); }
.stamp.gift { background: var(--color-pink-soft); }

/* --- SLIDE-OVER SIDE DRAWER --- */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background-color: var(--color-cream);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.active .drawer-panel {
  transform: translateX(0);
}

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

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--color-matcha-dark);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  background-color: var(--color-white);
  color: var(--color-matcha-dark);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  transition: var(--transition-fast);
}

.drawer-item:hover {
  background-color: var(--color-matcha-dark);
  color: var(--color-cream);
  transform: translateX(4px);
}

.drawer-item i {
  font-size: 18px;
}

.drawer-footer-info {
  margin-top: auto;
  padding: 20px;
  background-color: rgba(78, 91, 53, 0.08);
  border-radius: 20px;
}

.drawer-tag {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  color: var(--color-matcha-dark);
  margin-bottom: 4px;
}

.drawer-footer-info p {
  font-size: 11px;
  color: var(--color-gray-text);
  line-height: 1.4;
}
@media (min-width: 769px) {
  .app-header-bar {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 0 32px;
    height: 72px;
  }

  .screen-content {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 32px 32px 120px;
  }

  .ref-category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  .ref-drinks-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  #screen-cart .screen-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
  }

  #screen-cart .ref-shipping-card {
    grid-column: 1 / -1;
  }

  .ref-bottom-pill-nav {
    width: 420px;
  }
}
