/* ─── Top Bar ─── */
.topbar {
  background: linear-gradient(90deg, var(--color-green-dark), var(--color-green));
  color: white;
  font-size: var(--text-xs);
  font-weight: 500;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.topbar__info {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.topbar__info span {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.topbar__info svg,
.topbar__info i {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  font-size: 12px;
}

.topbar__links {
  display: flex;
  gap: var(--space-4);
}

.topbar__links a {
  opacity: 0.9;
}

.topbar__links a:hover {
  opacity: 1;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}

.lang-switcher__btn {
  min-width: 32px;
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
  transition: all var(--transition-fast);
}

.lang-switcher__btn:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.lang-switcher__btn.is-active {
  background-color: white;
  color: var(--color-green-dark);
}

/* ─── Header ─── */
.header {
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-6);
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__name {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo__name-accent {
  color: var(--color-brand);
}

.logo__tagline {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-green);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-bar {
  position: relative;
  max-width: 520px;
  width: 100%;
  margin-inline: auto;
}

.search-bar__input {
  width: 100%;
  height: 42px;
  padding: 0 76px 0 42px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  background-color: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-bar__input:focus {
  border-color: var(--color-brand);
  background-color: white;
}

.search-bar__input::placeholder {
  color: var(--color-text-muted);
}

.search-bar__icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
}

.search-bar__btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  height: 34px;
  padding: 0 var(--space-4);
  background-color: var(--color-brand);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
}

.header__nav-inline { display: none; }

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-secondary);
  min-width: 52px;
}

.header__action svg {
  width: 22px;
  height: 22px;
}

.header__action--cart {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background-color: var(--color-brand);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* ─── Category Nav ─── */
.nav {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
}

.nav__list {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  overflow-x: auto;
  scrollbar-width: none;
  gap: var(--space-1);
}

.nav__list::-webkit-scrollbar { display: none; }

.nav__link {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.nav__link.is-active {
  background-color: var(--color-green-light);
  color: var(--color-green-dark);
}

.nav__link--hot {
  background-color: var(--color-brand-light);
  color: var(--color-brand);
}

.nav__link--hot.is-active {
  background-color: var(--color-brand);
  color: white;
}

.nav__link--hot i {
  font-size: 11px;
  color: var(--color-brand);
}

.nav__link--hot.is-active i,
.nav__link--hot:hover i {
  color: inherit;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.time-slot {
  padding: var(--space-3) var(--space-2);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  background-color: white;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
}

.time-slot.is-active {
  border-color: var(--color-green);
  background-color: var(--color-green-light);
  color: var(--color-green-dark);
}

.time-slot.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 44px;
  padding: 0 var(--space-6);
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.btn--brand {
  background-color: var(--color-brand);
  color: white;
}

.btn--brand:hover {
  background-color: var(--color-brand-dark);
}

.btn--green {
  background-color: var(--color-green);
  color: white;
}

.btn--green:hover {
  background-color: var(--color-green-dark);
}

.btn--outline {
  background-color: white;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn--lg {
  height: 50px;
  padding: 0 var(--space-8);
  font-size: var(--text-base);
}

.btn--sm {
  height: 34px;
  padding: 0 var(--space-4);
  font-size: var(--text-xs);
}

.btn--block { width: 100%; }

/* legacy aliases */
.btn--primary { background-color: var(--color-brand); color: white; }
.btn--primary:hover { background-color: var(--color-brand-dark); }
.btn--accent { background-color: var(--color-brand); color: white; }
.btn--gold { background-color: var(--color-brand); color: white; }
.btn--outline-light { background: rgba(255,255,255,0.15); color: white; border: 2px solid rgba(255,255,255,0.5); }

/* ─── Product Card ─── */
.product-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card__image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--color-surface-alt);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-1) var(--space-3);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background-color: var(--color-brand);
  color: white;
}

.product-card__badge--new {
  background-color: var(--color-green);
}

.product-card__badge--sale {
  background-color: var(--color-pink);
}

.product-card__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__category {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}

.product-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.product-card__stars {
  display: flex;
  gap: 1px;
  color: var(--color-star);
}

.product-card__stars i {
  font-size: 11px;
}

.product-card__stars svg {
  width: 13px;
  height: 13px;
}

.product-card__review-count {
  font-size: 11px;
  color: var(--color-text-muted);
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.product-card__price-current {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-brand);
}

.product-card__price-old {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.product-card__delivery {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-green);
  margin-top: var(--space-2);
}

.product-card__delivery i {
  font-size: 12px;
}

/* ─── Category Card ─── */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  padding-bottom: var(--space-4);
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-surface-alt);
}

.category-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.category-card:hover .category-card__image img {
  transform: scale(1.05);
}

.category-card__name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  padding-inline: var(--space-1);
}

