:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --text: #1a202c;
  --muted: #718096;
  --accent: #00c896;
  --accent-dark: #00a67d;
  --radius: 22px;
  --shadow: 0 8px 32px rgba(0,0,0,0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.bio-landing,
.bio-public {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.bio-card {
  width: min(100%, 430px);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}

.bio-pill {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 99px;
  background: #e6faf5;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

.bio-avatar {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: #e6faf5;
  display: grid;
  place-items: center;
  font-size: 36px;
  margin: 0 auto 12px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 8vw, 42px);
  line-height: 1;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.bio-muted {
  font-size: 13px;
}

.bio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 13px 18px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.store-page {
  min-height: 100vh;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 20px 18px 36px;
}

.store-hero {
  text-align: center;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 26px 20px;
  margin-bottom: 18px;
}

.store-pill {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e6faf5;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 10px;
}

.store-section-title {
  font-size: 15px;
  font-weight: 900;
  margin: 0 2px 12px;
}

.public-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.public-product-card {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}

.public-product-img {
  aspect-ratio: 1;
  background: #f7f9fc;
  display: grid;
  place-items: center;
  font-size: 42px;
}

.public-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-product-body {
  padding: 11px 12px 13px;
}

.public-product-body h2 {
  font-size: 13px;
  line-height: 1.25;
  margin: 0 0 5px;
}

.public-product-body p {
  font-size: 11px;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.public-product-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-end;
}

.public-product-bottom strong {
  color: var(--accent-dark);
  font-size: 15px;
}

.public-product-bottom span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.public-add-btn {
  width: 100%;
  margin-top: 10px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  padding: 10px 12px;
  cursor: pointer;
}

.public-add-btn.is-disabled {
  background: #e2e8f0;
  color: #718096;
  cursor: not-allowed;
}

.cart-fab {
  position: fixed;
  right: calc(50% - 195px);
  bottom: 22px;
  z-index: 80;
  border: 0;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 28px rgba(0,200,150,.35);
  padding: 14px 18px;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
}

@media (max-width: 430px) {
  .cart-fab {
    right: 18px;
  }
}

.cart-fab span {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  display: inline-grid;
  place-items: center;
  margin-left: 5px;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.42);
  display: none;
  align-items: flex-end;
  backdrop-filter: blur(2px);
}

.cart-overlay.open {
  display: flex;
}

.cart-drawer {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 0 0 calc(22px + env(safe-area-inset-bottom));
  max-height: 92vh;
  overflow-y: auto;
}

.cart-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  margin: 12px auto 18px;
}

.cart-title {
  font-size: 20px;
  font-weight: 900;
  padding: 0 20px 14px;
}

.cart-items {
  padding: 0 20px;
}

.cart-empty {
  background: #f7f9fc;
  color: #718096;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
}

.cart-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.cart-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f7f9fc;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

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

.cart-item-name {
  font-weight: 900;
  font-size: 14px;
}

.cart-item-price {
  color: #718096;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.cart-qty button {
  border: 0;
  border-radius: 9px;
  background: #f0f4f8;
  min-width: 28px;
  height: 28px;
  font-weight: 900;
  cursor: pointer;
}

.cart-qty .cart-remove {
  padding: 0 9px;
  color: #dc2626;
  background: #fee2e2;
  font-size: 11px;
}

.cart-line-total {
  font-weight: 900;
  font-size: 13px;
}

.cart-total-row {
  margin: 16px 0;
  padding: 14px 20px;
  background: #f7f9fc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-total-row span {
  color: #718096;
  font-weight: 800;
}

.cart-total-row strong {
  font-size: 22px;
}

.cart-form {
  padding: 0 20px;
}

.cart-form label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 12px 0 6px;
}

.cart-form input,
.cart-form textarea {
  width: 100%;
  border: 2px solid #e2e8f0;
  background: #f7f9fc;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.cart-form textarea {
  height: 76px;
  resize: none;
}

