/* LetreroYa Design System */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:wght@400;500;600&display=swap');

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

:root {
  --sun: #F59E0B;
  --sun-light: #FCD34D;
  --sun-dark: #D97706;
  --earth: #1C1917;
  --earth-warm: #292524;
  --earth-light: #44403C;
  --cream: #FFFBEB;
  --cream-deep: #FEF3C7;
  --terracotta: #DC2626;
  --sage: #065F46;
  --sage-light: #059669;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--earth);
  color: var(--cream);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ========== Navigation ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(28, 25, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.1);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--sun);
  letter-spacing: -0.03em;
  text-decoration: none;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: rgba(255, 251, 235, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.nav-links .nav-cta {
  background: var(--sun);
  color: var(--earth);
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.nav-links .nav-cta:hover {
  background: var(--sun-light);
  color: var(--earth);
}

.nav-lang {
  font-size: 0.8rem;
  color: rgba(255, 251, 235, 0.4);
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(255, 251, 235, 0.15);
  border-radius: 4px;
  transition: all 0.2s;
}

.nav-lang:hover {
  border-color: var(--sun);
  color: var(--sun);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--earth);
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
    flex-direction: column;
    padding: 1rem;
    gap: 0.8rem;
  }
  .nav-links.open { display: flex; }
}

/* ========== Page Header ========== */
.page-header {
  padding: 3rem 2rem 2rem;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(245, 158, 11, 0.1) 0%, transparent 60%),
    var(--earth);
}

.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.8rem;
}

.page-header h1 .highlight { color: var(--sun); }

.page-header p {
  color: rgba(255, 251, 235, 0.6);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ========== Category Tabs ========== */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 2rem;
  flex-wrap: wrap;
}

.category-tab {
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: transparent;
  color: rgba(255, 251, 235, 0.6);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.category-tab:hover {
  border-color: var(--sun);
  color: var(--cream);
}

.category-tab.active {
  background: var(--sun);
  color: var(--earth);
  border-color: var(--sun);
  font-weight: 600;
}

/* ========== Template Grid ========== */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.template-card {
  background: var(--earth-warm);
  border: 1px solid rgba(245, 158, 11, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.template-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.template-preview {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.template-card-body {
  padding: 1.2rem 1.5rem 1.5rem;
}

.template-category-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sun);
  margin-bottom: 0.4rem;
}

.template-card-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.template-card-body .template-desc {
  font-size: 0.85rem;
  color: rgba(255, 251, 235, 0.5);
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.template-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--sun-light);
}

.template-price .currency {
  font-size: 0.85rem;
  color: rgba(255, 251, 235, 0.4);
}

.btn-customize {
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  border: none;
  background: var(--sun);
  color: var(--earth);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-customize:hover {
  background: var(--sun-light);
  transform: scale(1.02);
}

/* ========== Customizer Page ========== */
.customizer-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 200px);
}

@media (max-width: 900px) {
  .customizer-layout {
    grid-template-columns: 1fr;
  }
}

.customizer-form {
  padding: 2rem;
  background: var(--earth-warm);
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.08);
}

.customizer-form h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.customizer-form .form-subtitle {
  color: rgba(255, 251, 235, 0.5);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--cream-deep);
}

.form-group label .label-en {
  font-weight: 400;
  color: rgba(255, 251, 235, 0.3);
  font-size: 0.8rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.15);
  background: var(--earth);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--sun);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23F59E0B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--earth);
  color: var(--cream);
}

/* Material & size info */
.template-specs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.spec-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.08);
  font-size: 0.8rem;
  color: rgba(255, 251, 235, 0.6);
}

.spec-badge .spec-icon {
  font-size: 0.9rem;
}

/* Preview panel */
.customizer-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.preview-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 251, 235, 0.3);
  margin-bottom: 1.5rem;
}

.sign-preview-container {
  width: 100%;
  max-width: 450px;
  aspect-ratio: auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transition: all 0.3s;
}

/* Sign preview styles */
.sign-preview {
  width: 100%;
  min-height: 250px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.sign-preview .sign-business-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.sign-preview .sign-tagline {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.sign-preview .sign-phone {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

.sign-preview .sign-hours {
  font-size: 0.85rem;
  opacity: 0.8;
  white-space: pre-line;
  margin-top: 0.5rem;
  line-height: 1.6;
}

.sign-preview .sign-menu-items {
  font-size: 0.85rem;
  text-align: left;
  white-space: pre-line;
  line-height: 1.8;
  width: 100%;
  margin-top: 0.5rem;
}

/* Safety sign specific */
.sign-preview.safety-warning {
  border: 6px solid #1C1917;
}

.sign-preview.safety-danger {
  border: 6px solid #FFFBEB;
}

.sign-preview.safety-exit {
  border: 4px solid #FFFBEB;
}

.sign-preview .safety-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.sign-preview .safety-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Banner specific */
.sign-preview.banner-style {
  min-height: 180px;
  padding: 1.5rem 2rem;
}

.sign-preview .banner-main {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

/* Order button area */
.order-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 158, 11, 0.1);
}

.order-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--sun-light);
  margin-bottom: 1rem;
}

.order-price .price-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 251, 235, 0.4);
  font-family: 'DM Sans', sans-serif;
}

.btn-order {
  display: block;
  width: 100%;
  padding: 1rem;
  border-radius: 8px;
  border: none;
  background: var(--sun);
  color: var(--earth);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
}

.btn-order:hover {
  background: var(--sun-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

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

.order-note {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 251, 235, 0.3);
  margin-top: 0.8rem;
}

/* ========== Confirmation Page ========== */
.confirmation-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 3rem 2rem;
  text-align: center;
}

.confirmation-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.confirmation-page h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--sun-light);
}

.confirmation-page p {
  color: rgba(255, 251, 235, 0.6);
  font-size: 1.1rem;
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.confirmation-page .order-number {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--cream);
  font-size: 1.2rem;
  background: var(--earth-warm);
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  margin: 1.5rem 0;
  display: inline-block;
}

.btn-back-catalog {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  background: transparent;
  color: var(--sun);
  border: 1px solid var(--sun);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  margin-top: 1rem;
  transition: all 0.2s;
}

.btn-back-catalog:hover {
  background: var(--sun);
  color: var(--earth);
}

/* ========== Footer ========== */
.site-footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(245, 158, 11, 0.1);
  margin-top: auto;
}

.site-footer .logo {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.site-footer p {
  font-size: 0.8rem;
  color: rgba(255, 251, 235, 0.3);
}

/* ========== Loading ========== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: rgba(255, 251, 235, 0.4);
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--sun);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 0.8rem;
}

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

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255, 251, 235, 0.4);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ========== Utilities ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
