@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  --red: #d71920;
  --red-dark: #b81218;
  --black: #171717;
  --dark: #333333;
  --mid: #8a8a8a;
  --light: #f3f3f3;
  --white: #ffffff;
  --line: #dedede;
  --radius: 12px;
  --shadow: 0 12px 32px rgba(23, 23, 23, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-width: 320px; color: var(--black); background: #f7f7f7;
  font-family: "DM Sans", sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* HEADER */
.site-header {
  height: 74px; position: sticky; top: 0; z-index: 50;
  background: var(--black); color: white; border-bottom: 1px solid #2c2c2c;
}
.header-inner {
  width: min(1380px, calc(100% - 48px)); height: 100%; margin: auto;
  display: flex; align-items: center; gap: 26px;
}
.logo { display: flex; align-items: center; gap: 10px; color: white; }
.logo-mark {
  width: 31px; height: 31px; display: grid; place-items: center;
  background: var(--red); font-weight: 800; font-size: 19px;
  transform: skew(-6deg); box-shadow: 3px 3px 0 rgba(215, 25, 32, 0.25);
}
.logo-type { font-size: 17px; font-weight: 500; letter-spacing: -0.5px; }
.logo-type b { font-weight: 700; }
.desktop-nav { display: flex; align-items: stretch; height: 100%; margin-left: 12px; }
.desktop-nav a {
  position: relative; display: flex; align-items: center; padding: 0 14px;
  color: #aaa; font-size: 13px; font-weight: 600;
}
.desktop-nav a:hover, .desktop-nav a.active { color: white; }
.desktop-nav a.active::after {
  content: ""; position: absolute; height: 3px; left: 14px; right: 14px; bottom: 0; background: var(--red);
}
.header-search {
  margin-left: auto; width: min(310px, 25vw); height: 40px; padding: 0 12px;
  display: flex; align-items: center; gap: 9px; color: #888;
  background: #262626; border: 1px solid #393939; border-radius: 9px;
}
.header-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: white; background: none; font-size: 13px; }
.header-search kbd { padding: 2px 6px; color: #777; border: 1px solid #444; border-radius: 4px; font-size: 10px; }
.button {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 0 18px; border: 1px solid transparent; border-radius: 8px;
  font-size: 13px; font-weight: 700; transition: 0.22s ease; cursor: pointer;
}
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--red); box-shadow: 0 7px 20px rgba(215, 25, 32, 0.18); }
.button.primary:hover { background: var(--red-dark); }
.button.large { min-height: 50px; padding-inline: 22px; }
.button.white { color: var(--black); background: white; }
.button.dark-outline { color: white; background: transparent; border-color: #555; }
.button.dark-outline:hover { border-color: white; }
.header-publish { min-height: 40px; }
.avatar-button { display: flex; align-items: center; gap: 7px; padding: 0; color: #aaa; background: none; border: 0; cursor: pointer; }
.avatar-button img { width: 36px; height: 36px; border: 2px solid #444; border-radius: 50%; object-fit: cover; }
.mobile-menu { display: none; color: white; background: none; border: 0; cursor: pointer; }
.mobile-search-row { display: none; }

/* PROFILE MENU */
.profile-menu {
  position: absolute; top: 66px; right: max(24px, calc((100vw - 1380px) / 2));
  width: 245px; padding: 8px; color: var(--black); background: white;
  border: 1px solid #ddd; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  z-index: 60;
}
.profile-menu[hidden] { display: none; }
.profile-menu-head { display: flex; gap: 10px; padding: 10px; margin-bottom: 5px; border-bottom: 1px solid #eee; }
.profile-menu-head img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; }
.profile-menu-head b { display: block; font-size: 13px; }
.profile-menu-head small { color: var(--mid); }
.profile-menu a { display: flex; gap: 10px; padding: 10px; color: #555; border-radius: 7px; font-size: 13px; }
.profile-menu a:hover { color: var(--red); background: #fff1f1; }

/* HERO */
.hero { min-height: 550px; color: white; background: var(--black); overflow: hidden; }
.hero-grid {
  width: min(1320px, calc(100% - 64px)); min-height: 550px; margin: auto;
  display: grid; grid-template-columns: 1.25fr 0.72fr 0.25fr; align-items: center; gap: 28px; position: relative;
}
.hero-grid::before {
  content: "MARKET"; position: absolute; left: -55px; bottom: -55px;
  color: transparent; -webkit-text-stroke: 1px #2a2a2a;
  font-size: clamp(100px, 14vw, 210px); font-weight: 800; letter-spacing: -12px; pointer-events: none;
}
.hero-copy { z-index: 1; max-width: 680px; padding: 60px 0; }
.hero-kicker {
  width: max-content; display: flex; align-items: center; gap: 7px; padding: 7px 10px;
  color: #f2a4a6; background: #33191a; border: 1px solid #5b2426; border-radius: 99px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
}
.hero h1 { margin: 22px 0 20px; max-width: 660px; font-size: clamp(46px, 5vw, 76px); line-height: 0.98; letter-spacing: -4px; font-weight: 600; }
.hero h1 em { color: var(--red); font-style: normal; }
.hero-copy > p { max-width: 540px; color: #aaa; font-size: 17px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.hero-feature {
  position: relative; height: 420px; align-self: end; margin-bottom: -30px;
  overflow: hidden; border-radius: 150px 150px 0 0; box-shadow: 0 0 70px rgba(215, 25, 32, 0.13);
}
.hero-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0,0,0,0.9)); }
.hero-feature img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.hero-feature:hover img { transform: scale(1.04); }
.hero-card-copy { position: absolute; left: 32px; bottom: 48px; z-index: 2; }
.hero-card-copy span { color: #ddd; font-size: 11px; text-transform: uppercase; }
.hero-card-copy h3 { margin: 4px 0 2px; font-size: 22px; }
.hero-card-copy strong { color: #ff5055; font-size: 24px; }
.hero-stamp {
  position: absolute; z-index: 3; right: 20px; top: 130px; width: 84px; height: 84px;
  display: grid; place-items: center; color: white; background: var(--red);
  border-radius: 50%; border: 1px dashed white; outline: 4px solid var(--red);
  text-align: center; font-size: 10px; font-weight: 700; transform: rotate(9deg);
}
.hero-stat { align-self: start; margin-top: 100px; padding-left: 20px; border-left: 1px solid #383838; }
.hero-stat strong { display: block; font-size: 28px; }
.hero-stat span { color: #888; font-size: 11px; line-height: 1.4; text-transform: uppercase; }

/* FEED Y TARJETAS */
.content-section, .page-shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.categories-section { padding: 74px 0 54px; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 26px; }
.section-title h2 { margin: 5px 0 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -1.2px; }
.eyebrow { color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: 1.6px; }
.text-link { display: flex; align-items: center; gap: 7px; padding: 8px 0; color: var(--black); border-bottom: 1px solid var(--black); font-size: 12px; font-weight: 700; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card { position: relative; background: white; border: 1px solid #e2e2e2; border-radius: var(--radius); overflow: hidden; transition: 0.28s; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 14px 38px rgba(0,0,0,0.09); }
.product-image-wrap { position: relative; display: block; width: 100%; height: 215px; background: #ddd; overflow: hidden; }
.product-image { width: 100%; height: 100%; object-fit: cover; }
.availability { position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 6px; padding: 6px 9px; background: rgba(255,255,255,0.92); border-radius: 99px; font-size: 9px; font-weight: 700; color: #343434; }
.availability i { width: 6px; height: 6px; background: var(--red); border-radius: 50%; }
.product-copy { display: block; padding: 17px; color: var(--black); }
.product-meta { display: flex; justify-content: space-between; color: var(--mid); font-size: 9px; font-weight: 600; text-transform: uppercase; }
.product-copy h3 { margin: 9px 0 2px; font-size: 17px; line-height: 1.25; }
.price { margin: 0 0 17px; color: var(--red); font-size: 21px; font-weight: 800; }
.seller-line { padding-top: 13px; display: flex; align-items: center; gap: 9px; border-top: 1px solid #eee; }
.mini-avatar { width: 30px; height: 30px; display: grid; place-items: center; background: var(--black); color: white; border-radius: 50%; font-size: 11px; font-weight: 700; }
.seller-line b { display: block; font-size: 10px; }
.seller-line small { color: var(--mid); font-size: 9px; }
.card-enter { opacity: 0; animation: enter-card 0.55s ease forwards; }
@keyframes enter-card { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* BOTTOM NAV */
.bottom-nav { display: none; }

/* RESPONSIVE */
@media (max-width: 780px) {
  body { padding-bottom: 72px; }
  .site-header { height: 60px; }
  .header-inner { width: calc(100% - 30px); justify-content: space-between; }
  .desktop-nav, .header-search, .header-publish, .avatar-button { display: none; }
  .mobile-menu { display: block; }
  .hero-grid { display: block; padding: 48px 0 40px; }
  .hero-feature { height: 330px; margin: 40px 0 -40px; border-radius: 90px 90px 0 0; }
  .hero-stat { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  
  .bottom-nav {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: 68px; padding: 0 8px;
    display: grid; grid-template-columns: repeat(5, 1fr); background: var(--black); border-top: 1px solid #333;
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #777; font-size: 8px; }
  .bottom-nav a.active { color: white; }
  .bottom-nav .create-nav { color: white; }
  .create-nav > span { width: 50px; height: 50px; margin-top: -30px; display: grid; place-items: center; background: var(--red); border: 5px solid var(--black); border-radius: 50%; }
}