:root {
  --bg: #ffffff;
  --bg-soft: #fff4e6;
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-2: #fff9f3;
  --muted: #5b6472;
  --text: #1c1f27;
  --primary: #ff7a18;
  --primary-2: #ff9f43;
  --accent: #ff7a18;
  --card: #ffffff;
  --stroke: #f1f2f4;
  --radius: 14px;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.12);
  --glass: rgba(255, 122, 24, 0.06);
}

:root[data-theme="dark"] {
  --bg: #0a0c10;
  --bg-soft: #111827;
  --panel: #0f172a;
  --surface: #0f172a;
  --surface-2: #111827;
  --muted: #c7ced9;
  --text: #e8ecf5;
  --primary: #ff7a18;
  --primary-2: #ff9f43;
  --accent: #ff7a18;
  --card: #0f172a;
  --stroke: #1f2937;
  --radius: 14px;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  --glass: rgba(255, 122, 24, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(
    circle at 30% 20%,
    var(--bg-soft) 0,
    var(--bg) 60%
  );
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* Promo */
.promo-bar {
  background: linear-gradient(90deg, var(--surface-2), var(--surface));
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--stroke);
}

.promo-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.promo-chip {
  background: var(--panel);
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  border: 1px solid var(--stroke);
  box-shadow: 0 6px 18px rgba(255, 122, 24, 0.12);
}

.promo-text {
  text-align: center;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-bottom: 1px solid var(--stroke);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.header-meta {
  border-bottom: 1px solid var(--stroke);
  background: var(--surface-2);
}

.meta-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
  flex-wrap: wrap;
}

.meta-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 8px;
  height: 8px;
  background: #ff7a18;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.2);
}

select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--stroke);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.meta-links {
  display: flex;
  gap: 14px;
  margin-left: auto;
}

.meta-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.meta-links a:hover {
  color: var(--text);
}

.header-main {
  padding: 16px 0;
}

.header-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

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

.logo-mark {
  display: none;
}

.logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--stroke);
}

.logo.small .logo-img {
  width: 48px;
  height: 48px;
}

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

.theme-btn,
.profile-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.language-toggle {
  position: relative;
}

.language-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  min-width: 110px;
}

.lang-label {
  font-weight: 600;
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  box-shadow: var(--shadow);
  list-style: none;
  padding: 6px 0;
  width: 180px;
  display: none;
  z-index: 40;
}

.language-dropdown li {
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-dropdown li:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.language-dropdown.open {
  display: block;
}

.logo-text strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.logo-text small {
  color: var(--muted);
  font-size: 12px;
}

.search-bar {
  display: grid;
  grid-template-columns: 160px 1fr 50px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(255, 122, 24, 0.12);
}

.search-category,
.search-input,
.search-btn {
  background: transparent;
  border: none;
  color: var(--text);
}

.search-category {
  border-right: 1px solid var(--stroke);
  padding: 0 12px;
}

.search-input {
  padding: 0 14px;
  outline: none;
}

.search-input:focus {
  box-shadow: inset 0 0 0 1px var(--primary);
}

.search-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: grid;
  place-items: center;
  cursor: pointer;
}

.search-btn svg {
  color: #0a0c10;
}

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

.ghost-btn {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--stroke);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ghost-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(255, 122, 24, 0.18);
}

.header-link {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.header-link .bold {
  color: var(--text);
  font-weight: 600;
}

.cart {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--primary);
  color: #0a0c10;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  box-shadow: 0 12px 24px rgba(255, 122, 24, 0.35);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #111827;
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 700;
}

.nav {
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  background: var(--surface);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 12px;
  padding: 10px 0;
  overflow-x: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #4b5563;
  transition: all 0.2s ease;
}

.nav-link.active,
.nav-link:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
}

/* Hero */
.hero {
  padding: 32px 0 48px;
}

.hero-layout {
  position: relative;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  min-height: 320px;
  box-shadow: var(--shadow);
}

.hero-slide {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 38px;
}

.hero-copy h1 {
  font-size: 38px;
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 16px;
}

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tag {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #0a0c10;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 15px 30px rgba(255, 122, 24, 0.35);
}

.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--stroke);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.hero-media {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 8px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
}

.hero-card strong {
  font-size: 15px;
}

