:root {
  --green: #2B2D42;
  --green-dark: #383b5b;
  --cream: #f6f1e7;
  --ink: #222018;
  --muted: #6b6459;
  --card: #ffffff;
  --accent: #e8a33d;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #fff;
}

body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--ink);
  background-color: #fff;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--green);
  padding: 0.5rem 1rem;
}
.btn-solid {
  background: var(--green);
  color: #fff;
  padding: 0.5rem 1.25rem;
}
.btn-solid:hover { background: var(--green-dark); }

.btn-cta {
  background: #A5B4FC;
  color: #fff;
  padding: 0.85rem 1.75rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
  box-shadow: var(--shadow);
}

.btn-add {
  background: var(--green);
  color: var(--cream);
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  width: 100%;
  margin-top: auto;
}
.btn-add:hover { background: var(--green-dark); }

/* ================= HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #A5B4FC;
  border-bottom: 1px solid #2f6b4f26;
}
.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
}
.logo {
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: 2.9rem;
  color: #fff;
  letter-spacing: 0.05em;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0 auto;
}
.nav-links a {
  font-weight: 500;
  color: #2B2D42;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-links a:hover {
  color: #fff;
  border-color: #fff;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--green);
  border-radius: 3px;
}

/* ================= HERO ================= */
.hero {
  max-width: 1800px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}
.hero-media {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-media img {
  width: 100%;
  height: clamp(320px, 45vw, 520px);
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem clamp(1.5rem, 6vw, 4rem);
  background: linear-gradient(90deg, #2B2D42 0%, #2b2d427c 45%, rgba(35, 79, 59, 0) 75%);
  color: #fff;
  max-width: 640px;
}
.hero-tag {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 1.5rem;

  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}
.hero-title {
  font-family: "Baloo 2", cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  text-wrap: balance;
}
.hero-text {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 30ch;
  text-wrap: pretty;
}

/* ================= SECTIONS ================= */
.section {
  max-width: 1250px;
  margin: 30px 30px 30px 120px;
  padding: 3.5rem 1.5rem 1rem;
}
.section-title {
  font-family: "Baloo 2", cursive;
  font-size: clamp(3rem, 3vw, 2rem);
  color: #2B2D42;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ================= GÉNEROS ================= */
.genres {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
}
.genre-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.2s ease;
}
.genre-item:hover { transform: translateY(-6px); }
.genre-img {
  width: clamp(180px, 14vw, 120px);
  height: clamp(180px, 14vw, 120px);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 3px solid #fff;
}
.genre-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.genre-name {
  font-weight: 600;
  color: var(--ink);
}

/* ================= CAROUSEL / CARDS ================= */

.carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 1.25rem;
    overflow: hidden;
    scroll-behavior: smooth;
    padding: 0.5rem 0.5rem 1rem;
    width: 100%;
}

.card {
    flex: 0 0 calc((100% - 3.75rem) / 4);
    min-width: 0;
    background: var(--card);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-6px);
}

.card-img {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #eee;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.card-price {
    color: var(--green);
    font-weight: 700;
}

.carousel-btn {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--green);
    color: var(--cream);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.15s ease, transform 0.15s ease;
    z-index: 2;
}

.carousel-btn:hover {
    background: var(--green-dark);
    transform: scale(1.08);
}

/* En Más vendidos se muestran 3 productos */
#carousel-vendidos .card {
    flex: 0 0 calc((100% - 2.5rem) / 3);
}

/* ================= RESEÑAS ================= */
.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.review-card {
  background: #A5B4FC;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.review-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.review-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}
.review-name {
  font-size: 1rem;
  font-weight: 600;
}
.review-stars {
  color: var(--accent);
  font-size: 0.9rem;
}
.review-text {
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ================= FOOTER ================= */
.site-footer {
  background: var(--green);
  color: var(--cream);
  margin-top: 4rem;
  padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}
.footer-logo {
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: 3rem;
  letter-spacing: 0.05em;
}
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  font-weight: 700;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col a {
  color: rgba(246, 241, 231, 0.85);
  font-size: 0.9rem;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: #fff; }
.footer-copy {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(246, 241, 231, 0.25);
  font-size: 0.8rem;
  color: rgba(246, 241, 231, 0.7);
  text-align: center;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links,
  .nav-actions {
    display: none;
    width: 100%;
  }
  .navbar {
    flex-wrap: wrap;
  }
  .nav-links.open,
  .nav-actions.open {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0.75rem 0 0;
    align-items: flex-start;
  }
  .nav-links.open { margin-right: auto; }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* MODAL REGISTRO */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 200;
  padding: 1rem;
}

.modal.active{
  display: flex;
}

.modal-content{
  background: #fff;
  width: 100%;
  max-width: 380px;
  border-radius: 20px;
  padding: 2rem;
  position: relative;
}

.close-modal{
  position: absolute;
  top: .7rem;
  right: .9rem;
  border: none;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.modal-title{
  text-align: center;
  margin-bottom: 1rem;
  color: #2B2D42;
}

.register-form{
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.register-form input{
  padding: .85rem 1rem;
  border: 1px solid #ccc;
  border-radius: 12px;
}

.submit-register{
  width: 100%;
  justify-content: center;
}

/* ================= MODAL INICIAR SESIÓN ================= */

.login-form {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.login-form input {
    padding: .85rem 1rem;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-family: "Poppins", sans-serif;
    outline: none;
}

.login-form input:focus {
    border-color: #A5B4FC;
}

.submit-login {
    width: 100%;
    justify-content: center;
    margin-top: .3rem;
}