/* ============================================
   PrintCraft - Design System & All Styles
   ============================================ */

/* === CSS Variables === */
:root {
  --primary: #1A1A2E;
  --primary-light: #16213E;
  --accent: #E94560;
  --accent-hover: #D63851;
  --accent-light: #FFF0F3;
  --bg: #FFFFFF;
  --surface: #F8F9FA;
  --surface-hover: #F0F1F3;
  --text: #2D3436;
  --text-light: #636E72;
  --text-lighter: #B2BEC3;
  --border: #E8E8E8;
  --border-light: #F0F0F0;
  --success: #00B894;
  --success-bg: #F0FFF8;
  --error: #E17055;
  --error-bg: #FFF5F3;
  --info: #0984E3;
  --info-bg: #F0F8FF;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --shadow-xl: 0 16px 50px rgba(0,0,0,0.12);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.14);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 300ms;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-width: 1200px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; display: block; }
svg { max-width: 100%; flex-shrink: 0; }
svg:not(:root) { overflow: hidden; }
.btn svg, .nav-link svg, .stars svg, .trust-icon svg, .star svg, .nav-cart svg, .nav-toggle svg, .toast-close svg { display: inline; vertical-align: middle; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* === Layout === */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }

/* === Typography === */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--primary); }
.page-title { font-size: 2rem; margin-bottom: 0.5rem; padding-top: 2rem; }
.page-subtitle { color: var(--text-light); margin-bottom: 2rem; }
.section { padding: 5rem 0; }
.section-title { font-size: 2rem; text-align: center; margin-bottom: 0.5rem; }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 3rem; font-size: 1.05rem; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.5rem; border-radius: var(--radius); font-weight: 600; font-size: 0.9rem;
  transition: all var(--duration) var(--ease); white-space: nowrap; border: 2px solid transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(233,69,96,0.3); }
.btn-outline { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.hero .btn-outline, .hero-actions .btn-outline { border-color: rgba(255,255,255,0.6); color: #fff; background: rgba(255,255,255,0.08); }
.hero .btn-outline:hover, .hero-actions .btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.18); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

/* === Navbar === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: box-shadow var(--duration) var(--ease);
}
.nav.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.logo-accent { color: var(--accent); }
.logo-icon { display: flex; }
.nav-links { display: flex; gap: 2rem; }
.nav-link {
  font-weight: 500; font-size: 0.92rem; color: var(--text-light);
  transition: color var(--duration); position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-cart {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: var(--text);
  transition: all var(--duration);
}
.nav-cart:hover { background: var(--surface); color: var(--accent); }
.cart-badge {
  position: absolute; top: 0; right: 0;
  background: var(--accent); color: #fff; font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.cart-badge.bounce { animation: bounceIn 0.3s var(--ease-bounce); }
.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--text); }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 1rem 1.5rem 1.5rem;
    gap: 0; box-shadow: var(--shadow-lg); transform: translateY(-120%);
    transition: transform 0.3s var(--ease); z-index: 999;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link { padding: 0.8rem 0; border-bottom: 1px solid var(--border-light); }
}

/* === Page Container === */
.page-container { min-height: 100vh; padding-top: 64px; }
.page-exit { opacity: 0; transform: translateY(10px); transition: all 0.2s var(--ease); }
.page-enter { animation: fadeInUp 0.3s var(--ease) forwards; }

/* === Hero === */
.hero {
  position: relative; min-height: 90vh; display: flex; align-items: center;
  overflow: hidden; background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(233,69,96,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(233,69,96,0.1) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(15,52,96,0.3) 0%, transparent 50%);
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 100px;
  background: linear-gradient(transparent, var(--bg));
}
.hero-content { position: relative; z-index: 2; text-align: center; padding: 4rem 0; width: 100%; }
.hero-title { font-size: clamp(2.5rem, 6vw, 4rem); color: #fff; margin-bottom: 1.2rem; letter-spacing: -0.02em; }
.hero-title .text-accent { color: var(--accent); }
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(255,255,255,0.7); max-width: 560px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; justify-content: center; gap: 3rem; margin-top: 3rem;
  padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1);
}
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; color: #fff; }
.stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.hero-scroll-indicator {
  position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.4); animation: scrollBounce 2s infinite;
}

