/* =============================================
   NR COLLECTION — styles.css
   Paleta: beige, tierra, blanco, negro, oliva
   ============================================= */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-bg:        #F5F2ED;
  --clr-white:     #FFFFFF;
  --clr-beige:     #E8E0D5;
  --clr-sand:      #C9B99A;
  --clr-earth:     #8B6F4E;
  --clr-dark:      #1C1C1A;
  --clr-olive:     #6B7C5C;
  --clr-olive-lt:  #8FA07A;
  --clr-muted:     #7A7469;
  --clr-border:    #D9D0C4;

  --ff-head: 'Cormorant Garamond', Georgia, serif;
  --ff-body: 'Inter', system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-sm: 0 2px 8px rgba(28,28,26,.07);
  --shadow-md: 0 6px 24px rgba(28,28,26,.10);
  --shadow-lg: 0 16px 48px rgba(28,28,26,.14);

  --nav-h: 68px;
  --transition: .25s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--ff-body);
  background: var(--clr-bg);
  color: var(--clr-dark);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- TIPOGRAFÍA --- */
h1,h2,h3,h4 { font-family: var(--ff-head); font-weight: 500; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.35rem; }

/* --- BOTONES --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.6rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--ff-body);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary {
  background: var(--clr-dark);
  color: var(--clr-white);
}
.btn-primary:hover { background: var(--clr-earth); transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--clr-dark);
  border: 1.5px solid var(--clr-dark);
}
.btn-secondary:hover { background: var(--clr-dark); color: var(--clr-white); }

.btn-olive {
  background: var(--clr-olive);
  color: var(--clr-white);
}
.btn-olive:hover { background: var(--clr-olive-lt); transform: translateY(-1px); }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
}
.btn-whatsapp:hover { background: #1ebe5d; }

/* --- SECCIÓN GENÉRICA --- */
.section {
  padding: 80px 0;
}
.section-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-label {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--clr-olive);
  margin-bottom: .75rem;
}
.section-title {
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--clr-muted);
  max-width: 520px;
}

/* =============================================
   NAVEGACIÓN
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(245,242,237,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border);
  z-index: 900;
  display: flex;
  align-items: center;
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
}
.nav-logo .nav-brand {
  font-family: var(--ff-head);
  font-size: 1.55rem;
  letter-spacing: .04em;
  color: var(--clr-dark);
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--clr-muted);
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1.5px;
  background: var(--clr-olive);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--clr-dark); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cart-btn {
  position: relative;
  background: var(--clr-dark);
  color: var(--clr-white);
  border: none;
  border-radius: 50%;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background var(--transition);
}
.cart-btn:hover { background: var(--clr-earth); }
.cart-count {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--clr-olive);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--clr-bg);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--clr-dark);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--clr-white);
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
    border-bottom: 1px solid var(--clr-border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open {
    max-height: 320px;
    padding: 12px 0;
  }
  .nav-links a {
    display: block;
    padding: 12px 28px;
    font-size: 1rem;
  }
  .nav-links a::after { display: none; }
}

/* =============================================
   CART SIDEBAR
   ============================================= */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,28,26,.45);
  z-index: 950;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.cart-overlay.show { opacity: 1; pointer-events: all; }

.cart-sidebar {
  position: fixed;
  top: 0; right: -420px;
  width: min(420px, 100vw);
  height: 100dvh;
  background: var(--clr-white);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right .35s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}
.cart-sidebar.open { right: 0; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--clr-border);
}
.cart-header h3 {
  font-family: var(--ff-head);
  font-size: 1.5rem;
  font-weight: 600;
}
.cart-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--clr-muted);
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.cart-close:hover { color: var(--clr-dark); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--clr-border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--clr-beige);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-info h4 {
  font-family: var(--ff-head);
  font-size: 1.05rem;
  font-weight: 500;
}
.cart-item-info .item-size {
  font-size: .8rem;
  color: var(--clr-muted);
  margin-top: .15rem;
}
.cart-item-price {
  font-weight: 700;
  font-size: .95rem;
  white-space: nowrap;
}
.qty-controls {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .5rem;
}
.qty-controls button {
  width: 24px; height: 24px;
  border: 1.5px solid var(--clr-border);
  background: none;
  border-radius: 50%;
  font-size: .85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.qty-controls button:hover { background: var(--clr-dark); color: #fff; border-color: var(--clr-dark); }
.qty-controls span { font-size: .9rem; font-weight: 600; min-width: 18px; text-align: center; }

.cart-empty-msg {
  text-align: center;
  color: var(--clr-muted);
  margin-top: 3rem;
  font-size: .95rem;
}
.cart-empty-msg .empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }

.cart-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--clr-border);
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Cart bounce animation */
@keyframes cartBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.28); }
  60%  { transform: scale(.9); }
  100% { transform: scale(1); }
}
.cart-bounce { animation: cartBounce .4s ease; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--clr-dark);
  color: rgba(255,255,255,.65);
  padding: 56px 0 28px;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand h3 {
  font-family: var(--ff-head);
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: .6rem;
}
.footer-brand p { font-size: .875rem; line-height: 1.7; max-width: 280px; }

.footer-col h4 {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 1rem;
  font-family: var(--ff-body);
  font-weight: 600;
}
.footer-col ul li { margin-bottom: .55rem; }
.footer-col a {
  font-size: .875rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }

.footer-social {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  transition: var(--transition);
}
.footer-social a:hover {
  background: var(--clr-olive);
  border-color: var(--clr-olive);
  color: #fff;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8rem;
}
.footer-bottom a:hover { color: #fff; }

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* =============================================
   PÁGINA ACTIVA EN NAV
   ============================================= */
.page-offset { padding-top: var(--nav-h); }
