/* =========================================================
   NURA — components.css
   Nav, buttons, cards, cart, modals, forms, footer
   ========================================================= */

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background var(--t-base), box-shadow var(--t-base);
}
.nav.scrolled {
  background: rgba(250,248,244,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}
.nav-logo img { height: 44px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}
.nav-link {
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  position: relative;
  transition: color var(--t-fast);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--matcha-dk);
  transition: width var(--t-base);
}
.nav-link:hover { color: var(--matcha-dk); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--indigo); }
.nav-link.active::after { width: 100%; background: var(--indigo); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav-cart-btn {
  position: relative;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  transition: background var(--t-fast);
}
.nav-cart-btn:hover { background: var(--azure-lt); }
.nav-cart-btn svg { width: 24px; height: 24px; stroke: var(--ink); }
.cart-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 18px; height: 18px;
  background: var(--matcha);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 4px;
  opacity: 0;
  transform: scale(0);
  transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-spring);
}
.cart-badge.show { opacity: 1; transform: scale(1); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform var(--t-base), opacity var(--t-fast);
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--cream);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.mobile-menu .nav-link { font-size: var(--text-2xl); font-family: var(--font-display); font-weight: 300; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 2rem;
  border-radius: var(--r-full);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: var(--indigo);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(40,85,108,.25);
}
.btn-primary:hover {
  background: var(--indigo-dk);
  box-shadow: 0 8px 24px rgba(40,85,108,.32);
}

.btn-matcha {
  background: var(--matcha);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(143,185,145,.3);
}
.btn-matcha:hover {
  background: var(--matcha-dk);
  box-shadow: 0 8px 24px rgba(143,185,145,.4);
}

.btn-outline {
  background: transparent;
  color: var(--indigo);
  border-color: var(--indigo);
}
.btn-outline:hover {
  background: var(--indigo);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--azure-lt); }

.btn-light {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border-color: rgba(255,255,255,.3);
  backdrop-filter: blur(8px);
}
.btn-light:hover { background: rgba(255,255,255,.25); }

.btn-sm { padding: 0.6rem 1.25rem; font-size: var(--text-xs); }
.btn-lg { padding: 1.1rem 2.5rem; font-size: var(--text-base); }
.btn-full { width: 100%; }

.btn-icon {
  width: 42px; height: 42px;
  padding: 0;
  border-radius: var(--r-full);
  background: var(--azure-lt);
  color: var(--indigo);
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--azure); }
.btn-icon svg { width: 18px; height: 18px; }

