/* Header and Footer Shared Styles */
:root {
  --bw-ink: #0e0e0e;
  --bw-sub: #4a4a4a;
  --bw-line: #e4e4e4;
  --bw-line-strong: #d8d8d8;
  --bw-bg: #f8f8f8;
  --bw-card: #ffffff;
  --bw-muted: #8a8a8a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bw-bg);
  color: var(--bw-ink);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 2px solid var(--bw-line-strong);
  z-index: 50;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  flex: 0 0 auto;
  color: #2a2a2a;
  font-size: 24px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background-color: #2a2a2a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
  font-size: 16px;
}

.searchbar {
  flex: 1;
  margin: 0 16px;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid var(--bw-line-strong);
  border-radius: 16px;
  padding: 0 14px;
}

.field input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 0;
  font-size: 16px;
}

.sicon {
  position: absolute;
  right: 14px;
}

.sicon svg {
  width: 20px;
  height: 20px;
  stroke: #666;
  stroke-width: 2;
  fill: none;
}

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

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  stroke: #444;
  stroke-width: 2;
  fill: none;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #000;
  color: #fff;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.2px;
  border: 2px solid #000;
  cursor: pointer;
  transition: transform 0.06s ease, filter 0.15s ease;
  font-size: 16px;
}

.btn-cart {
  background: #000;
  color: #fff;
}

.btn-buy {
  background: #fff;
  color: #000;
}

.btn:hover {
  filter: brightness(0.96);
}

.btn:active {
  transform: translateY(1px);
}

.nav-menu {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
}

.nav-link {
  color: var(--bw-ink);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.2px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #000;
}

/* Footer */
footer {
  background: var(--bw-bg);
  color: var(--bw-ink);
  padding: 48px 0 24px;
  border-top: 2px solid var(--bw-line-strong);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  font-weight: 900;
  font-size: 24px;
  margin-bottom: 8px;
}

.footer-desc {
  color: var(--bw-sub);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--bw-line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: #2a2a2a;
  border-color: #2a2a2a;
  transform: translateY(-3px) rotate(5deg);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  stroke: #444;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease;
}

.social-icon:hover svg {
  stroke: #fff;
}

.footer-col h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: 0.3px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--bw-sub);
  font-size: 14px;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: #000;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 2px solid var(--bw-line-strong);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  color: var(--bw-sub);
  font-size: 14px;
  margin: 0;
}

.payment-icons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.payment-icon {
  height: 26px;
  padding: 4px 10px;
  border: 2px solid var(--bw-line-strong);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  color: #666;
  font-weight: 700;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.payment-icon:hover {
  border-color: #000;
  background: #fafafa;
  transform: translateY(-2px);
}