.cart-form input:focus,
.cart-form textarea:focus {
  border-color: var(--accent);
  background: #fff;
}

.cart-form button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 900;
  padding: 15px;
  margin-top: 14px;
  cursor: pointer;
}

.cart-form .cart-secondary {
  background: #f7f9fc;
  color: #1a202c;
  margin-top: 10px;
}

.cart-message {
  min-height: 20px;
  margin-top: 12px;
  color: #718096;
  font-size: 13px;
  font-weight: 800;
}

/* FASE 4B FIX */
.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%) translateY(12px);
  z-index: 220;
  width: calc(100% - 36px);
  max-width: 390px;
  border-radius: 16px;
  background: #1a202c;
  color: #fff;
  padding: 13px 16px;
  text-align: center;
  font-weight: 900;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
}

.cart-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* FASE 5 PUBLIC ACTIONS */
.store-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.bio-btn-secondary {
  background: #f0f4f8;
  color: #1a202c;
}

/* FASE 5B PUBLIC LOGO */
.store-hero-clean {
  padding-top: 18px;
}

.store-name-mini {
  font-size: 14px;
  font-weight: 900;
  color: #1a202c;
  line-height: 1.1;
  margin-bottom: 14px;
}

.store-logo-wrap {
  width: 100%;
  min-height: 80px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}

.store-logo-wrap img {
  display: block;
  max-width: min(100%, 320px);
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
}

.store-logo-fallback {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: #f7f9fc;
  display: grid;
  place-items: center;
  font-size: 36px;
  margin: 0 auto 14px;
}

/* FASE 7B LANDING / REGISTRO */
.bio-landing-pro {
  align-content: center;
  gap: 18px;
}

.landing-main-card {
  margin-bottom: 0;
}

.landing-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.plans-preview {
  width: min(100%, 430px);
  display: grid;
  gap: 10px;
}

.plans-preview article {
  background: #fff;
  border-radius: 18px;
  padding: 15px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}

.plans-preview article.is-featured {
  border: 2px solid var(--accent);
}

.plans-preview span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.plans-preview strong {
  display: block;
  font-size: 26px;
  margin-top: 2px;
}

.plans-preview p {
  margin: 4px 0 0;
  font-size: 13px;
}

.bio-register-page {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 22px 18px 34px;
}

.register-hero {
  text-align: center;
  margin-bottom: 16px;
}

.register-hero h1 {
  font-size: 36px;
}

.register-card {
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.10);
}

.register-card label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 14px 0 6px;
}

.register-card input,
.register-card select,
.register-card textarea {
  width: 100%;
  border: 2px solid #e2e8f0;
  background: #f7f9fc;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.register-card textarea {
  min-height: 80px;
  resize: none;
}

.register-card input:focus,
.register-card select:focus,
.register-card textarea:focus {
  border-color: var(--accent);
  background: #fff;
}

.slug-row {
  display: flex;
  align-items: center;
  background: #f7f9fc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}

.slug-row span {
  padding-left: 12px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.slug-row input {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding-left: 3px;
}

.register-card button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 900;
  padding: 15px;
  margin-top: 16px;
  cursor: pointer;
}

.register-message {
  min-height: 20px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.register-foot {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 18px;
}

.register-foot a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.hp-field {
  display: none !important;
}

/* FASE 9 ENTREGA */
.delivery-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.delivery-toggle label {
  margin: 0;
  background: #f7f9fc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: 0;
  color: #1a202c;
}

.delivery-toggle input {
  width: auto;
}

.delivery-fee-note {
  min-height: 18px;
  margin: 8px 0 0;
  color: #718096;
  font-size: 12px;
  font-weight: 800;
}

.cart-fee-row {
  display: flex;
  justify-content: space-between;
  background: #f7f9fc;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 900;
}

/* FASE 10 PWA */
.pwa-install-btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

@media (display-mode: standalone) {
  [data-pwa-install] {
    display: none !important;
  }
}