/* Ripple */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  transform: scale(0);
  animation: ripple-anim 0.5s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  transition: transform var(--t-base), box-shadow var(--t-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.product-card-image {
  aspect-ratio: 1 / 1.1;
  overflow: hidden;
  position: relative;
}
.product-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.product-card:hover .product-card-image img { transform: scale(1.05); }

.product-card-badge {
  position: absolute;
  top: var(--space-4); left: var(--space-4);
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-nuevo    { background: var(--orchid);   color: #6b2039; }
.badge-popular  { background: var(--peach);    color: #7a3e0e; }
.badge-agotado  { background: #e0e0e0;         color: #666; }

.product-card-quick {
  position: absolute;
  bottom: var(--space-3); left: var(--space-3); right: var(--space-3);
  display: flex;
  gap: var(--space-2);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.product-card:hover .product-card-quick {
  opacity: 1;
  transform: translateY(0);
}
.product-card-quick .btn { flex: 1; font-size: var(--text-xs); padding: 0.65rem 1rem; border-radius: var(--r-md); }

.product-card-info {
  padding: var(--space-4) var(--space-6) var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.product-card-category {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--matcha-dk);
}
.product-card-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-xl);
  color: var(--ink);
  line-height: 1.2;
}
.product-card-desc {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1.5;
  flex: 1;
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--azure-lt);
}
.product-price {
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--indigo);
}
.product-price-old {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  text-decoration: line-through;
  margin-left: var(--space-2);
}

/* Color themes for product cards */
.card-theme-azure  { --card-accent: var(--azure);    --card-bg: #eef5f7; }
.card-theme-orchid { --card-accent: var(--orchid);   --card-bg: #fef0f4; }
.card-theme-pistacho { --card-accent: var(--pistacho); --card-bg: #eef6eb; }
.card-theme-peach  { --card-accent: var(--peach);    --card-bg: #fef5ec; }

[class*="card-theme-"] .product-card-image { background: var(--card-bg); }

/* ===== MINI CART DRAWER ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,42,51,.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--cream);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease-out);
  box-shadow: var(--shadow-xl);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  border-bottom: 1px solid var(--azure-lt);
}
.cart-drawer-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
}
.cart-close-btn {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  transition: background var(--t-fast);
}
.cart-close-btn:hover { background: var(--azure-lt); }
.cart-close-btn svg { width: 18px; height: 18px; }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-track { background: transparent; }
.cart-items::-webkit-scrollbar-thumb { background: var(--azure); border-radius: 2px; }

.cart-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--white);
  border-radius: var(--r-md);
  align-items: center;
  animation: slideIn 0.3s var(--ease-out);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.cart-item-img {
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--azure-lt);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-weight: 500;
  font-size: var(--text-sm);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-variant {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}
.cart-item-price { font-weight: 700; color: var(--indigo); font-size: var(--text-sm); }
.cart-qty {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.cart-qty-btn {
  width: 26px; height: 26px;
  border-radius: var(--r-full);
  background: var(--azure-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.cart-qty-btn:hover { background: var(--azure); }
.cart-qty-num {
  width: 24px;
  text-align: center;
  font-weight: 500;
  font-size: var(--text-sm);
}
.cart-item-remove {
  padding: 4px;
  color: var(--ink-muted);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}
.cart-item-remove:hover { color: #c0392b; background: #ffeaea; }
.cart-item-remove svg { width: 16px; height: 16px; }

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-8);
  text-align: center;
}
.cart-empty-icon { font-size: 3rem; opacity: .4; }
.cart-empty p { color: var(--ink-muted); font-size: var(--text-sm); }

.cart-drawer-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--azure-lt);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
}
.cart-subtotal .label { color: var(--ink-muted); }
.cart-subtotal .amount { font-weight: 700; font-size: var(--text-lg); color: var(--indigo); }
.cart-shipping-note {
  font-size: var(--text-xs);
  color: var(--matcha-dk);
  text-align: center;
  font-weight: 500;
}

/* Free shipping bar */
.shipping-bar {
  background: var(--azure-lt);
  border-radius: var(--r-sm);
  overflow: hidden;
  height: 6px;
  margin-bottom: var(--space-1);
}
.shipping-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--matcha), var(--indigo));
  border-radius: var(--r-full);
  transition: width 0.5s var(--ease-out);
}

/* ===== TOAST NOTIFICATION ===== */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--indigo);
  color: var(--white);
  padding: 0.875rem 1.5rem;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn 0.4s var(--ease-spring) forwards;
  white-space: nowrap;
}
.toast.hide { animation: toastOut 0.3s var(--ease-out) forwards; }
.toast-icon { font-size: 1rem; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: var(--space-2); }
.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
}
.form-input {
  padding: 0.875rem 1.125rem;
  border: 1.5px solid var(--azure);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-input::placeholder { color: var(--ink-muted); opacity: .7; }
.form-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(40,85,108,.12);
}
.form-input.error { border-color: #e74c3c; }
.form-error {
  font-size: var(--text-xs);
  color: #e74c3c;
  display: none;
}
.form-error.show { display: block; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2328556c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}
.section-header.center { align-items: center; text-align: center; }
.section-header p {
  max-width: 56ch;
  color: var(--ink-muted);
  font-size: var(--text-lg);
}
.section-header.center p { margin-inline: auto; }

/* ===== TRUST BADGES ===== */
.trust-bar {
  background: var(--indigo);
  padding: var(--space-4) 0;
  overflow: hidden;
}
.trust-bar-inner {
  display: flex;
  gap: var(--space-12);
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}
.trust-bar-inner:hover { animation-play-state: paused; }
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--azure-lt);
  font-size: var(--text-sm);
  font-weight: 500;
  flex-shrink: 0;
}
.trust-item svg { width: 18px; height: 18px; opacity: .8; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== QUANTITY SELECTOR ===== */
.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--azure);
  border-radius: var(--r-full);
  overflow: hidden;
  background: var(--white);
}
.qty-btn {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: 300;
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--azure-lt); }
.qty-value {
  width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--ink);
  pointer-events: none;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--indigo);
  color: var(--azure-lt);
  padding-top: clamp(3rem, 6vw, 5rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-16);
}
.footer-brand {}
.footer-brand img { height: 32px; margin-bottom: var(--space-6); filter: brightness(0) invert(1); opacity: .9; }
.footer-tagline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-xl);
  color: var(--white);
  line-height: 1.3;
  margin-bottom: var(--space-6);
}
.footer-desc { font-size: var(--text-sm); opacity: .75; line-height: 1.7; max-width: 32ch; }
.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.footer-social a {
  width: 38px; height: 38px;
  border-radius: var(--r-full);
  border: 1px solid rgba(180,204,209,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.footer-social a:hover { background: rgba(180,204,209,.15); border-color: var(--azure); }
.footer-social svg { width: 16px; height: 16px; }

.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--white);
  margin-bottom: var(--space-6);
}
.footer-links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-links a {
  font-size: var(--text-sm);
  opacity: .75;
  transition: opacity var(--t-fast);
}
.footer-links a:hover { opacity: 1; }

.footer-newsletter input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(180,204,209,.25);
  color: var(--white);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.footer-newsletter input::placeholder { color: rgba(180,204,209,.6); }
.footer-newsletter input:focus {
  outline: none;
  border-color: var(--azure);
  background: rgba(255,255,255,.12);
}

.footer-bottom {
  border-top: 1px solid rgba(180,204,209,.15);
  padding-block: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  opacity: .6;
}
.footer-bottom a:hover { opacity: 1; }

/* Payment icons row */
.payment-icons {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.payment-badge {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(180,204,209,.2);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--azure-lt);
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* ===== FLOATING WHATSAPP ===== */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 150;
  width: 52px; height: 52px;
  background: #25d366;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-fast);
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(37,211,102,.5);
}
.whatsapp-float svg { width: 28px; height: 28px; fill: white; }
