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

:root {
  /* Light Theme (default) */
  --primary: #FF9F1C;
  --primary-dark: #FF8C00;
  --primary-glow: rgba(255, 159, 28, 0.3);
  --secondary: #2D3436;
  --accent: #FF6B35;
  --accent-dark: #E55A2B;
  --background: #F8F9FA;
  --surface: #FFFFFF;
  --surface-light: #E9ECEF;
  --surface-lighter: #DEE2E6;
  --text-primary: #2D3436;
  --text-secondary: #636E72;
  --text-muted: #ADB5BD;
  --success: #28A745;
  --warning: #FDCB6E;
  --error: #E74C3C;
  --gradient-start: #F8F9FA;
  --gradient-end: #E9ECEF;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px var(--primary-glow);
  --navbar-bg: rgba(248, 249, 250, 0.95);
  --border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --primary: #FF9F1C;
  --primary-dark: #FF8C00;
  --primary-glow: rgba(255, 159, 28, 0.4);
  --secondary: #2D3436;
  --accent: #FF6B35;
  --accent-dark: #E55A2B;
  --background: #0F0F1A;
  --surface: #1A1A2E;
  --surface-light: #252542;
  --surface-lighter: #2F2F52;
  --text-primary: #FFFFFF;
  --text-secondary: #B2BEC3;
  --text-muted: #636E72;
  --success: #FF9F1C;
  --warning: #FDCB6E;
  --error: #E74C3C;
  --gradient-start: #0F0F1A;
  --gradient-end: #1A1A2E;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px var(--primary-glow);
  --navbar-bg: rgba(15, 15, 26, 0.95);
  --border-color: rgba(255, 159, 28, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

/* Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 159, 28, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 159, 28, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--navbar-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

/* Theme Toggle */
.theme-toggle {
  background: var(--surface-light);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.theme-toggle:hover {
  background: var(--primary);
  color: var(--background);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: all 0.3s ease;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  text-shadow: 0 0 10px var(--primary-glow);
}

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

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  gap: 3rem;
}

.hero-image {
  flex: 1;
  max-width: 500px;
  animation: float 6s ease-in-out infinite;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(255, 159, 28, 0.3);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 159, 28, 0.1) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 600px;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { filter: drop-shadow(0 0 10px var(--primary-glow)); }
  to { filter: drop-shadow(0 0 20px var(--primary-glow)); }
}

.hero p {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Buttons */
.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--background);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--text-primary);
}

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

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Sections */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.section-title span {
  color: var(--primary);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.product-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.product-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: var(--surface-light);
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.product-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--surface);
  border-radius: 16px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  border: 1px solid rgba(0, 212, 170, 0.2);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-image {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  background: var(--surface-light);
}

.modal-info {
  padding: 2rem;
}

.modal-info h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.modal-info p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: var(--surface-light);
  border: none;
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--error);
  transform: rotate(90deg);
}

/* Order Form */
.order-form {
  background: var(--surface);
  padding: 3rem;
  border-radius: 16px;
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid rgba(0, 212, 170, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--surface-light);
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.file-input-wrapper {
  position: relative;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--surface-light);
  border: 2px dashed var(--text-muted);
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.file-input-wrapper:hover .file-input-button {
  border-color: var(--primary);
  color: var(--primary);
}

.image-preview {
  margin-top: 1rem;
  max-width: 200px;
  border-radius: 8px;
  display: none;
}

.image-preview.visible {
  display: block;
}

/* Contact Section */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.instagram-link:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(225, 48, 108, 0.4);
}

.contact-info {
  margin-top: 2rem;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--surface-light);
  color: var(--text-muted);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  color: var(--text-primary);
  font-weight: 500;
  transform: translateX(150%);
  transition: transform 0.3s ease;
  z-index: 3000;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: var(--success);
  color: var(--background);
}

.toast.error {
  background: var(--error);
}

.toast.warning {
  background: var(--warning);
  color: var(--secondary);
}

/* Loading Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--surface);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .mobile-menu {
    display: flex;
  }

  .mobile-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    flex-direction: column-reverse;
  }

  .hero-image {
    max-width: 300px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .section {
    padding: 4rem 1rem;
  }

  .order-form {
    padding: 2rem 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin Panel Styles */
.admin-body {
  background: var(--background);
}

.admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-light);
}

.admin-nav h1 {
  font-size: 1.25rem;
  color: var(--primary);
}

.admin-nav .btn-logout {
  padding: 0.5rem 1rem;
  background: var(--surface-light);
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-nav .btn-logout:hover {
  background: var(--error);
  color: var(--text-primary);
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--surface-light);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--primary);
}

.stat-card h3 {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-family: 'Outfit', sans-serif;
}

.stat-card .value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-card.pending .value { color: var(--warning); }
.stat-card.process .value { color: var(--accent); }
.stat-card.completed .value { color: var(--success); }

/* Admin Section */
.admin-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.admin-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--surface-light);
}

.data-table th {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
}

.data-table tr:hover {
  background: var(--surface-light);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.pendiente {
  background: rgba(253, 203, 110, 0.2);
  color: var(--warning);
}

.status-badge.en_proceso {
  background: rgba(108, 92, 231, 0.2);
  color: var(--accent);
}

.status-badge.completado {
  background: rgba(0, 212, 170, 0.2);
  color: var(--success);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn.edit {
  background: var(--accent);
  color: var(--text-primary);
}

.action-btn.delete {
  background: var(--error);
  color: var(--text-primary);
}

.action-btn:hover {
  transform: scale(1.1);
}

/* Modal Forms */
.form-modal {
  max-width: 500px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: var(--surface);
  padding: 3rem;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--surface-light);
}

.login-card h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
}

.login-card .form-group {
  margin-bottom: 1.5rem;
}

.login-card .btn {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}

.login-error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: none;
}

.login-error.show {
  display: block;
}

/* Tab Navigation */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--surface-light);
  padding-bottom: 1rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: var(--surface-light);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--primary);
  color: var(--background);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Image Thumbnails */
.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}