@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;700&display=swap');

:root {
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --primary: #e86a24;
  --primary-hover: #d65b18;
  --secondary: #1a2b4c;
  --border-color: #e2e8f0;
  --input-bg: #f8fafc;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  --header-bg: rgba(255, 255, 255, 0.9);
}

body.dark {
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --input-bg: #0f172a;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  --header-bg: rgba(30, 41, 59, 0.9);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-main); transition: background-color 0.3s ease, color 0.3s ease; min-height: 100vh; }
h1, h2, h3 { font-family: 'Outfit', sans-serif; color: var(--secondary); }
body.dark h1, body.dark h2, body.dark h3 { color: var(--text-main); }
a { text-decoration: none; color: var(--primary); }

/* Header */
header { position: sticky; top: 0; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; }
.logo-container { display: flex; flex-direction: column; }
.logo-text { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 700; color: var(--primary); line-height: 1; }
.logo-subtext { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.btn-outline { padding: 10px 20px; border: 1px solid var(--border-color); background: transparent; color: var(--text-main); border-radius: 8px; cursor: pointer; font-weight: 500; transition: all 0.2s; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { padding: 10px 20px; background: var(--primary); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; transition: all 0.2s; }
.btn-primary:hover { background: var(--primary-hover); }
.theme-toggle { background: none; border: none; color: var(--text-main); cursor: pointer; display: flex; align-items: center; }
.theme-toggle svg { width: 24px; height: 24px; }

/* Contenido Principal */
main { padding: 40px 5%; max-width: 1400px; margin: 0 auto; }
.hero { text-align: center; margin-bottom: 40px; }
.hero h1 { font-size: 2.5rem; margin-bottom: 10px; }
.hero p { color: var(--text-muted); font-size: 1.1rem; }
.search-bar { max-width: 600px; margin: 20px auto; display: flex; }
.search-bar input { width: 100%; padding: 15px 20px; border-radius: 30px; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-main); box-shadow: var(--shadow); outline: none; }

/* Catálogo Grid */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.product-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform 0.2s; }
.product-card:hover { transform: translateY(-5px); }
.product-category { font-size: 0.8rem; color: var(--primary); font-weight: 600; text-transform: uppercase; margin-bottom: 5px; }
.product-title { font-size: 1.2rem; margin-bottom: 10px; }
.product-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; flex-grow: 1; }
.product-actions { display: flex; gap: 10px; }
.product-actions button { flex: 1; padding: 10px; }

/* Modales (Login/Registro y Carrito) */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: center; z-index: 1000; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal-content { background: var(--card-bg); border-radius: 16px; padding: 30px; width: 100%; max-width: 450px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); position: relative; max-height: 90vh; overflow-y: auto; }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 24px; cursor: pointer; color: var(--text-muted); background: none; border: none; }
.modal-content h2 { margin-bottom: 20px; text-align: center; }

/* Formularios */
.tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.tab { flex: 1; padding: 10px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-muted); cursor: pointer; font-weight: 500; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 5px; color: var(--text-muted); }
.form-control { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--input-bg); color: var(--text-main); }
.form-control:focus { outline: none; border-color: var(--primary); }
.btn-full { width: 100%; padding: 14px; margin-top: 10px; }
.form-section { display: none; }
.form-section.active { display: block; }
.message { padding: 10px; border-radius: 8px; font-size: 14px; text-align: center; margin-bottom: 15px; display: none; }
.message.error { background: #fee2e2; color: #991b1b; display: block; }
.message.success { background: #dcfce7; color: #166534; display: block; }

/* Carrito Flotante */
.cart-btn { position: fixed; bottom: 30px; right: 30px; background: var(--primary); color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 10px 20px rgba(232, 106, 36, 0.4); cursor: pointer; border: none; font-size: 24px; z-index: 90; transition: transform 0.2s; }
.cart-btn:hover { transform: scale(1.1); }
.cart-count { position: absolute; top: -5px; right: -5px; background: var(--secondary); color: white; font-size: 12px; width: 24px; height: 24px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; }
