*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --accent: #f59e0b;
  --dark: #1a1a2e;
  --gray: #6b7280;
  --light: #f8f9fc;
  --border: rgba(255,255,255,0.15);
  --success: #16a34a;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
  --glass: rgba(255,255,255,0.7);
  --glass-border: rgba(255,255,255,0.25);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--dark);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

.bg-decoration {
  position: fixed; inset: 0; z-index: -2;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: bgShift 20s ease infinite;
}
@keyframes bgShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.blob {
  position: fixed; z-index: -1;
  border-radius: 50%; filter: blur(60px);
  opacity: 0.5; pointer-events: none;
}
.blob--1 { width: 400px; height: 400px; background: #f093fb; top: -100px; left: -100px; animation: float1 15s ease-in-out infinite; }
.blob--2 { width: 350px; height: 350px; background: #4facfe; bottom: -80px; right: -80px; animation: float2 18s ease-in-out infinite; }
.blob--3 { width: 300px; height: 300px; background: #fadc5e; top: 40%; right: 10%; animation: float3 22s ease-in-out infinite; }
.blob--4 { width: 250px; height: 250px; background: #ff9a9e; bottom: 20%; left: 5%; animation: float1 25s ease-in-out infinite reverse; }

@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.15); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,-30px) scale(1.1); } }
@keyframes float3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px,60px) scale(0.9); } }

.bg-pattern {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 30px 30px;
}

.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}
.header__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo__icon { border-radius: 10px; filter: drop-shadow(0 4px 12px rgba(99,102,241,0.4)); }
.logo__text { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; color: white; }
.logo__text strong {
  background: linear-gradient(135deg, #fbbf24, #f093fb);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav { display: flex; gap: 28px; }
.nav a { font-weight: 500; font-size: 0.95rem; color: rgba(255,255,255,0.85); transition: all 0.2s; }
.nav a:hover { color: white; text-shadow: 0 0 12px rgba(255,255,255,0.5); }
.cart-btn {
  position: relative; font-size: 1.3rem; padding: 10px 16px;
  border-radius: var(--radius); background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px); border: 1px solid var(--glass-border);
  color: white; transition: all 0.3s;
}
.cart-btn:hover { background: rgba(255,255,255,0.35); transform: scale(1.05); }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--secondary); color: white;
  font-size: 0.7rem; font-weight: 700;
  min-width: 20px; height: 20px;
  border-radius: 10px; display: flex;
  align-items: center; justify-content: center;
  padding: 0 4px; box-shadow: 0 2px 8px rgba(236,72,153,0.5);
}

.hero { text-align: center; padding: 100px 24px 80px; position: relative; }
.hero__content { max-width: 700px; margin: 0 auto; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 50px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: white; font-size: 0.85rem; font-weight: 500;
  margin-bottom: 24px;
}
.hero__badge span { font-size: 1.1rem; }
.hero h1 {
  font-size: 3.5rem; font-weight: 800; letter-spacing: -2px;
  margin-bottom: 16px; color: white;
  text-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.gradient-text {
  background: linear-gradient(135deg, #fbbf24, #f093fb, #4facfe);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.hero p {
  font-size: 1.2rem; color: rgba(255,255,255,0.9);
  margin-bottom: 36px; text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; transition: all 0.3s;
}
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}
.btn--primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(99,102,241,0.5);
}
.btn--lg { padding: 16px 36px; font-size: 1.05rem; }
.btn--block { width: 100%; }

.section { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }
.section--alt {
  max-width: none; padding: 60px 24px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}
.section__title {
  text-align: center; font-size: 2.2rem; font-weight: 700;
  margin-bottom: 8px; color: white;
  text-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.section__subtitle {
  text-align: center; color: rgba(255,255,255,0.8);
  margin-bottom: 48px; font-size: 1.05rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--glass); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius); overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.4);
}
.product-card__image {
  width: 100%; aspect-ratio: 1; display: flex;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(236,72,153,0.1));
  font-size: 5rem;
  transition: transform 0.4s;
}
.product-card:hover .product-card__image { transform: scale(1.1); }
.product-card__body { padding: 18px; }
.product-card__title { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.product-card__desc { color: var(--gray); font-size: 0.85rem; margin-bottom: 14px; }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; }
.product-card__price { font-size: 1.35rem; font-weight: 800; color: var(--primary); }
.product-card__btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; padding: 10px 18px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600; transition: all 0.3s;
  box-shadow: 0 2px 12px rgba(99,102,241,0.3);
}
.product-card__btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(99,102,241,0.4); }

