:root {
  --bg-page: #FFFFFF;
  --bg-outer: #F2F2EE;
  --surface: #EAEAE6;
  --surface-hover: #E1E1DC;
  --accent-mint: #9CF6C8;
  --accent-mint-hover: #86EBB8;
  --accent-purple: #6E1385;
  --text-primary: #1C1E21;
  --text-muted: #5F6368;
  --border-subtle: #D2D2CC;
  --danger: #D93025;
  --radius-card: 22px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-outer);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

button,
input,
select {
  font-family: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

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

/* Mobile-first App Shell */
.app-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg-page);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(28, 30, 33, 0.06);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 20px;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: -6px;
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  transition: background-color 0.15s ease;
}

.back-btn:hover {
  background-color: var(--surface);
}

.brand-logo {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.025em;
  line-height: 1;
  color: var(--text-primary);
  text-transform: uppercase;
  padding-top: 2px;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  transition: background-color 0.15s ease;
}

.cart-btn:hover {
  background-color: var(--surface);
}

.cart-badge {
  position: absolute;
  top: 4px;
  left: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background-color: var(--accent-mint);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(28, 30, 33, 0.14);
}

.cart-badge.is-hidden {
  display: none;
}

/* Main Content */
.app-main {
  flex: 1;
  padding: 6px 18px 32px;
  display: flex;
  flex-direction: column;
}

/* Home View */
.home-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.featured-banner {
  position: relative;
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: #1C1E21;
  cursor: pointer;
  min-height: 162px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 20px;
  text-align: left;
  transition: transform 0.16s ease;
}

.featured-banner:active {
  transform: scale(0.985);
}

.featured-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.featured-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 30, 33, 0.15) 0%, rgba(28, 30, 33, 0.68) 58%, rgba(28, 30, 33, 0.84) 100%);
  z-index: 1;
}

.featured-banner-content {
  position: relative;
  z-index: 2;
  width: 56%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.featured-banner-title {
  color: #FFFFFF;
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.featured-banner-kicker {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.featured-banner-main {
  display: block;
  font-size: 23px;
  font-weight: 800;
}

/* 2-Column Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.product-card {
  background-color: var(--surface);
  border-radius: var(--radius-card);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.product-card:hover {
  background-color: var(--surface-hover);
}

.product-card:active {
  transform: scale(0.975);
}

.product-card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Price Pill + Plus */
.price-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background-color: #FFFFFF;
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 6px 7px 6px 14px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(28, 30, 33, 0.06);
  white-space: nowrap;
}

.plus-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  border: 1.6px solid var(--text-primary);
  flex-shrink: 0;
}

/* Bottom Full-Width Banner Card */
.product-banner-card {
  width: 100%;
  min-height: 148px;
  overflow: hidden;
  background-color: var(--surface);
  border-radius: var(--radius-card);
  padding: 0 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.product-banner-card:hover {
  background-color: var(--surface-hover);
}

.product-banner-card:active {
  transform: scale(0.985);
}

.product-banner-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  padding: 20px 0;
}

.product-banner-title {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-primary);
}

.product-banner-title strong {
  font-weight: 800;
}

.product-banner-img-wrap {
  width: 184px;
  height: 146px;
  align-self: flex-end;
  margin-top: 8px;
  margin-right: -6px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
}

.product-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Product Detail Drawer (Bottom Sheet) */
@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drawerSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.drawer-backdrop {
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background-color: rgba(28, 30, 33, 0.2);
  z-index: 25;
  display: flex;
  align-items: flex-end;
  transition: opacity 0.2s ease;
}

.drawer-backdrop.is-entering {
  animation: backdropFadeIn 0.22s ease forwards;
}

.drawer-backdrop.is-closing {
  opacity: 0;
  pointer-events: none;
}