.category-card__count {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* ─── Trust ─── */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.trust-item__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-item__icon--green { background-color: var(--color-green-light); color: var(--color-green); }
.trust-item__icon--orange { background-color: var(--color-brand-light); color: var(--color-brand); }
.trust-item__icon--pink { background-color: var(--color-pink-light); color: var(--color-pink); }
.trust-item__icon--blue { background-color: var(--color-blue-light); color: var(--color-blue); }

.trust-item__icon i {
  font-size: 20px;
}

.trust-item__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.trust-item__text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ─── Breadcrumb ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-block: var(--space-4);
}

.breadcrumb a { color: var(--color-text-secondary); }
.breadcrumb a:hover { color: var(--color-brand); }
.breadcrumb__sep { color: var(--color-border); }
.breadcrumb__current { color: var(--color-text); font-weight: 600; }

/* ─── Forms ─── */
.form-group { margin-bottom: var(--space-4); }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-label--required::after {
  content: " *";
  color: var(--color-brand);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-brand);
}

.form-textarea {
  height: auto;
  min-height: 90px;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ─── Footer ─── */
.footer {
  margin-top: auto;
}

.footer__trust {
  background: linear-gradient(90deg, var(--color-green-dark) 0%, var(--color-green) 100%);
  padding: var(--space-4) 0;
}

.footer__trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.footer-trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: white;
  font-size: var(--text-sm);
  font-weight: 600;
}

.footer-trust-item i {
  font-size: 16px;
  opacity: 0.9;
}

.footer__main {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
  padding: var(--space-10) 0 var(--space-8);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  gap: var(--space-6);
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-4);
}

.footer__logo .logo__name {
  display: block;
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
}

.footer__tagline {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer__brand p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
  max-width: 300px;
}

.footer__social {
  display: flex;
  gap: var(--space-2);
}

.footer__social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.footer__social a:hover {
  background-color: var(--color-brand);
  border-color: var(--color-brand);
  color: white;
}

.footer__social i {
  font-size: 15px;
}

.footer__heading {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  position: relative;
  padding-bottom: var(--space-2);
}

.footer__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 3px;
  border-radius: var(--radius-full);
  background-color: var(--color-brand);
}

.footer__links li {
  margin-bottom: var(--space-2);
}

.footer__links a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--color-brand);
}

.footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.footer__contact i {
  width: 16px;
  color: var(--color-brand);
  margin-top: 3px;
  flex-shrink: 0;
  text-align: center;
}

.footer__contact a {
  color: inherit;
}

.footer__contact a:hover {
  color: var(--color-brand);
}

.footer__bottom {
  background-color: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}

.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer__payments {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.footer__payment-badge {
  padding: var(--space-1) var(--space-3);
  background-color: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.footer__payment-badge--secure {
  color: var(--color-green-dark);
  border-color: var(--color-green-light);
  background-color: var(--color-green-light);
}

.footer__payment-badge--secure i {
  font-size: 9px;
  margin-right: 2px;
}

/* ─── Floating Contact ─── */
.float-contact {
  position: fixed;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.float-contact__btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.float-contact__btn:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

.float-contact__btn--whatsapp {
  background-color: #25d366;
}

.float-contact__btn--phone {
  background-color: var(--color-brand);
}

.float-contact__btn--instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  color: var(--color-text);
}

.mobile-toggle svg {
  width: 22px;
  height: 22px;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open::before {
  content: '';
  position: fixed;
  inset: 0;
  top: calc(var(--topbar-height) + var(--header-height));
  background-color: rgba(15, 23, 42, 0.45);
  z-index: 98;
}

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__trust-inner { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topbar__links { display: none; }
  .lang-switcher__btn[data-lang="zh"] { display: none; }

  .header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
  }

  .logo {
    min-width: 0;
    flex: 1;
  }

  .logo__name {
    font-size: var(--text-lg);
    white-space: nowrap;
  }

  .search-bar { display: none; }

  .logo__tagline { display: none; }

  .header__actions {
    flex-shrink: 0;
    margin-left: auto;
    gap: 0;
  }

  .header__action {
    min-width: 40px;
    padding: var(--space-2);
  }

  .header__action span { display: none; }

  .mobile-toggle {
    display: flex;
    margin-left: var(--space-1);
  }

  .nav {
    display: block;
    position: fixed;
    top: calc(var(--topbar-height) + var(--header-height));
    left: 0;
    right: 0;
    z-index: 99;
    max-height: calc(100dvh - var(--topbar-height) - var(--header-height));
    overflow-y: auto;
    border-bottom: none;
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav .nav__list {
    flex-direction: column;
    height: auto;
    padding: var(--space-2) 0 var(--space-3);
    align-items: stretch;
    gap: 0;
  }

  .nav .nav__link {
    height: 44px;
    border-radius: 0;
    padding-left: var(--space-4);
  }

  .form-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__trust-inner { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .footer-trust-item { font-size: var(--text-xs); }
  .footer__bottom-inner { flex-direction: column; text-align: center; }
  .trust-grid { grid-template-columns: 1fr; }

  .float-contact {
    top: auto;
    bottom: var(--space-4);
    transform: none;
    right: var(--space-3);
  }

  .float-contact__btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}