/* === Trust Bar === */
.trust-bar { padding: 2.5rem 0; background: var(--surface); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.trust-item {
  display: flex; align-items: center; gap: 0.8rem; padding: 1rem;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.trust-icon { color: var(--accent); flex-shrink: 0; }
.trust-item strong { display: block; font-size: 0.85rem; color: var(--primary); }
.trust-item span { font-size: 0.78rem; color: var(--text-light); }
@media (max-width: 768px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* === Product Grid === */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.product-grid-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.product-grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* === Product Card === */
.product-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all var(--duration) var(--ease);
  border: 1px solid var(--border-light);
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.product-card-img {
  position: relative; background: var(--surface); padding: 1.5rem;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  aspect-ratio: 1;
}
.product-card-img svg, .product-card-img img { transition: transform 0.4s var(--ease); width: 80%; height: auto; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.product-card:hover .product-card-img svg, .product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-overlay {
  position: absolute; inset: 0; background: rgba(26,26,46,0.6);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.product-card:hover .product-card-overlay { opacity: 1; }
.product-badge {
  position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff;
  font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px; z-index: 2;
}
.product-badge.badge-new { background: var(--success); }
.product-card-info { padding: 1.2rem; }
.product-card-name { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--primary); }
.product-card-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.3rem; }
.product-card-price { font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.product-card-rating { display: flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; }
.rating-count { color: var(--text-light); font-size: 0.78rem; }

/* === Stars === */
.stars { display: inline-flex; gap: 1px; }
.star { color: #FFD93D; display: inline-flex; }
.star.half { color: #FFD93D; opacity: 0.6; }
.star.empty { color: var(--border); }

/* === Products Page === */
.products-header { text-align: center; padding: 2rem 0 1rem; }
.products-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}
.filter-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pill {
  padding: 0.45rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 500;
  background: var(--surface); color: var(--text-light); border: 1px solid var(--border-light);
  transition: all var(--duration);
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.toolbar-right { display: flex; gap: 0.8rem; align-items: center; }
.search-box { position: relative; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-lighter); pointer-events: none; }
.search-input {
  padding: 0.5rem 0.8rem 0.5rem 2.3rem; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.85rem; width: 200px; transition: all var(--duration);
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233,69,96,0.1); }
.sort-select {
  padding: 0.5rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.85rem; background: #fff; color: var(--text);
}

/* === Product Detail === */
.breadcrumb { display: flex; gap: 0.5rem; font-size: 0.85rem; color: var(--text-light); padding: 1.5rem 0; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-lighter); }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
@media (max-width: 768px) { .product-detail-grid { grid-template-columns: 1fr; gap: 2rem; } }
.product-detail-image { text-align: center; }

/* Product Gallery */
.product-gallery { position: relative; }
.gallery-main {
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 0.6rem; margin-top: 0.8rem; justify-content: center; }
.gallery-thumb {
  width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden;
  border: 2.5px solid var(--border-light); cursor: pointer; transition: all var(--duration);
  padding: 0; background: var(--surface);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { border-color: var(--accent); }
.gallery-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(233,69,96,0.2); }

/* Showcase Section */
.showcase-section { padding: 3rem 0; border-top: 1px solid var(--border-light); }
.showcase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .showcase-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .showcase-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; } }
.showcase-card {
  background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  overflow: hidden; transition: all var(--duration) var(--ease); cursor: pointer;
}
.showcase-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.showcase-img {
  position: relative; overflow: hidden; aspect-ratio: 1;
}
.showcase-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.showcase-card:hover .showcase-img img { transform: scale(1.08); }
.showcase-info { padding: 0.8rem 1rem; text-align: center; }
.showcase-info strong { display: block; font-size: 0.85rem; color: var(--primary); }
.showcase-info span { font-size: 0.75rem; color: var(--text-light); }

.color-swatches-below { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }
.color-swatch {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  transition: all var(--duration); box-shadow: var(--shadow-xs);
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active { box-shadow: 0 0 0 3px var(--accent); }
.product-detail-name { font-size: 1.8rem; margin-bottom: 0.5rem; }
.product-detail-rating { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.rating-text { color: var(--text-light); font-size: 0.9rem; }
.product-detail-price { font-size: 1.8rem; font-weight: 800; color: var(--accent); margin-bottom: 1rem; font-family: var(--font-heading); transition: all 0.2s; }
.price-from { font-size: 0.85rem; font-weight: 500; color: var(--text-light); }
.price-per { font-size: 0.8rem; font-weight: 400; color: var(--text-lighter); }
.price-size-note { display: block; font-size: 0.75rem; font-weight: 500; color: var(--text-light); margin-top: 0.1rem; }
.product-detail-desc { color: var(--text-light); margin-bottom: 1.5rem; line-height: 1.7; word-wrap: break-word; overflow-wrap: break-word; }
.product-detail-features h4 { margin-bottom: 0.5rem; }
.product-detail-features li { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; color: var(--text-light); font-size: 0.9rem; }
.product-detail-features li svg { color: var(--success); flex-shrink: 0; }
.product-detail-sizes { margin-top: 1.5rem; }
.product-detail-sizes h4 { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.size-guide-btn { font-size: 0.8rem; color: var(--accent); text-decoration: underline; cursor: pointer; background: none; border: none; }
.size-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.size-btn {
  padding: 0.5rem 1rem; border: 2px solid var(--border); border-radius: var(--radius);
  font-weight: 600; font-size: 0.85rem; transition: all var(--duration);
}
.size-btn:hover { border-color: var(--accent); color: var(--accent); }
.size-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.product-detail-actions { margin-top: 2rem; }

/* Size Guide Modal Table */
.size-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.size-table th, .size-table td { padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid var(--border-light); }
.size-table th { font-weight: 600; color: var(--primary); background: var(--surface); }

/* === Reviews === */
.reviews-section { padding: 3rem 0; border-top: 1px solid var(--border-light); }
.reviews-grid { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; margin-top: 2rem; }
@media (max-width: 768px) { .reviews-grid { grid-template-columns: 1fr; } }
.reviews-summary { background: var(--surface); border-radius: var(--radius-lg); padding: 1.5rem; }
.reviews-average { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.avg-num { font-size: 2.5rem; font-weight: 800; color: var(--primary); font-family: var(--font-heading); }
.avg-count { color: var(--text-light); font-size: 0.85rem; }
.star-bar-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; margin-bottom: 0.4rem; }
.star-bar-row span:first-child { display: flex; align-items: center; gap: 2px; min-width: 35px; color: var(--text-light); }
.star-bar { flex: 1; height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.star-bar-fill { height: 100%; background: #FFD93D; border-radius: 4px; }
.star-bar-count { min-width: 20px; text-align: right; color: var(--text-light); }
.reviews-list { display: flex; flex-direction: column; gap: 1rem; }
.review-card { background: var(--surface); border-radius: var(--radius); padding: 1.2rem; }
.review-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.review-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.review-date { display: block; font-size: 0.78rem; color: var(--text-lighter); }
.review-stars { margin-left: auto; }
.review-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }

/* === Related / Recent === */
.related-section, .recent-section { padding: 3rem 0; border-top: 1px solid var(--border-light); }

/* === How It Works === */
.how-it-works { background: var(--surface); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 768px) { .steps-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; } }
.step {
  text-align: center; padding: 2rem 1.5rem;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: all var(--duration) var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step .step-num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-light);
  color: var(--accent); font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; font-family: var(--font-heading);
}
.step-icon { margin-bottom: 1rem; }
.step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; color: var(--text-light); }

/* === Testimonials === */
.testimonials-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.testimonials-section::before {
  content: '\201C'; position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font-size: 200px; color: rgba(255,255,255,0.03); font-family: Georgia, serif; pointer-events: none;
}
.testimonials-section .section-title { color: #fff; }
.carousel { overflow: hidden; position: relative; }
.carousel-track { display: flex; transition: transform 0.5s var(--ease); }
.carousel-slide { min-width: 100%; padding: 0 1rem; }
.testimonial-card {
  max-width: 700px; margin: 0 auto; text-align: center;
  background: rgba(255,255,255,0.07); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl); padding: 2.5rem 3rem;
}
.testimonial-stars { margin-bottom: 1.2rem; }
.testimonial-text {
  font-size: 1.15rem; color: rgba(255,255,255,0.9); line-height: 1.8;
  margin-bottom: 1.5rem; font-style: italic;
}
.testimonial-author { display: flex; align-items: center; gap: 0.8rem; justify-content: center; }
.testimonial-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; border: 2px solid rgba(255,255,255,0.2);
}
.testimonial-author strong { display: block; font-size: 0.95rem; color: #fff; }
.testimonial-author span { font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.carousel-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.carousel-dot {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.25);
  border: none; cursor: pointer; transition: all var(--duration);
}
.carousel-dot.active { background: var(--accent); transform: scale(1.2); }
@media (max-width: 768px) {
  .testimonial-card { padding: 1.5rem; }
  .testimonial-text { font-size: 1rem; }
}

/* === CTA Section === */
.cta-section { padding: 4rem 0; }
.cta-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; text-align: center; padding: 4rem 2rem; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}
.cta-card h2 { font-size: 2rem; color: #fff; margin-bottom: 0.8rem; }
.cta-card p { color: rgba(255,255,255,0.7); margin-bottom: 2rem; font-size: 1.05rem; }

/* === Cart Page === */
.cart-page { padding-bottom: 4rem; }
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-item {
  display: flex; align-items: center; gap: 1rem; padding: 1.2rem;
  background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius);
  margin-bottom: 0.8rem; transition: all var(--duration);
}
.cart-item:hover { box-shadow: var(--shadow-sm); }
.cart-item-img { width: 80px; height: 90px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.cart-item-img svg { width: 70px; height: auto; }
.cart-design-thumb { width: 80px; height: 90px; object-fit: contain; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }
.cart-item-details { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-light); }
.cart-item-color { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.cart-item-size { background: var(--surface); padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.78rem; }
.cart-item-custom { background: var(--accent-light); color: var(--accent); padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.78rem; font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: 0.5rem; }
.qty-btn {
  width: 30px; height: 30px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; color: var(--text);
  transition: all var(--duration);
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-val { font-weight: 600; min-width: 24px; text-align: center; }
.cart-item-price { font-weight: 700; font-size: 1rem; min-width: 70px; text-align: right; }
.cart-item-remove { color: var(--text-lighter); transition: color var(--duration); }
.cart-item-remove:hover { color: var(--error); }
.cart-summary-card {
  background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 1.5rem; position: sticky; top: 80px;
}
.cart-summary-card h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9rem; }
.summary-discount { color: var(--success); }
.summary-divider { border-top: 1px solid var(--border-light); margin: 0.5rem 0; }
.summary-total { font-weight: 700; font-size: 1.1rem; }
.promo-section { margin-top: 1rem; }
.promo-input-group { display: flex; gap: 0.5rem; }
.promo-input { flex: 1; padding: 0.5rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; }
.promo-input:focus { outline: none; border-color: var(--accent); }
.promo-hint { font-size: 0.75rem; color: var(--text-lighter); margin-top: 0.4rem; }

/* Empty State */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-icon { font-size: 3rem; color: var(--text-lighter); margin-bottom: 1rem; }
.empty-icon svg { width: 64px; height: 64px; margin: 0 auto; }
.empty-state h2, .empty-state h3 { color: var(--primary); margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-light); margin-bottom: 1.5rem; }

/* === Checkout === */
.checkout-page { padding-bottom: 4rem; }
.checkout-progress {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin: 2rem auto 3rem; max-width: 500px;
}
.progress-step {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  position: relative; flex-shrink: 0;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--border-light);
  color: var(--text-lighter); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; transition: all var(--duration);
}
.progress-step.active .step-num { background: var(--accent); color: #fff; }
.progress-step.completed .step-num { background: var(--success); color: #fff; }
.step-label { font-size: 0.78rem; color: var(--text-lighter); transition: color var(--duration); }
.progress-step.active .step-label { color: var(--accent); font-weight: 600; }
.progress-line { flex: 1; height: 2px; background: var(--border-light); margin: 0 0.5rem; margin-bottom: 1.2rem; }
.checkout-step { display: none; animation: fadeInUp 0.3s var(--ease); }
.checkout-step.active { display: block; }
.checkout-form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; }
@media (max-width: 900px) { .checkout-form-grid { grid-template-columns: 1fr; } }
.checkout-form h2 { font-size: 1.3rem; margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row:has(> :nth-child(3)) { grid-template-columns: 1fr 1fr 1fr; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-light); margin-bottom: 0.3rem; }
.form-input {
  width: 100%; padding: 0.65rem 0.8rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; transition: all var(--duration);
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233,69,96,0.1); }
.shipping-options { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 0.8rem; }
.shipping-option {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  border: 2px solid var(--border-light); border-radius: var(--radius);
  cursor: pointer; transition: all var(--duration);
}
.shipping-option.active { border-color: var(--accent); background: var(--accent-light); }
.shipping-option input { display: none; }
.shipping-option-info { flex: 1; }
.shipping-option-info strong { display: block; font-size: 0.9rem; }
.shipping-option-info span { font-size: 0.82rem; color: var(--text-light); }
.shipping-option-price { font-weight: 700; color: var(--accent); }
.checkout-nav { display: flex; justify-content: space-between; margin-top: 2rem; }
.checkout-sidebar {
  background: var(--surface); border-radius: var(--radius-lg); padding: 1.5rem;
  position: sticky; top: 80px;
}
.checkout-sidebar h3 { font-size: 1rem; margin-bottom: 1rem; }
.checkout-item { display: flex; justify-content: space-between; padding: 0.4rem 0; font-size: 0.85rem; }
.demo-badge {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1rem;
  background: var(--info-bg); color: var(--info); border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 500; margin-bottom: 1.5rem;
}
.confirm-check { animation: confirmPop 0.6s var(--ease-bounce); }
.confirm-circle { stroke-dasharray: 240; stroke-dashoffset: 240; animation: drawCircle 0.8s 0.2s forwards; }
.confirm-checkmark { stroke-dasharray: 50; stroke-dashoffset: 50; animation: drawCheck 0.4s 0.8s forwards; }
.confirm-order-id { font-size: 1.2rem; font-weight: 700; color: var(--primary); margin: 0.5rem 0; }
.confirm-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; }

