/* ============================================
   URBANA Store — Estilos Principales
   Paleta: Gris claro + Negro
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg: #F4F3F0;
  --bg-card: #FFFFFF;
  --bg-dark: #0A0A0A;
  --text: #0A0A0A;
  --text-muted: #6B6B6B;
  --text-light: #9B9B9B;
  --border: #E2E0DB;
  --accent: #0A0A0A;
  --accent-hover: #2a2a2a;
  --whatsapp: #25D366;
  --whatsapp-hover: #1da851;
  --red: #C0392B;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 4px;
  --shadow: 0 2px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.12);
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); }
input, select { font-family: var(--font-body); }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 243, 240, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--text);
}

.header-logo span {
  font-weight: 300;
  font-style: italic;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 18px;
  gap: 10px;
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(10,10,10,0.05);
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
  width: 180px;
}

.search-bar input::placeholder { color: var(--text-light); }

.search-bar svg { color: var(--text-muted); flex-shrink: 0; }

.cart-btn {
  position: relative;
  background: var(--text);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-btn:hover { background: var(--accent-hover); transform: scale(1.05); }

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--red);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

.cart-badge.show { display: flex; }

/* ============ HERO ============ */
.hero {
  padding: 80px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
}

.hero-tag {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 300;
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-title em {
  font-style: italic;
  font-weight: 300;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 400px;
  font-weight: 300;
  margin-bottom: 32px;
}

/* ============ CATEGORY FILTER ============ */
.category-nav {
  padding: 0 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar { display: none; }

.cat-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 18px 24px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.cat-btn:hover { color: var(--text); }
.cat-btn.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }

/* ============ PRODUCTS GRID ============ */
.products-section {
  padding: 48px 40px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 300;
}

.section-count {
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 4px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ============ PRODUCT CARD ============ */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #F0EFEC;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.04);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--text);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
}

.product-badge.sale { background: var(--red); }

.product-quick-add {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10,10,10,0.9);
  color: #fff;
  text-align: center;
  padding: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: var(--transition);
}

.product-card:hover .product-quick-add {
  transform: translateY(0);
}

.product-info {
  padding: 16px 18px 18px;
}

.product-cat {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 4px;
}

.product-name {
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-price {
  font-size: 16px;
  font-weight: 600;
}

.product-original-price {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: line-through;
}

/* ============ PRODUCT MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: 8px;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-image {
  aspect-ratio: 1;
  background: #F0EFEC;
  overflow: hidden;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 40px 36px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #fff;
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
}

.modal-close:hover { background: var(--bg); }

.modal-cat { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.modal-title { font-family: var(--font-display); font-size: 30px; font-weight: 400; margin-bottom: 8px; }
.modal-price { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.modal-original { font-size: 14px; color: var(--text-light); text-decoration: line-through; margin-bottom: 16px; }
.modal-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px; font-weight: 300; }

.option-label { font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; display: block; }

.sizes-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.size-btn {
  border: 1px solid var(--border);
  background: none;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  min-width: 44px;
}

.size-btn:hover, .size-btn.selected {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.colors-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }

.color-btn {
  border: 2px solid transparent;
  border-radius: 50%;
  padding: 2px;
  background: none;
  transition: var(--transition);
}

.color-btn.selected { border-color: var(--text); }

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-control button {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-control button:hover { background: var(--bg); }

.qty-control span { width: 36px; text-align: center; font-weight: 600; }

.btn-whatsapp {
  width: 100%;
  padding: 16px;
  background: var(--whatsapp);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
}

.btn-whatsapp:hover { background: var(--whatsapp-hover); transform: translateY(-1px); }

.btn-add-cart {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  margin-top: 10px;
  transition: var(--transition);
}

.btn-add-cart:hover { background: var(--bg); border-color: var(--text); }

/* ============ CART DRAWER ============ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-card);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}

.cart-drawer.open { transform: translateX(0); }

.cart-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
}

.cart-close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.cart-close:hover { background: var(--bg); }

.cart-items { flex: 1; overflow-y: auto; padding: 20px 28px; }

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 12px;
}

.cart-empty svg { opacity: 0.3; }

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.cart-item-img {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #F0EFEC;
}

.cart-item-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.cart-item-variant { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.cart-item-qty { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.cart-item-qty button { background: none; border: 1px solid var(--border); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: var(--transition); }
.cart-item-qty button:hover { background: var(--bg); }
.cart-item-price { font-size: 14px; font-weight: 600; }
.cart-item-remove { background: none; border: none; color: var(--text-light); font-size: 18px; line-height: 1; }
.cart-item-remove:hover { color: var(--red); }

.cart-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total-label { font-size: 13px; color: var(--text-muted); }
.cart-total-amount { font-size: 20px; font-weight: 700; }

.btn-checkout {
  width: 100%;
  padding: 16px;
  background: var(--whatsapp);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.btn-checkout:hover { background: var(--whatsapp-hover); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(37,211,102,0.3); }
.btn-checkout:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; transform: none; }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-state h3 { font-family: var(--font-display); font-size: 32px; font-weight: 300; margin-bottom: 8px; }
.empty-state p { font-size: 14px; font-weight: 300; }

/* ============ SKELETON LOADER ============ */
.skeleton {
  background: linear-gradient(90deg, #EEECEA 25%, #E5E3E0 50%, #EEECEA 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.skeleton-img { aspect-ratio: 3/4; }
.skeleton-text { height: 12px; margin: 16px 18px 8px; }
.skeleton-text-sm { height: 10px; margin: 0 18px; width: 60%; }
.skeleton-price { height: 16px; margin: 12px 18px 18px; width: 40%; }

/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--text);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transform: translateX(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show { transform: translateX(0); opacity: 1; }
.toast.success { background: #1a3a1a; border-left: 3px solid #4caf50; }
.toast.error { background: #3a1a1a; border-left: 3px solid var(--red); }

/* ============ FOOTER ============ */
.footer {
  background: var(--bg-dark);
  color: #999;
  text-align: center;
  padding: 40px;
  font-size: 12px;
  letter-spacing: 1px;
  margin-top: 40px;
}

.footer strong { color: #fff; font-family: var(--font-display); font-size: 16px; letter-spacing: 4px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .header { padding: 0 20px; }
  .hero { padding: 50px 20px; }
  .category-nav { padding: 0 20px; }
  .products-section { padding: 32px 20px; }
  .modal { grid-template-columns: 1fr; }
  .modal-image { aspect-ratio: 4/3; }
  .modal-body { padding: 28px 24px; max-height: 60vh; }
  .search-bar input { width: 120px; }
  .cart-drawer { width: 100%; }
}

@media (max-width: 480px) {
  .search-bar { display: none; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
