/* PrintNest Store Styles - matches landing page design language */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #0d0d0d;
  --paper: #f5f0e8;
  --accent: #e8432a;
  --accent-hover: #d03a24;
  --muted: #8a8477;
  --warm: #d4cbbe;
  --white: #ffffff;
  --success: #2d5a3d;
  --error: #c44230;
}

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

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

/* ─── Navigation ───────────────────────────── */
.store-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid var(--warm);
}

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

.store-nav .logo span {
  color: var(--accent);
}

.store-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.store-nav .nav-links a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.store-nav .nav-links a:hover,
.store-nav .nav-links a.active {
  color: var(--ink);
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-count {
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
}

.cart-count:empty,
.cart-count[data-count="0"] {
  display: none;
}

/* ─── Page Layout ──────────────────────────── */
.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 48px 80px;
}

.page-header {
  margin-bottom: 48px;
}

.page-header .tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.page-header p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 12px;
  max-width: 600px;
}

/* ─── Product Grid ─────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(13, 13, 13, 0.08);
}

.product-card-image {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-card-image .tee-svg {
  width: 160px;
  height: 180px;
  transition: transform 0.3s;
}

.product-card:hover .tee-svg {
  transform: scale(1.05);
}

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

.product-card-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.product-card-body .product-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.product-colors {
  display: flex;
  gap: 6px;
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--warm);
}

.color-dot[data-color="#ffffff"] {
  border-color: #ddd;
}

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

.product-visual {
  position: sticky;
  top: 40px;
}

.product-preview {
  background: var(--white);
  border-radius: 16px;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-preview .tee-svg-large {
  width: 280px;
  height: 320px;
  transition: all 0.3s;
}

.design-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: 120px;
  height: 120px;
  object-fit: contain;
  pointer-events: none;
  opacity: 0.85;
}

.product-info h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.product-info .price-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.product-info .description {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.product-features {
  list-style: none;
  margin-bottom: 32px;
}

.product-features li {
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ─── Option Selectors ─────────────────────── */
.option-group {
  margin-bottom: 24px;
}

.option-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-label .selected-name {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

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

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.1);
}

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

.color-swatch[data-hex="#ffffff"] {
  box-shadow: inset 0 0 0 1px #ddd;
}

.color-swatch[data-hex="#ffffff"].active {
  border-color: var(--ink);
}

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

.size-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border: 2px solid var(--warm);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--ink);
}

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

.size-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* ─── Design Upload ────────────────────────── */
.upload-zone {
  border: 2px dashed var(--warm);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.5);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(232, 67, 42, 0.04);
}

.upload-zone .upload-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.upload-zone h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.upload-zone p {
  font-size: 0.85rem;
  color: var(--muted);
}

.upload-preview {
  margin-top: 12px;
  display: none;
}

.upload-preview.visible {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-preview img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--warm);
}

.upload-preview .file-info {
  flex: 1;
}

.upload-preview .file-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.upload-preview .file-size {
  font-size: 0.75rem;
  color: var(--muted);
}

.remove-design {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 4px 8px;
}

/* ─── Quantity Selector ────────────────────── */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--warm);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: var(--warm);
}

.qty-value {
  width: 48px;
  height: 40px;
  border: none;
  border-left: 1px solid var(--warm);
  border-right: 1px solid var(--warm);
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
}

/* ─── Buttons ──────────────────────────────── */
.btn {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
}

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

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

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
}

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

/* ─── Cart ─────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--white);
  border-radius: 12px;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-item-image svg {
  width: 50px;
  height: 56px;
}

.cart-item-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-info .item-details {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.cart-item-info .item-design {
  font-size: 0.8rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-item-actions {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-item-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.remove-item {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 0;
  transition: color 0.2s;
}

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

/* Cart Summary */
.cart-summary {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  position: sticky;
  top: 40px;
}

.cart-summary h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--warm);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.summary-row.muted {
  color: var(--muted);
}

.summary-row.total {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.free-shipping-note {
  font-size: 0.8rem;
  color: var(--success);
  margin-top: 8px;
  text-align: center;
}

.shipping-progress {
  margin-top: 16px;
  padding: 12px;
  background: rgba(45, 90, 61, 0.06);
  border-radius: 8px;
}

.shipping-progress-bar {
  height: 4px;
  background: var(--warm);
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

.shipping-progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: 4px;
  transition: width 0.3s;
}

.shipping-progress-text {
  font-size: 0.8rem;
  color: var(--success);
  text-align: center;
}

.cart-empty {
  text-align: center;
  padding: 80px 40px;
}

.cart-empty h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.cart-empty p {
  color: var(--muted);
  margin-bottom: 24px;
}

/* ─── Checkout Form ────────────────────────── */
.checkout-form {
  margin-top: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--muted);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--warm);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  background: transparent;
  color: var(--ink);
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--ink);
}

.form-group input::placeholder {
  color: var(--warm);
}

/* ─── Order Confirmation ───────────────────── */
.confirmation-container {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 24px;
}

.confirmation-container h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.order-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.confirmation-message {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.order-details-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  text-align: left;
  margin-bottom: 32px;
}

.order-details-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--warm);
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
}

.order-item-row .item-name {
  color: var(--ink);
}

.order-item-row .item-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.delivery-estimate {
  background: rgba(45, 90, 61, 0.06);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.delivery-estimate .icon {
  font-size: 1.5rem;
}

.delivery-estimate .info h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--success);
}

.delivery-estimate .info p {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ─── Breadcrumbs ──────────────────────────── */
.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 32px;
  font-size: 0.85rem;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--ink);
}

.breadcrumbs .sep {
  color: var(--warm);
}

.breadcrumbs .current {
  color: var(--ink);
  font-weight: 500;
}

/* ─── Toast Notifications ──────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: var(--paper);
  padding: 14px 24px;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast .toast-icon {
  font-size: 1.1rem;
}

/* ─── Loading State ────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--warm) 25%, var(--paper) 50%, var(--warm) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Footer ───────────────────────────────── */
.store-footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--warm);
  font-size: 0.85rem;
  color: var(--muted);
}

.store-footer .logo-small {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--muted);
}

/* ─── Responsive ───────────────────────────── */
@media (max-width: 768px) {
  .store-nav {
    padding: 16px 20px;
  }

  .store-nav .nav-links {
    gap: 16px;
  }

  .page-container {
    padding: 24px 20px 60px;
  }

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

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

  .product-visual {
    position: static;
  }

  .product-preview {
    height: 360px;
  }

  .cart-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cart-summary {
    position: static;
  }

  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .store-footer {
    flex-direction: column;
    gap: 8px;
    padding: 24px 20px;
  }

  .confirmation-container {
    padding: 0;
  }
}