.detail-card {
  width: 100%;
  min-height: 80vh;
  min-height: 80dvh;
  max-height: calc(100dvh - 76px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 20px 18px calc(44px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 30px rgba(28, 30, 33, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: transform 0.22s cubic-bezier(0.4, 0, 1, 1);
}

.detail-card.is-entering {
  animation: drawerSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.drawer-backdrop.is-closing .detail-card {
  transform: translateY(100%);
}

.detail-img-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 0;
}

.detail-img {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
}

.detail-banner-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
}

.detail-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
}

.mint-price-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-mint);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 6px 18px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

/* Cuota Info Row */
.cuota-meta-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 4px 4px 0;
}

.cuota-includes {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.5;
}

.cuota-includes-title {
  font-weight: 600;
  margin: 0 0 2px;
}

.cuota-includes-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Select Dropdown */
.field-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  padding-left: 4px;
}

.select-wrap {
  position: relative;
  width: 100%;
}

.select-input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: #FFFFFF;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  padding: 13px 44px 13px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.select-input:focus {
  border-color: var(--text-primary);
}

.select-chevron {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-primary);
}

/* Size Selector */
.sizes-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.size-pill {
  height: 36px;
  border-radius: var(--radius-pill);
  background-color: #FFFFFF;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.size-pill:hover {
  background-color: #F7F7F5;
}

.size-pill.is-selected {
  background-color: var(--accent-mint);
}

/* Add to Cart Button & Feedback */
.add-to-cart-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 24px;
}

.btn-add-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #FFFFFF;
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(28, 30, 33, 0.06);
  transition: transform 0.14s ease, background-color 0.14s ease;
}

.btn-add-cart:hover {
  background-color: #F7F7F5;
}

.btn-add-cart:active {
  transform: scale(0.97);
}

.added-banner {
  width: 100%;
  background-color: var(--accent-mint);
  color: var(--text-primary);
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  transition: background-color 0.15s ease, transform 0.14s ease;
}

.added-banner:hover {
  background-color: var(--accent-mint-hover);
}

.added-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.added-banner-text {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.go-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 4px 8px;
}

/* Cart / Checkout View */
.cart-view {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.divider {
  width: 100%;
  height: 1px;
  background-color: #C8C8C4;
  border: none;
  margin: 4px 0 18px;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-item-thumb {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  background-color: var(--surface);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.cart-item-thumb.is-cover {
  padding: 0;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-thumb.is-cover img {
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.cart-item-variant {
  margin: 0 0 2px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.cart-item-meta {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
}

.cart-item-meta strong {
  font-weight: 800;
}

.trash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.trash-btn:hover {
  background-color: #FDECEA;
  color: var(--danger);
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 18px;
  font-size: 16px;
}

.cart-total-label {
  font-weight: 600;
  color: var(--text-muted);
}

.cart-total-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.text-input {
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1.5px solid #9A9CA0;
  background-color: #FFFFFF;
  padding: 14px 20px;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(156, 246, 200, 0.45);
}

.text-input.is-error {
  border-color: var(--danger);
}

.form-error {
  margin: 2px 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  min-height: 18px;
}

.checkout-footer {
  margin-top: auto;
  padding-top: 28px;
}

.btn-confirm-order {
  width: 100%;
  background-color: var(--accent-mint);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 0.15s ease, transform 0.14s ease, opacity 0.15s ease;
}

.btn-confirm-order:hover:not(:disabled) {
  background-color: var(--accent-mint-hover);
}

.btn-confirm-order:active:not(:disabled) {
  transform: scale(0.985);
}

.btn-confirm-order:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Empty Cart */
.empty-cart {
  text-align: center;
  padding: 48px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.empty-cart p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.btn-secondary-pill {
  background-color: var(--surface);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
}

/* Confirmation View */
.confirmation-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 20px 48px;
  gap: 24px;
}

.confirmation-illustration {
  width: 210px;
  max-width: 72%;
  height: auto;
}

.confirmation-text {
  margin: 0;
  max-width: 300px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--text-primary);
}

.confirmation-text strong {
  font-weight: 800;
}