/* === Footer === */
.footer { background: var(--primary); color: rgba(255,255,255,0.7); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-title { font-size: 1.3rem; color: #fff; margin-bottom: 0.8rem; }
.footer-desc { font-size: 0.85rem; line-height: 1.6; }
.footer-heading { font-size: 0.9rem; color: #fff; margin-bottom: 0.8rem; }
.footer-link { display: block; font-size: 0.85rem; padding: 0.25rem 0; transition: color var(--duration); }
.footer-link:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; font-size: 0.82rem; }
.footer-demo { color: rgba(255,255,255,0.4); }

/* === Back to Top === */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 900;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none;
  transition: all var(--duration) var(--ease); transform: translateY(20px);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* === Modal === */
#modal-root { display: none; }
#modal-root.active { display: block; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; animation: fadeIn 0.2s;
}
.modal-content {
  background: #fff; border-radius: var(--radius-lg); padding: 2rem;
  max-width: 600px; width: 100%; max-height: 85vh; overflow-y: auto;
  box-shadow: var(--shadow-xl); position: relative; animation: slideUp 0.3s var(--ease);
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem; color: var(--text-light);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: all var(--duration);
}
.modal-close:hover { background: var(--surface); color: var(--text); }

/* === Toast === */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 3000; display: flex; flex-direction: column-reverse; gap: 0.5rem; }
@media (max-width: 480px) { .toast-container { bottom: 1rem; right: 1rem; left: 1rem; } }
.toast {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 1.2rem;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: 0.9rem; min-width: 280px; max-width: 400px;
  transform: translateX(120%); transition: transform 0.3s var(--ease);
  overflow: hidden; position: relative;
}
.toast.show { transform: translateX(0); }
.toast.hide { transform: translateX(120%); }
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--error); }
.toast-info { border-left: 4px solid var(--info); }
.toast-msg { flex: 1; }
.toast-close { color: var(--text-lighter); flex-shrink: 0; }
.toast-close:hover { color: var(--text); }
.toast-progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--border-light);
}
.toast-progress::after {
  content: ''; position: absolute; inset: 0;
  background: var(--accent); animation: progressShrink var(--duration) linear forwards;
  animation-duration: inherit;
}