.customizer {
  display: grid; grid-template-columns: 1fr 380px;
  gap: 32px; max-width: 1200px; margin: 0 auto;
}
.customizer__preview {
  background: var(--glass); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: var(--shadow-lg);
}
#tshirtCanvas {
  max-width: 100%; height: auto; border-radius: 12px;
  cursor: grab; touch-action: none;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
}
#tshirtCanvas:active { cursor: grabbing; }
.preview__hint {
  margin-top: 16px; font-size: 0.85rem;
  color: var(--gray);
  background: rgba(255,255,255,0.5); padding: 8px 16px;
  border-radius: 50px;
}
.customizer__controls {
  background: var(--glass); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 22px;
  max-height: 750px; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.customizer__controls::-webkit-scrollbar { width: 6px; }
.customizer__controls::-webkit-scrollbar-track { background: transparent; }
.customizer__controls::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 3px; }
.control-group { display: flex; flex-direction: column; gap: 10px; }
.control-label {
  font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--dark);
}
.color-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid rgba(0,0,0,0.1); transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.swatch:hover { transform: scale(1.15) rotate(5deg); }
.swatch--active {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.3), 0 2px 8px rgba(0,0,0,0.1);
  transform: scale(1.1);
}
.upload-area {
  border: 2px dashed rgba(99,102,241,0.3); border-radius: var(--radius);
  padding: 28px; text-align: center; cursor: pointer;
  transition: all 0.3s; background: rgba(99,102,241,0.05);
}
.upload-area:hover, .upload-area--dragover {
  border-color: var(--primary); background: rgba(99,102,241,0.12);
  transform: scale(1.01);
}
.upload-area__content { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.upload-icon { font-size: 2.2rem; }
.upload-text { font-weight: 600; font-size: 0.9rem; }
.upload-hint { font-size: 0.8rem; color: var(--gray); }
.toggle { position: relative; width: 46px; height: 26px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__slider {
  position: absolute; inset: 0;
  background: #d1d5db; border-radius: 13px; transition: 0.3s;
}
.toggle__slider::before {
  content: ''; position: absolute;
  width: 20px; height: 20px; left: 3px; top: 3px;
  background: white; border-radius: 50%; transition: 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle__slider {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.toggle input:checked + .toggle__slider::before { transform: translateX(20px); }
.gradient-controls { display: flex; flex-direction: column; gap: 14px; }
.gradient-picker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gradient-picker span { font-size: 0.85rem; font-weight: 600; }
.gradient-picker input[type="color"] {
  width: 48px; height: 40px; border: 2px solid var(--glass-border);
  border-radius: 10px; cursor: pointer; background: none;
}
.gradient-arrow { color: var(--gray); font-size: 1.1rem; }
.gradient-direction { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gradient-direction label { font-size: 0.85rem; color: var(--gray); }
.gradient-direction span { font-size: 0.85rem; font-weight: 700; min-width: 40px; }
.slider {
  width: 100%; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  outline: none; -webkit-appearance: none; appearance: none;
  opacity: 0.7; transition: opacity 0.2s;
}
.slider:hover { opacity: 1; }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: white; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  border: 3px solid var(--primary);
}
.slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: white; cursor: pointer;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.size-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.size-btn {
  min-width: 52px; height: 44px; border-radius: 10px;
  border: 2px solid rgba(0,0,0,0.08); background: white;
  font-weight: 700; font-size: 0.9rem; transition: all 0.3s;
}
.size-btn:hover { border-color: var(--primary); transform: translateY(-2px); }
.size-btn--active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; border-color: transparent;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.qty-selector { display: flex; align-items: center; gap: 18px; }
.qty-btn {
  width: 40px; height: 40px; border-radius: 10px;
  border: 2px solid rgba(0,0,0,0.08); background: white;
  font-size: 1.3rem; font-weight: 700; transition: all 0.3s;
}
.qty-btn:hover { border-color: var(--primary); background: #eef2ff; transform: scale(1.05); }
.qty-value { font-size: 1.2rem; font-weight: 800; min-width: 34px; text-align: center; }
.customizer__footer {
  margin-top: 8px; padding-top: 22px;
  border-top: 2px dashed rgba(0,0,0,0.08);
}
.price-display { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.price-label { color: var(--gray); font-size: 0.95rem; }
.price-value { font-size: 2rem; font-weight: 800; color: var(--dark); }

.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px; max-width: 1000px; margin: 0 auto;
}
.step {
  text-align: center; padding: 28px;
  background: var(--glass); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius); transition: all 0.4s;
  box-shadow: var(--shadow);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.step__num {
  width: 56px; height: 56px; margin: 0 auto 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; font-size: 1.5rem; font-weight: 800;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--gray); font-size: 0.9rem; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay--open { display: flex; }
.modal {
  background: white; border-radius: 20px;
  width: 100%; max-width: 500px; max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.35s cubic-bezier(0.4,0,0.2,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px; border-bottom: 1px solid var(--border);
}
.modal__header h2 { font-size: 1.4rem; font-weight: 700; }
.modal__close {
  font-size: 1.3rem; color: var(--gray); padding: 6px 10px;
  border-radius: 8px; transition: all 0.2s;
}
.modal__close:hover { color: var(--dark); background: var(--light); }
.modal__body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.modal__footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-item {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  align-items: center;
}
.cart-item__img {
  width: 72px; height: 72px; border-radius: 12px;
  background: var(--light); object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.cart-item__info { flex: 1; }
.cart-item__title { font-weight: 700; font-size: 0.95rem; }
.cart-item__detail { font-size: 0.8rem; color: var(--gray); margin-top: 2px; }
.cart-item__price { font-weight: 800; color: var(--primary); margin-top: 4px; display: block; }
.cart-item__remove {
  font-size: 1.3rem; color: var(--gray); padding: 6px;
  border-radius: 8px; transition: all 0.2s;
}
.cart-item__remove:hover { color: #dc2626; background: #fef2f2; }
.cart-empty { text-align: center; padding: 48px; color: var(--gray); }
.cart-total {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; font-size: 1.2rem; font-weight: 800;
}
.checkout-form { padding: 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 700; font-size: 0.85rem; }
.form-group input, .form-group textarea, .form-group select {
  padding: 12px 16px; border: 2px solid rgba(0,0,0,0.08);
  border-radius: 10px; font-family: inherit; font-size: 0.95rem;
  transition: all 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.checkout-success { text-align: center; padding: 48px 24px; }
.success-icon { font-size: 4rem; margin-bottom: 20px; animation: bounceIn 0.5s ease; }
@keyframes bounceIn { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

.footer {
  background: rgba(0,0,0,0.3); backdrop-filter: blur(20px);
  color: #d1d5db; margin-top: 60px;
  border-top: 1px solid var(--glass-border);
}
.footer__inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; padding: 56px 24px;
}
.footer__col h4 { color: white; margin-bottom: 16px; font-size: 1.05rem; }
.footer__col a, .footer__col p { color: rgba(255,255,255,0.7); font-size: 0.9rem; display: block; margin-bottom: 8px; transition: color 0.2s; }
.footer__col a:hover { color: white; }
.footer__desc { margin-top: 12px; font-size: 0.85rem; }
.footer .logo__text { color: white; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px; text-align: center;
}
.footer__bottom p { font-size: 0.85rem; color: rgba(255,255,255,0.5); }

.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--success), #15803d);
  color: white; padding: 14px 28px;
  border-radius: 14px; font-weight: 600; z-index: 300;
  box-shadow: 0 8px 30px rgba(22,163,74,0.4);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 900px) {
  .customizer { grid-template-columns: 1fr; }
  .nav { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .footer__inner { grid-template-columns: 1fr; }
  .blob { opacity: 0.3; }
}