.hero-card span {
  color: var(--muted);
  font-size: 13px;
}

.hero-dots {
  position: absolute;
  bottom: 14px;
  left: 24px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  border: 1px solid var(--stroke);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-dot.active {
  background: var(--primary);
  border-color: transparent;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.metric {
  background: var(--card);
  border: 1px solid var(--stroke);
  padding: 14px;
  border-radius: 12px;
  text-align: center;
}

.metric h4 {
  font-size: 24px;
  color: var(--primary-2);
}

.metric p {
  color: var(--muted);
  font-size: 13px;
}

/* Sections */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.eyebrow {
  text-transform: uppercase;
  color: var(--primary-2);
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 12px;
}

.section-title {
  font-size: 26px;
  margin-top: 6px;
}

.pill-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.pill.active {
  background: var(--primary);
  color: #0a0c10;
  border-color: transparent;
}

.trust {
  padding: 26px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.trust-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  padding: 14px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.trust-icon {
  font-size: 20px;
}

.categories,
.products,
.deals,
.bestsellers,
.brands,
.newsletter {
  padding: 28px 0;
}

.categories,
.deals,
.brands,
.newsletter {
  background: var(--surface-2);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}

.category-grid,
.product-grid,
.deals-grid {
  display: grid;
  gap: 16px;
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.category-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s;
  box-shadow: 0 10px 24px rgba(255, 122, 24, 0.08);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(255, 122, 24, 0.14);
}

.category-thumb {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
}

.category-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.category-link {
  color: var(--primary-2);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
  position: relative;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
}

.product-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
}

.product-rating {
  color: var(--primary-2);
}

.add-to-cart {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #0a0c10;
  border: none;
  padding: 10px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.deals-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.deal-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(255, 122, 24, 0.08);
}

.deal-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

.deal-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 13px;
}

.deal-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-2);
}

.original-price {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 13px;
}

.deals-badge {
  background: #991b1b;
  color: #fee2e2;
}

.bestseller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.bestseller-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.brand-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.brand-tile {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.newsletter-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.newsletter-form {
  display: flex;
  gap: 10px;
}

.newsletter-form input {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  min-width: 260px;
}

.newsletter-form button {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #0a0c10;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 20px rgba(255, 122, 24, 0.18);
}

/* Footer */
.footer {
  background: var(--footer-bg, var(--surface));
  color: var(--muted);
  border-top: 1px solid var(--stroke);
}

.footer-top {
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  text-align: center;
  padding: 16px 0;
}

.back-to-top {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.footer-content {
  padding: 26px 0;
}

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

.footer-column h4 {
  color: var(--text);
  margin-bottom: 10px;
}

.footer-column li {
  list-style: none;
  margin-bottom: 8px;
}

.footer-column a:hover {
  color: var(--primary-2);
}

.footer-bottom {
  border-top: 1px solid var(--stroke);
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}

.socials {
  display: flex;
  gap: 10px;
}

.footer-links-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.footer-section .dropdown {
  position: relative;
  width: 100%;
}

.footer-section .dropbtn {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-weight: 600;
}

.footer-section .dropdown-content {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  background-color: var(--surface);
  min-width: 180px;
  box-shadow: var(--shadow);
  padding: 8px 0;
  border-radius: 12px;
  z-index: 10;
  border: 1px solid var(--stroke);
}

.footer-section .dropdown-content a {
  color: var(--text);
  padding: 8px 14px;
  text-decoration: none;
  display: block;
}

.footer-section .dropdown-content a:hover {
  background-color: var(--hover-bg, var(--glass));
}

.footer-section .dropdown:hover .dropdown-content {
  display: block;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--stroke);
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer Modal */
.footer-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.footer-modal.show {
  display: flex;
}

.footer-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.footer-modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px;
  z-index: 1001;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.footer-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.footer-modal-close:hover {
  background: var(--glass);
  color: var(--primary);
}

.footer-modal-title {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-right: 40px;
}

.footer-modal-body {
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.footer-link {
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--primary-2);
}

@media (max-width: 1024px) {
  .header-content {
    grid-template-columns: 1fr;
  }

  .meta-links {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .search-bar {
    grid-template-columns: 1fr 50px;
  }

  .search-category {
    display: none;
  }

  .newsletter-wrap {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }
}