/* === Skeleton === */
.skeleton-card { padding: 1rem; }
.skeleton-img { width: 100%; aspect-ratio: 1; border-radius: var(--radius); background: var(--surface); }
.skeleton-line { height: 14px; border-radius: 4px; background: var(--surface); margin-top: 0.8rem; }
.shimmer {
  background: linear-gradient(90deg, var(--surface) 25%, #e8e8e8 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* === Scroll Reveal === */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === Template Grid (Modal) === */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem; }
.template-card {
  text-align: center; padding: 1rem; border: 2px solid var(--border-light);
  border-radius: var(--radius); cursor: pointer; transition: all var(--duration);
}
.template-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.template-preview { background: var(--surface); border-radius: var(--radius-sm); padding: 0.5rem; margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: center; }
.template-card span { font-size: 0.82rem; font-weight: 500; }

/* === 404 === */
.page-404 { text-align: center; padding: 6rem 0; }
.page-404 h1 { font-size: 6rem; color: var(--accent); }
.page-404 p { color: var(--text-light); margin-bottom: 2rem; font-size: 1.2rem; }

/* === Animations === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounceIn { 0% { transform: scale(0.5); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes scrollBounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }
@keyframes progressShrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
@keyframes confirmPop { 0% { transform: scale(0); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* === Responsive Helpers === */
@media (max-width: 768px) {
  .hero { min-height: 80vh; }
  .hero-title { font-size: 2.2rem; }
  .hero-stats { gap: 1.5rem; }
  .stat-num { font-size: 1.4rem; }
  .section { padding: 3rem 0; }
  .section-title { font-size: 1.6rem; }
  .products-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { flex-wrap: wrap; }
  .search-input { width: 100%; }
  .cart-item { flex-wrap: wrap; }
  .cart-item-price { order: 5; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .container { padding: 0 1rem; }
  .btn-lg { padding: 0.75rem 1.5rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-row:has(> :nth-child(3)) { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
