/* Layout – Oraimo/Amazon style header, main, footer */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  color: var(--nav-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Top row: logo, search, cart */
.header-top {
  padding: 0.6rem 0;
}

.header-top .header-inner {
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--nav-text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--nav-text);
  opacity: 0.95;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  color: var(--nav-bg);
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

.logo-image {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
}

.logo-text {
  color: var(--nav-text);
}

/* Search bar – Amazon style */
.header-search {
  flex: 1;
  min-width: 0;
  max-width: 600px;
  display: flex;
  margin: 0 auto;
}

.header-search input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--text-primary);
}

.header-search input::placeholder {
  color: var(--text-muted);
}

.header-search .btn {
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
}

.header-search .btn:hover {
  background: var(--accent-hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.header-link {
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.header-link:hover {
  color: var(--nav-text);
}

.header-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
}

.header-cart:hover {
  color: var(--nav-text);
  opacity: 0.9;
}

.header-cart-icon {
  font-size: 1.25rem;
}

.cart-badge {
  background: var(--accent);
  color: var(--nav-bg);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
}

/* Second row: category nav (Oraimo style) */
.header-nav {
  background: var(--nav-bg-secondary);
  padding: 0.4rem 0;
}

.header-nav .header-inner {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover {
  color: var(--nav-text);
  background: rgba(255, 255, 255, 0.08);
}

/* Trust bar (Oraimo style) */
.trust-bar {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-light);
  padding: 0.5rem 0;
}

.trust-bar .header-inner {
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.trust-item {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Mobile menu toggle (keep for small screens) */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--nav-text);
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

@media (max-width: 900px) {
  .header-search {
    order: 3;
    width: 100%;
    max-width: none;
    margin: 0.5rem 0 0;
  }
  .header-top .header-inner {
    justify-content: space-between;
  }
  .header-search .btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .logo {
    font-size: 1.1rem;
  }
  .logo-mark {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.95rem;
  }
  .logo-image {
    width: 1.8rem;
    height: 1.8rem;
  }
  .header-actions {
    gap: 0.75rem;
  }
  .header-link {
    font-size: 0.85rem;
    padding: 0.4rem;
  }
  .header-cart {
    font-size: 0.85rem;
  }
  .header-cart-icon {
    font-size: 1.1rem;
  }
  .nav-link {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }
}

@media (max-width: 640px) {
  .header-top {
    padding: 0.5rem 0;
  }
  .header-inner {
    padding: 0 1rem;
    gap: 1rem;
  }
  .logo {
    font-size: 1rem;
  }
  .logo-mark {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.9rem;
  }
  .logo-image {
    width: 1.6rem;
    height: 1.6rem;
  }
  .logo-text {
    display: none;
  }
  .header-search {
    order: 2;
    width: calc(100% - 4rem);
    margin: 0.5rem auto 0;
  }
  .header-search input {
    font-size: 0.9rem;
    padding: 0.45rem 0.6rem;
  }
  .header-search .btn {
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
  }
  .header-actions {
    gap: 0.5rem;
  }
  .header-link {
    display: none;
  }
  .header-cart {
    font-size: 0.8rem;
  }
  .header-cart-icon {
    font-size: 1rem;
  }
  .cart-badge {
    font-size: 0.6rem;
    min-width: 1rem;
    height: 1rem;
  }
}

@media (max-width: 600px) {
  .header-nav {
    padding: 0.2rem 0;
  }
  .header-nav .header-inner {
    gap: 0;
    padding: 0 0.5rem;
    flex-wrap: nowrap;
    overflow-x: hidden;
  }
  .nav-link {
    font-size: 0.7rem;
    padding: 0.2rem 0.3rem;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
  }
  .trust-bar .header-inner {
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
  }
  .trust-item {
    font-size: 0.8rem;
    line-height: 1.3;
  }
}

/* Main content */
.main-content {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 220px);
  padding: 1.5rem 1.25rem 3rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* Messages */
.messages {
  position: fixed;
  top: 5rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 340px;
}

.message {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
}

.message-success {
  background: #067a4c;
  color: #fff;
}

.message-error,
.message-warning {
  background: #b12704;
  color: #fff;
}

/* Footer – Amazon style multi-column */
.site-footer {
  margin-top: 3rem;
  background: var(--nav-bg-secondary);
  color: var(--nav-text-muted);
  padding: 2.5rem 1.25rem 1.5rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nav-text);
  margin: 0 0 0.75rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--nav-text);
  text-decoration: underline;
}

.footer-tagline {
  font-size: 0.9rem;
  margin: 0;
  color: var(--nav-text-muted);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  text-align: center;
}

.footer-copy {
  font-size: 0.8rem;
  margin: 0;
  color: var(--nav-text-muted);
}
