:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --glass: rgba(255, 255, 255, 0.9);
  --stroke: #e6e8ec;
  --text: #0b0d10;
  --muted: #5c6470;
  --accent: #a4001c;
  --accent-2: #ffe4e9;
  --shadow: 0 16px 40px rgba(12, 16, 24, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", "Space Grotesk", sans-serif;
  background: #ffffff;
  color: var(--text);
  min-height: 100vh;
  position: relative;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
  z-index: 0;
}

.hero {
  padding: 40px 6vw 80px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
}

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

.logo {
  height: 48px;
  width: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #a4001c, #e11d2e);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  color: #ffffff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 14px;
}

.brand-animated {
  position: relative;
  display: inline-block;
  animation: brand-glow 3.2s ease-in-out infinite;
}

.brand-animated::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: center;
  animation: brand-sweep 3.6s ease-in-out infinite;
}

@keyframes brand-sweep {
  0%,
  30% {
    transform: scaleX(0);
    opacity: 0;
  }
  45%,
  70% {
    transform: scaleX(1);
    opacity: 1;
  }
  100% {
    transform: scaleX(0);
    opacity: 0;
  }
}

@keyframes brand-glow {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(164, 0, 28, 0);
  }
  50% {
    text-shadow: 0 0 8px rgba(164, 0, 28, 0.45),
      0 0 16px rgba(164, 0, 28, 0.25);
  }
}

.brand-tag {
  font-size: 12px;
  color: var(--muted);
}

.brand-bounce {
  display: inline-block;
  animation: brand-bounce 1.6s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
}

@keyframes brand-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
  60% {
    transform: translateY(2px);
  }
}

.top-actions {
  display: flex;
  gap: 12px;
}

.pill {
  border-radius: 999px;
  border: 1px solid var(--stroke);
  padding: 10px 18px;
  background: var(--glass);
  color: var(--text);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pill.ghost {
  background: transparent;
}

.pill.active {
  border-color: var(--accent);
  color: var(--accent);
}

.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(12, 16, 24, 0.08);
}

.hero-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 60px;
  align-items: center;
}

.hero-left h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin: 16px 0;
}

.hero-left p {
  color: var(--muted);
  font-size: 16px;
  max-width: 520px;
  margin-bottom: 24px;
}

.chip {
  background: var(--accent-2);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.cta {
  background: linear-gradient(135deg, #a4001c, #e11d2e);
  border: none;
  color: #ffffff;
  padding: 14px 26px;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta.secondary {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--text);
  box-shadow: none;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(12, 16, 24, 0.12);
}

.hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-stats h3 {
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.stat-icon {
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  animation: stat-forward 1.6s ease-in-out infinite;
  transform-origin: center;
  filter: drop-shadow(0 6px 10px rgba(164, 0, 28, 0.2));
}

@keyframes stat-forward {
  0%,
  100% {
    transform: translateX(0) scale(1);
    opacity: 0.9;
  }
  45% {
    transform: translateX(6px) scale(1.12);
    opacity: 1;
  }
  70% {
    transform: translateX(2px) scale(0.98);
  }
}

.hero-stats > div:nth-child(1) .stat-icon {
  animation-delay: 0s;
}

.hero-stats > div:nth-child(2) .stat-icon {
  animation-delay: 0.35s;
}

.hero-stats > div:nth-child(3) .stat-icon {
  animation-delay: 0.7s;
}

.hero-right {
  position: relative;
}

.glass-card {
  background: var(--card);
  border-radius: 28px;
  padding: 28px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-right .glass-card {
  animation: heroEnter 0.8s ease both, heroFloat 10s ease-in-out 0.8s infinite;
  will-change: transform;
}

.card-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.badge {
  background: var(--accent-2);
  color: #8a0f22;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.card-bottom {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.floating-tags {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.floating-tags span {
  padding: 10px 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--stroke);
  font-size: 12px;
}

.section {
  padding: 60px 6vw;
  position: relative;
  z-index: 1;
}

.section.alt {
  background: var(--bg-alt);
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 32px;
}

.section-header p {
  color: var(--muted);
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.product-card,
.arrival-card {
  background: var(--card);
  border-radius: 24px;
  border: 1px solid var(--stroke);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card img,
.arrival-card img {
  width: 100%;
  border-radius: 18px;
  height: 160px;
  object-fit: cover;
}

.image-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
}

.quick-add {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(12, 16, 24, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(12, 16, 24, 0.24);
}

.quick-add[disabled],
.pill[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.product-image {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.product-image.is-fading {
  opacity: 0;
  transform: scale(0.98);
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-meta span {
  font-weight: 600;
}

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

.product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--stroke);
}

.stock-badge.in-stock {
  background: #e9f8ef;
  color: #117a48;
}

.stock-badge.out-of-stock {
  background: #ffe9ec;
  color: #a4001c;
}

.product-card:hover,
.arrival-card:hover,
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px rgba(12, 16, 24, 0.14);
}

.support-card {
  background: #ffffff;
  border-radius: 28px;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.footer {
  padding: 30px 6vw 50px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  color: var(--muted);
}

.footer strong {
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
}

.drawer,
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(11, 13, 16, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 10;
}

.drawer.open,
.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-content,
.modal-content {
  background: #ffffff;
  width: min(420px, 92vw);
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-left: 1px solid var(--stroke);
}

.modal-content {
  width: min(760px, 94vw);
  height: auto;
  max-height: 92vh;
  border-radius: 28px;
  margin: auto;
  overflow-y: auto;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--text);
  border-radius: 12px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex: 1;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.cart-item img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.cart-item h4 {
  font-size: 14px;
}

.cart-item span {
  font-size: 12px;
  color: var(--muted);
}

.cart-summary {
  border-top: 1px solid var(--stroke);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.checkout-form {
  display: grid;
  gap: 18px;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

input,
textarea {
  background: #ffffff;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 44px;
  font-family: inherit;
}

.summary-panel {
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: #ffffff;
}

.note {
  font-size: 12px;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: #ffffff;
  border: 1px solid var(--stroke);
  padding: 14px 18px;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
}

@keyframes heroEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.swipe-hint {
  display: none;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 6px 0 12px;
}

.mobile-bar {
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .pill,
  .cta,
  .product-card,
  .arrival-card,
  .glass-card {
    transition: none;
    transform: none;
  }

  .hero-right .glass-card {
    animation: none;
  }

  .brand-bounce {
    animation: none;
  }

  .brand-animated {
    animation: none;
    text-shadow: none;
  }

  .brand-animated::after {
    animation: none;
  }

  .stat-icon {
    animation: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .hero {
    padding: 32px 6vw 56px;
  }

  .hero-content {
    gap: 32px;
  }

  .hero-left h1 {
    font-size: clamp(32px, 9vw, 44px);
  }

  .hero-stats {
    gap: 16px;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .product-grid,
  .arrival-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
  }

  .product-card,
  .arrival-card {
    min-width: 82vw;
    scroll-snap-align: start;
  }

  .product-card img,
  .arrival-card img {
    height: 200px;
  }

  .quick-add {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .hero-right {
    order: -1;
  }

  .support-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .drawer-content {
    width: 100%;
  }

  .mobile-bar {
    position: fixed;
    bottom: 14px;
    left: 16px;
    right: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    z-index: 12;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--stroke);
    box-shadow: 0 18px 40px rgba(12, 16, 24, 0.12);
  }

  main {
    padding-bottom: 90px;
  }

  .swipe-hint {
    display: block;
  }
}
