/* Paleta de colores para tienda online */
:root {
  --background: #ffffff;
  --foreground: #374151;
  --card: #ffffff;
  --card-foreground: #374151;
  --popover: #fefce8;
  --popover-foreground: #374151;
  --primary: #d97706;
  --primary-foreground: #ffffff;
  --secondary: #f59e0b;
  --secondary-foreground: #ffffff;
  --muted: #fefce8;
  --muted-foreground: #6b7280;
  --accent: #f59e0b;
  --accent-foreground: #ffffff;
  --destructive: #be123c;
  --destructive-foreground: #ffffff;
  --border: #e5e7eb;
  --input: #f1f5f9;
  --ring: rgba(217, 119, 6, 0.5);
  --chart-1: #f59e0b;
  --chart-2: #d97706;
  --chart-3: #be123c;
  --chart-4: #ec4899;
  --chart-5: #8b5cf6;
  --radius: 0.5rem;
  --sidebar: #ffffff;
  --sidebar-foreground: #374151;
  --sidebar-primary: #fefce8;
  --sidebar-primary-foreground: #374151;
  --sidebar-accent: #d97706;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: #d97706;
  --sidebar-ring: rgba(217, 119, 6, 0.5);
}

/* Modo oscuro */
.dark {
  --background: #1f2937;
  --foreground: #f9fafb;
  --card: #374151;
  --card-foreground: #f9fafb;
  --popover: #374151;
  --popover-foreground: #f9fafb;
  --primary: #f59e0b;
  --primary-foreground: #1f2937;
  --secondary: #4b5563;
  --secondary-foreground: #f9fafb;
  --muted: #4b5563;
  --muted-foreground: #9ca3af;
  --accent: #d97706;
  --accent-foreground: #f9fafb;
  --destructive: #ef4444;
  --destructive-foreground: #f9fafb;
  --border: #4b5563;
  --input: #374151;
  --ring: rgba(245, 158, 11, 0.5);
  --sidebar: #374151;
  --sidebar-foreground: #f9fafb;
  --sidebar-primary: #f59e0b;
  --sidebar-primary-foreground: #1f2937;
  --sidebar-accent: #4b5563;
  --sidebar-accent-foreground: #f9fafb;
  --sidebar-border: #4b5563;
  --sidebar-ring: rgba(245, 158, 11, 0.5);
}

/* Estilos base */
* {
  border-color: var(--border);
  outline-color: var(--ring);
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* Componentes comunes */
.card {
  background-color: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.button {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
}

.button:hover {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.input {
  background-color: var(--input);
  border: 1px solid var(--border);
  padding: 0.5rem;
  border-radius: var(--radius);
  width: 100%;
  font-size: 1rem;
}

.label {
  font-weight: bold;
  margin-bottom: 0.25rem;
  display: block;
}

.product-placeholder {
  width: 160px;   /* más ancho que alto */
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto 10px auto;
}

.product-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* llena todo el espacio, puede recortar un poco */
}

.home-style {
    background-color: var(--background);
    margin: 0;
    font-family: Arial, sans-serif;
}

.home-style header {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-style .logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-style .logo-circle {
    background-color: var(--primary);
    border-radius: 50%;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-foreground);
    font-size: 1.5rem;
}

.home-style .search-input {
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 200px;
}

.home-style .categories button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    width: 100%;
    border: none;
    background: var(--input);
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.home-style .categories button.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.home-style main {
    flex: 1;
    padding: 1rem;
}

.home-style .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.home-style .product-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    background-color: var(--card);
    transition: box-shadow 0.2s;
}

.home-style .product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.home-style .product-placeholder {
    background-color: var(--muted);
    height: 150px;
    border-radius: var(--radius);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.home-style .flex {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-style .justify-between {
    justify-content: space-between;
}

.home-style .sidebar {
    width: 200px;
    flex-shrink: 0;
}

.home-style .container {
    display: flex;
    gap: 1rem;
    max-width: 1200px;
    margin: 1rem auto;
}

.home-style .button-sm {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    background-color: var(--primary);
    color: var(--primary-foreground);
}


.index-style .screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--muted);
    padding: 1rem;
}

.index-style .card-header {
    text-align: center;
    margin-bottom: 1rem;
}

.index-style .icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.index-style .icon-circle {
    background-color: var(--primary);
    border-radius: 50%;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.index-style .icon-circle span {
    font-size: 2rem;
    color: var(--primary-foreground);
}

.index-style .card-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.index-style .card-description {
    color: var(--muted-foreground);
    font-size: 0.95rem;
}

.index-style .form-group {
    margin-bottom: 1rem;
}

.index-style .button.w-full {
    width: 100%;
}

.register-style .screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--muted);
    padding: 1rem;
}

.register-style .card-header {
    text-align: center;
    margin-bottom: 1rem;
}

.register-style .card-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.register-style .card-description {
    color: var(--muted-foreground);
    font-size: 0.95rem;
}

.register-style .form-group {
    margin-bottom: 1rem;
}

.register-style .button.w-full {
    width: 100%;
}

#theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  z-index: 1000;
}

