/* =========================================================
   NOVA STORE - DESIGN SYSTEM & STYLESHEET
   ========================================================= */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --whatsapp: #25D366;
  --whatsapp-hover: #1ebd5b;
  --whatsapp-dark: #128C7E;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* TOP ANNOUNCEMENT */
.top-announcement {
  background: linear-gradient(90deg, #1e293b, #0f172a);
  color: #e2e8f0;
  font-size: 0.82rem;
  padding: 8px 16px;
  text-align: center;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.announcement-content .separator {
  color: #64748b;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  font-size: 1.8rem;
  background: #eff6ff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo-accent {
  color: var(--primary);
}

.logo-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

/* SEARCH BOX */
.search-box-wrapper {
  flex: 1;
  max-width: 580px;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  padding: 0 16px;
  transition: var(--transition);
}

.search-input-group:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  margin-right: 10px;
  flex-shrink: 0;
}

.search-input-group input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}

.clear-search-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

/* CART BUTTON */
.cart-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.cart-button:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.cart-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.cart-icon-wrapper svg {
  width: 22px;
  height: 22px;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  padding: 0 4px;
}

/* HERO BANNER */
.hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f2744 100%);
  color: var(--text-white);
  padding: 48px 20px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.4px;
}

.hero-banner h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.8px;
  margin-bottom: 14px;
}

.hero-banner p {
  font-size: 1.05rem;
  color: #cbd5e1;
  margin-bottom: 28px;
  line-height: 1.6;
}

.trust-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.trust-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

/* CATEGORIES */
.categories-section {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}

.categories-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}

.categories-container::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.cat-chip:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.cat-chip.active {
  background: var(--text-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

/* MAIN CONTENT */
.main-content {
  max-width: 1280px;
  margin: 32px auto 80px;
  padding: 0 20px;
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.catalog-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.catalog-title-wrapper h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.products-count-badge {
  background: #e2e8f0;
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.catalog-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--success);
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* PRODUCTS GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: #cbd5e1;
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%;
  background: #f8fafc;
  overflow: hidden;
}

.card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .card-img {
  transform: scale(1.05);
}

.badge-offer {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--danger);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.badge-delivery {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 6px;
}

.card-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 10px;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-stock-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.stock-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.card-pricing {
  margin-top: auto;
  margin-bottom: 16px;
}

.old-price {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.current-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.current-price {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
}

.cod-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--whatsapp-dark);
  background: #e6f9f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-card-cart {
  background: var(--bg-main);
  border: 1.5px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-card-cart:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-card-wa {
  background: var(--whatsapp);
  border: none;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-card-wa:hover {
  background: var(--whatsapp-hover);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

/* NO RESULTS */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  max-width: 500px;
  margin: 40px auto;
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 16px;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

/* MODAL DE PRODUCTO */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: white;
  width: 100%;
  max-width: 760px;
  border-radius: var(--radius-lg);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.close-modal-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: white;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.close-modal-btn:hover {
  background: #f1f5f9;
}

.modal-body {
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
}

.modal-img-col img {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.modal-info-col h3 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 14px 0 20px;
}

.modal-features {
  list-style: none;
  margin-bottom: 24px;
}

.modal-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.modal-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 900;
}

/* CART DRAWER */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.25s ease;
}

.cart-drawer {
  background: white;
  width: 100%;
  max-width: 440px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: slideLeft 0.3s ease;
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

.drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.close-drawer-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cart-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.qty-btn {
  background: #f8fafc;
  border: none;
  width: 28px;
  height: 28px;
  font-weight: 700;
  cursor: pointer;
}

.qty-value {
  padding: 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.remove-item-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.cart-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.free-shipping-text {
  color: var(--success);
  font-weight: 700;
}

.total-row {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.total-amount {
  color: var(--primary);
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--whatsapp);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.btn-whatsapp-checkout {
  width: 100%;
  background: var(--whatsapp);
  color: white;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: var(--transition);
}

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

.whatsapp-note {
  font-size: 0.74rem;
  text-align: center;
  color: var(--text-muted);
  margin-top: 10px;
}

/* FLOATING WHATSAPP BUTTON */
.floating-whatsapp {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 62px;
  height: 62px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  z-index: 990;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
}

.whatsapp-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--whatsapp);
  opacity: 0.6;
  animation: pulse-ring 2s infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

.whatsapp-tooltip {
  position: absolute;
  right: 74px;
  background: var(--bg-dark);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition);
}

.floating-whatsapp:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* FOOTER */
.footer {
  background: var(--bg-dark);
  color: #94a3b8;
  padding: 50px 20px 24px;
  border-top: 1px solid #1e293b;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.footer-col p {
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 0.8rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-banner h1 {
    font-size: 1.6rem;
  }
  .modal-body {
    grid-template-columns: 1fr;
  }
  .cart-drawer {
    max-width: 100%;
  }
  .card-actions {
    grid-template-columns: 1fr;
  }
  .nav-container {
    flex-wrap: wrap;
  }
  .search-box-wrapper {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
}
