:root {
  --charcoal: #0c1a22;
  --aegean: #1a4d6f;
  --sand: #e3c08f;
  --mist: rgba(244, 246, 245, 0.75);
  --chalk: #f4f6f5;
  --hairline: rgba(244, 246, 245, 0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--charcoal);
  color: var(--chalk);
  line-height: 1.6;
}

/* Navigation */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(12, 26, 34, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 32px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wordmark {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--sand);
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-right a {
  color: var(--mist);
  text-decoration: none;
  font-size: 13px;
  font-family: 'IBM Plex Mono', monospace;
  transition: color 0.2s;
}

.nav-right a:hover,
.nav-right a.active {
  color: var(--sand);
}

.lang-switch {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--sand);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  transition: all 0.2s;
}

.lang-switch:hover {
  background: rgba(227, 192, 143, 0.1);
  border-color: var(--sand);
}

/* Hero Section */
.shop-hero {
  padding: 120px 32px 80px;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.headline {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.accent {
  color: var(--sand);
}

.subtitle {
  font-size: 18px;
  color: var(--mist);
  margin-bottom: 32px;
  line-height: 1.8;
}

.btn-cta {
  display: inline-block;
  background: var(--sand);
  color: var(--charcoal);
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(227, 192, 143, 0.3);
}

/* Filters */
.filters-section {
  padding: 40px 32px;
  border-top: 1px solid var(--hairline);
}

.filters-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.filter-pill {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--mist);
  padding: 10px 20px;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.filter-pill:hover {
  border-color: var(--sand);
  color: var(--sand);
}

.filter-pill.active {
  background: var(--sand);
  color: var(--charcoal);
  border-color: var(--sand);
}

/* Templates Grid */
.templates-section {
  padding: 60px 32px 120px;
}

.templates-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 40px;
  margin-top: 20px;
}

.template-card {
  background: rgba(26, 77, 111, 0.15);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.template-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--sand);
  border-color: var(--sand);
}

.template-preview {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: rgba(12, 26, 34, 0.8);
  position: relative;
}

.template-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.template-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.template-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.template-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--chalk);
  letter-spacing: -0.3px;
}

.template-price {
  color: var(--sand);
  font-weight: 600;
  font-size: 18px;
}

.template-tagline {
  color: var(--sand);
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}

.template-description {
  color: var(--mist);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
  min-height: 60px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.template-meta {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 20px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 11px;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 14px;
  color: var(--chalk);
  font-weight: 600;
}

.template-actions {
  display: flex;
  gap: 12px;
}

.btn-view,
.btn-customize {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-view {
  background: var(--aegean);
  border: 1px solid var(--aegean);
  color: var(--chalk);
}

.btn-view:hover {
  background: rgba(26, 77, 111, 0.8);
  border-color: var(--sand);
  color: var(--sand);
  transform: translateY(-2px);
}

.btn-customize {
  background: var(--sand);
  border: 1px solid var(--sand);
  color: var(--charcoal);
}

.btn-customize:hover {
  background: rgba(227, 192, 143, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(227, 192, 143, 0.3);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 32px;
}

.empty-state h3 {
  font-size: 24px;
  color: var(--chalk);
  margin-bottom: 12px;
}

.empty-state p {
  color: var(--mist);
  font-size: 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 32px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  color: var(--mist);
}

.footer-inner a {
  color: var(--mist);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-inner a:hover {
  color: var(--sand);
}

/* Responsive */
@media (max-width: 768px) {
  .headline {
    font-size: 32px;
  }
  
  .subtitle {
    font-size: 16px;
  }
  
  .templates-grid {
    grid-template-columns: 1fr;
  }
  
  .template-actions {
    flex-direction: column;
  }
}

/* Customization form */
.form-page {
  padding: 48px 24px 80px;
}

.form-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.form-container [hidden] {
  display: none !important;
}

.submission-success {
  padding: clamp(32px, 7vw, 72px) 24px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: rgba(26, 77, 111, 0.15);
  text-align: center;
}

.submission-success-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  color: var(--sand);
}

.submission-success .step-title {
  margin-bottom: 12px;
}

.submission-success .step-description {
  margin: 0 auto;
}

.submission-success .btn-large {
  margin-top: 28px;
}

.form-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 48px;
}

.progress-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--mist);
  text-align: center;
}

.progress-step:not(:last-child)::after {
  position: absolute;
  top: 17px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 1px;
  background: var(--hairline);
  content: "";
}

.progress-circle {
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--charcoal);
  font-size: 13px;
}

.progress-step.active,
.progress-step.completed {
  color: var(--sand);
}

.progress-step.active .progress-circle,
.progress-step.completed .progress-circle {
  border-color: var(--sand);
  background: var(--sand);
  color: var(--charcoal);
}

.progress-label {
  font-size: 12px;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.step-header {
  margin-bottom: 32px;
}

.step-number {
  margin-bottom: 8px;
  color: var(--sand);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.step-title {
  margin-bottom: 10px;
  color: var(--chalk);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
}

.step-description {
  max-width: 68ch;
  color: var(--mist);
  font-size: 15px;
  line-height: 1.7;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  color: var(--chalk);
  font-size: 14px;
  font-weight: 600;
}

.field-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  outline: none;
  background: rgba(244, 246, 245, 0.05);
  color: var(--chalk);
  font: inherit;
  font-size: 14px;
}

.field-input::placeholder {
  color: rgba(244, 246, 245, 0.45);
}

.field-input:focus {
  border-color: var(--sand);
  box-shadow: 0 0 0 3px rgba(227, 192, 143, 0.12);
}

.field-textarea {
  min-height: 120px;
  resize: vertical;
}

.radio-group,
.checkbox-group {
  display: grid;
  gap: 10px;
}

.radio-item,
.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--mist);
  cursor: pointer;
  font-size: 14px;
}

.radio-item:has(input:checked),
.checkbox-item:has(input:checked) {
  border-color: var(--sand);
  background: rgba(227, 192, 143, 0.08);
  color: var(--chalk);
}

.radio-item input,
.checkbox-item input {
  margin-top: 3px;
  accent-color: var(--sand);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}

.submission-error {
  margin-top: 20px;
  color: #ff9a91;
  font-size: 14px;
}

.btn-back,
.btn-next,
.btn-large {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-back {
  border-color: var(--hairline);
  background: transparent;
  color: var(--chalk);
}

.btn-next,
.btn-large {
  background: var(--sand);
  color: var(--charcoal);
}

.btn-back:hover,
.btn-next:hover,
.btn-large:hover {
  transform: translateY(-1px);
}

.btn-back:hover {
  border-color: var(--sand);
}

.btn-next:hover,
.btn-large:hover {
  background: #edcc9d;
}

@media (max-width: 600px) {
  .form-page {
    padding: 40px 18px 64px;
  }

  .form-progress {
    margin-bottom: 36px;
  }

  .progress-label {
    font-size: 10px;
  }

  .progress-step:not(:last-child)::after {
    left: calc(50% + 15px);
    width: calc(100% - 30px);
  }

  .progress-circle {
    width: 30px;
    height: 30px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .form-actions {
    position: sticky;
    bottom: 0;
    padding: 12px 0;
    background: var(--charcoal);
  }
}