#theme-toggle:hover {
  transform: scale(1.1);
  background-color: var(--accent);
}

body {
  background: linear-gradient(135deg, #0a0a0f, #1b1b26, #2a2a3a);
  color: #f5f5f7;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: var(--bg-dark);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  box-shadow: 2px 0 20px var(--shadow);
}

.logo-container {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-container img {
  width: 100px;
  height: auto;
}

.nav-categories button {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin: 0.3rem 0;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--text-light);
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.25s all;
}
.nav-categories button:hover,
.nav-categories button.active {
  background: var(--bg-hover);
  box-shadow: 0 0 10px var(--accent);
  color: var(--accent);
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Main content */
.main-content {
  margin-left: 220px;
  padding: 2rem;
  flex: 1;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.search-input {
  flex: 2;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: none;
  background: #1c1c1c;
  color: var(--text-light);
  font-size: 1rem;
  transition: 0.25s all;
}
.search-input:focus {
  outline: none;
  box-shadow: 0 0 10px var(--accent);
}

/* Grid de productos */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px var(--shadow);
}
.product-card img {
  width: 100%;
  display: block;
  border-bottom: 1px solid #222;
}
.product-card h4 {
  margin: 0.5rem 1rem;
  font-weight: 600;
  font-size: 1rem;
}
.product-card .flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem 0.5rem 1rem;
}
.product-card .button-sm {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s all;
}
.product-card .button-sm:hover {
  background: #33c8ff;
  box-shadow: 0 0 8px var(--accent);
}

/* Carrito */
.cart-popup {
  display: none;
  position: fixed;
  right: 2rem;
  top: 5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem;
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 0 20px var(--shadow);
  z-index: 1000;
}
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.cart-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

:root {
  --bg-dark: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-hover: #222222;
  --accent: #5ac8fa;
  --text-light: #f5f5f5;
  --text-muted: #aaa;
  --shadow: rgba(0, 0, 0, 0.5);
  --radius: 12px;
}

body.home-style {
  font-family: 'San Francisco', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin: 0;
  background: linear-gradient(145deg, #111, #0a0a0a);
  color: var(--text-light);
}

/* Barra superior */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0 2px 10px var(--shadow);
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-container img {
  width: 60px;
  height: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.search-input {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: none;
  background: #1c1c1c;
  color: var(--text-light);
  font-size: 1rem;
}
.search-input:focus {
  outline: none;
  box-shadow: 0 0 10px var(--accent);
}

/* Botones */
.button-sm {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s all;
}
.button-sm:hover {
  background: #33c8ff;
  box-shadow: 0 0 8px var(--accent);
}

/* Sidebar categorías */
.sidebar {
  position: fixed;
  top: 70px; /* debajo del header */
  left: 0;
  width: 220px;
  height: calc(100vh - 70px);
  background: var(--bg-dark);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 2px 0 20px var(--shadow);
}

.nav-categories {
  margin-top: 1rem; /* separa las categorías del top del sidebar */
}

.nav-categories button {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin: 0.3rem 0;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--text-light);
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.25s all;
}
.nav-categories button:hover,
.nav-categories button.active {
  background: var(--bg-hover);
  box-shadow: 0 0 10px var(--accent);
  color: var(--accent);
}

/* Main content */
.main-content {
  margin-left: 220px;
  padding: 100px 2rem 2rem 2rem; /* padding-top deja espacio al header */
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

/* Productos */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px var(--shadow);
}
.product-card img {
  width: 100%;
  display: block;
  border-bottom: 1px solid #222;
}
.product-card h4 {
  margin: 0.5rem 1rem;
  font-weight: 600;
  font-size: 1rem;
}
.product-card .flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem 0.5rem 1rem;
}

/* Fondo claro por defecto */
body.home-style {
  background: linear-gradient(145deg, #f5f5f5, #eaeaea);
  color: #000;
}

/* Fondo oscuro solo cambia el fondo */
body.home-style.dark-bg {
  background: linear-gradient(145deg, #111, #0a0a0a);
  color: #f5f5f5; /* opcional, si quieres texto claro sobre fondo oscuro */
}


/* Layout principal */
.main-layout {
  display: flex;
  gap: 20px;
  padding: 20px;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
}

/* Contenedor del carousel */
.carousel-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Carousel estilo banner */
#promoCarousel {
  width: 900px;
  border-radius: 20px;
  overflow: hidden;
}

/* Imágenes */
#promoCarousel img {
  height: 350px;
  width: 100%;
  object-fit: cover;
}


/* Barra horizontal de categorías */
.categories-bar {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding: 15px 0;
  background: #111;  /* Color de fondo */
  border-bottom: 1px solid #333;
}

.categories-bar button {
  background: #222;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.categories-bar button:hover {
  background: #444;
}

.categories-bar .active {
  background: #0d6efd;
}

/* Contenedor del carousel */
.carousel-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

#promoCarousel {
  width: 900px;
  border-radius: 20px;
  overflow: hidden;
}

#promoCarousel img {
  height: 350px;
  object-fit: cover;
  width: 100%;
}