/* ===== CSS Variables – ejo Style ===== */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --text: #1A1A2E;
  --text-secondary: #6B6B80;
  --text-tertiary: #A0A0B0;
  --border: #E4E4EC;
  --border-light: #EDEDF3;
  --accent: #E6007E;
  --accent-hover: #C80069;
  --accent-light: rgba(230, 0, 126, 0.08);
  --accent-cyan: #00AEEF;
  --accent-navy: #1A2068;
  --danger: #C44B4B;
  --success: #3A7D5C;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.07);
  --shadow-lg: 6px 6px 9px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --font-display: Tahoma, 'Segoe UI', sans-serif;
  --font-body: Tahoma, 'Segoe UI', sans-serif;
  --header-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  font-size: inherit;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.8;
}

.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.5px;
  line-height: 1.4;
  color: var(--text-secondary);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent);
}

.cart-toggle {
  position: relative;
  padding: 8px;
  color: var(--text);
  transition: color var(--transition), transform var(--transition);
}

.cart-toggle:hover {
  color: var(--accent);
  transform: scale(1.05);
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 0;
  width: 18px;
  height: 18px;
  background: var(--accent);
  color: var(--surface);
  font-size: 10px;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition);
}

.cart-badge.visible {
  opacity: 1;
  transform: scale(1);
}

/* ===== Main ===== */
.main {
  min-height: 100vh;
  padding-top: var(--header-h);
}

/* ===== Views ===== */
.view {
  padding: 48px 32px 80px;
  max-width: 1200px;
  margin: 0 auto;
  animation: viewFadeIn 0.6s ease forwards;
}

.view.hidden {
  display: none;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 64px 0 56px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 400;
  letter-spacing: -1.5px;
  line-height: 1;
  color: var(--text);
  animation: heroTitleIn 0.8s ease forwards;
  opacity: 0;
}

@keyframes heroTitleIn {
  from {
    opacity: 0;
    transform: translateY(24px);
    letter-spacing: 8px;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: -1.5px;
  }
}

.hero-subtitle {
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 12px;
  font-weight: 500;
  animation: heroSubIn 0.8s 0.2s ease forwards;
  opacity: 0;
}

@keyframes heroSubIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Products Grid ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border-light);
  opacity: 0;
  transform: translateY(24px);
  animation: cardIn 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.15s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.25s; }
.product-card:nth-child(5) { animation-delay: 0.3s; }
.product-card:nth-child(6) { animation-delay: 0.35s; }

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

.product-card-image {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  position: relative;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card-info {
  padding: 20px 24px;
}

.product-card-name {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 4px;
}

.product-card-price {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

/* ===== Back Button ===== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  padding: 8px 0;
  transition: color var(--transition);
}

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

.back-btn svg {
  transition: transform var(--transition);
}

.back-btn:hover svg {
  transform: translateX(-4px);
}

/* ===== Product Detail ===== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.product-gallery {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.product-image-main {
  aspect-ratio: 4/5;
  background: #f8f8f8;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.product-image-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  transition: opacity 0.3s ease;
}

.product-info {
  padding: 8px 0;
}

.product-name {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 4px;
}

.product-model {
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.product-price {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 32px;
}

.product-section {
  margin-bottom: 28px;
}

.product-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* Color Swatches */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  padding: 3px;
}

.color-swatch::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--swatch-color);
  transition: transform var(--transition);
}

.color-swatch:hover {
  border-color: var(--border);
}

.color-swatch.active {
  border-color: var(--accent);
}

.color-swatch.active::before {
  transform: scale(0.85);
}

.color-swatch[data-hex="#FFFFFF"]::before,
.color-swatch[data-hex="#F0E8D8"]::before {
  box-shadow: inset 0 0 0 1px var(--border);
}

.color-name {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  min-height: 20px;
}

/* Size Selector */
.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-btn {
  min-width: 52px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  padding: 0 16px;
}

.size-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.size-btn.active {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}

/* Style Selector */
.style-options {
  display: flex;
  gap: 8px;
}

.style-btn {
  flex: 1;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 400;
  transition: all var(--transition);
}

.style-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.style-btn.active {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}

/* Name Personalization */
.name-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 8px;
}

.name-option:hover {
  border-color: var(--accent);
}

.name-option.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.name-option input[type="radio"] {
  display: none;
}

.name-option-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.name-option.active .name-option-radio {
  border-color: var(--accent);
}

.name-option-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform var(--transition);
}

.name-option.active .name-option-radio::after {
  transform: scale(1);
}

.name-option-text {
  flex: 1;
  font-size: 14px;
}

.name-option-price {
  font-size: 13px;
  color: var(--text-secondary);
}

.name-input-wrapper {
  margin-top: 12px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.name-input-wrapper.visible {
  max-height: 60px;
  opacity: 1;
}

.name-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 16px;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.name-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* Product Description */
.product-description {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}

.product-description h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.product-description p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 32px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(155, 81, 224, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
}

.btn-add-cart {
  margin-top: 8px;
}

/* ===== Cart Sidebar ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.25);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.cart-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: var(--surface);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  box-shadow: var(--shadow-lg);
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-light);
}

.cart-header h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
}

.cart-close {
  padding: 4px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.cart-close:hover {
  color: var(--accent);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 28px;
}

.cart-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 14px;
}

.cart-empty.hidden {
  display: none;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
  animation: cartItemIn 0.3s ease forwards;
}

@keyframes cartItemIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.cart-item-image {
  width: 72px;
  height: 72px;
  background: #f8f8f8;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.cart-item-details {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.cart-item-qty button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
}

.cart-item-qty button:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.cart-item-qty span {
  width: 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.cart-item-remove {
  color: var(--text-tertiary);
  font-size: 12px;
  transition: color var(--transition);
  margin-left: 12px;
}

.cart-item-remove:hover {
  color: var(--danger);
}

.cart-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border-light);
}

.cart-footer.hidden {
  display: none;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ===== Checkout ===== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: start;
}

.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 32px;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-small {
  max-width: 120px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--surface);
  color: var(--text);
}

.form-group textarea {
  height: auto;
  padding: 12px 16px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.disclaimer {
  padding: 16px;
  background: var(--accent-light);
  border-radius: var(--radius);
  margin: 8px 0;
  border-left: 3px solid var(--accent);
}

.disclaimer p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.checkout-summary-section {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 28px;
}

.checkout-summary-section .section-title {
  font-size: 22px;
  margin-bottom: 20px;
}

.checkout-cart-items {
  display: flex;
  flex-direction: column;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}

.checkout-item:last-child {
  border-bottom: none;
}

.checkout-item-left {
  flex: 1;
}

.checkout-item-name {
  font-weight: 500;
  margin-bottom: 2px;
}

.checkout-item-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.checkout-item-price {
  font-weight: 500;
  white-space: nowrap;
  margin-left: 16px;
  color: var(--accent);
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 2px solid var(--accent);
  font-size: 18px;
  font-weight: 600;
}

/* ===== Impressum ===== */
.impressum-content {
  max-width: 640px;
}

.impressum-block {
  margin-bottom: 28px;
}

.impressum-block h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.impressum-block p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.text-small {
  font-size: 13px !important;
  color: var(--text-tertiary) !important;
}

/* ===== Success ===== */
.success-content {
  text-align: center;
  padding: 80px 0;
  max-width: 480px;
  margin: 0 auto;
}

.success-icon {
  color: var(--success);
  margin-bottom: 24px;
  animation: successPop 0.5s ease forwards;
}

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

.success-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent);
  color: var(--surface);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  transition: all var(--transition);
  box-shadow: 0 6px 20px rgba(155, 81, 224, 0.3);
  white-space: nowrap;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-gallery {
    position: static;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .checkout-summary-section {
    position: static;
    order: -1;
  }

  .nav {
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .header-inner {
    padding: 0 20px;
  }

  .view {
    padding: 32px 20px 64px;
  }

  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .product-card-info {
    padding: 14px 16px;
  }

  .product-card-name {
    font-size: 16px;
  }

  .hero {
    padding: 40px 0 36px;
  }

  .hero-title {
    font-size: 48px;
  }

  .product-name {
    font-size: 28px;
  }

  .product-price {
    font-size: 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 20px;
  }

  .form-group-small {
    max-width: none;
  }

  .nav {
    gap: 14px;
  }

  .nav-link {
    font-size: 12px;
  }

  .logo-text {
    display: none;
  }

  .logo-img {
    height: 40px;
  }

  .section-title {
    font-size: 26px;
  }

  .cart-sidebar {
    width: 100vw;
    max-width: 100vw;
  }
}

/* ===== Loading Spinner ===== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.6s linear infinite;
}

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