/* ========================================
   MODUS — Premium E-Commerce
   Design: editorial, restrained, tactile
   No AI flavor. Real design.
   ======================================== */

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

:root {
  --bg: #f5f5f0;
  --bg-alt: #ecece6;
  --surface: #ffffff;
  --text: #1a1a18;
  --text-secondary: #8a8a86;
  --text-muted: #b5b5b0;
  --border: #e2e2dc;
  --border-light: #efefe9;
  --accent: #b83b3b;
  --accent-hover: #9e2e2e;
  --shadow: rgba(0,0,0,0.04);
  --shadow-hover: rgba(0,0,0,0.08);
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --max-width: 1280px;
  --header-h: 68px;
}

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

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

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

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

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

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

.site-header.scrolled {
  background: rgba(245, 245, 240, 0.97);
  box-shadow: 0 1px 20px var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--text);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
}

.icon-btn:hover {
  background: var(--bg-alt);
}

.cart-btn {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: scale(0);
  transition: transform var(--transition);
}

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

/* Hamburger */
.menu-toggle {
  display: none;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* --- Search Overlay --- */
.search-overlay {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform var(--transition), opacity var(--transition);
  pointer-events: none;
}

.search-overlay.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.search-input-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 18px;
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--text);
  outline: none;
  padding: 8px 0;
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 90vh;
  min-height: 560px;
  max-height: 900px;
  overflow: hidden;
  margin-top: var(--header-h);
}

.hero-slides {
  position: relative;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 6s ease;
}

.hero-slide.active .hero-bg {
  transform: scale(1);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.15) 50%,
    rgba(0,0,0,0.05) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10%;
  max-width: 600px;
  color: white;
}

.hero-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition);
  transition-delay: 0.2s;
}

.hero-slide.active .hero-label {
  transform: translateY(0);
  opacity: 1;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 20px;
  transform: translateY(30px);
  opacity: 0;
  transition: var(--transition);
  transition-delay: 0.35s;
}

.hero-slide.active .hero-title {
  transform: translateY(0);
  opacity: 1;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
  font-weight: 300;
  margin-bottom: 36px;
  max-width: 420px;
  transform: translateY(30px);
  opacity: 0;
  transition: var(--transition);
  transition-delay: 0.5s;
}

.hero-slide.active .hero-desc {
  transform: translateY(0);
  opacity: 1;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: white;
  padding: 14px 32px;
  border: 1.5px solid rgba(255,255,255,0.6);
  transition: var(--transition);
  align-self: flex-start;
  transform: translateY(20px);
  opacity: 0;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition), opacity var(--transition);
  transition-delay: 0.65s, 0.65s, 0.65s, 0.65s, 0.65s;
}

.hero-slide.active .hero-cta {
  transform: translateY(0);
  opacity: 1;
}

.hero-cta:hover {
  background: white;
  color: var(--text);
  border-color: white;
}

.hero-indicators {
  position: absolute;
  bottom: 40px;
  left: 10%;
  display: flex;
  gap: 12px;
  z-index: 3;
}

.indicator {
  width: 40px;
  height: 2.5px;
  background: rgba(255,255,255,0.35);
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition), width var(--transition);
}

.indicator.active {
  background: white;
  width: 56px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  cursor: pointer;
  border: none;
}

.hero-arrow:hover {
  background: rgba(255,255,255,0.2);
}

.hero-arrow-left { left: 24px; }
.hero-arrow-right { right: 24px; }

/* --- Generic Sections --- */
.section {
  padding: 100px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.5px;
}

/* --- Categories --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 3 / 4;
  cursor: pointer;
}

.category-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.category-card:hover .category-img {
  transform: scale(1.06);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.6) 0%,
    rgba(0,0,0,0.1) 50%,
    rgba(0,0,0,0.05) 100%
  );
  transition: var(--transition);
}

.category-card:hover .category-overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.15) 50%,
    rgba(0,0,0,0.05) 100%
  );
}

.category-name {
  position: absolute;
  bottom: 44px;
  left: 20px;
  right: 20px;
  color: white;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
}

.category-count {
  position: absolute;
  bottom: 22px;
  left: 20px;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 400;
}

/* --- New Arrivals Scroller --- */
.arrivals-section {
  overflow: hidden;
}

.scroll-container {
  overflow: hidden;
  margin: 0 -32px;
  padding: 0 32px;
}

.scroll-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 8px 0 20px;
}

.scroll-track::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex: 0 0 calc(25% - 15px);
  min-width: 240px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow-hover);
}

.product-card-image {
  position: relative;
  aspect-ratio: 1 / 1.2;
  overflow: hidden;
  background: var(--bg-alt);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.product-card-actions {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: var(--transition);
}

.product-card:hover .product-card-actions {
  opacity: 1;
  transform: translateY(0);
}

.add-cart-btn {
  width: 100%;
  padding: 12px;
  background: var(--text);
  color: white;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background var(--transition-fast);
}

.add-cart-btn:hover {
  background: var(--accent);
}

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

.product-card-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-category {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.product-card-price {
  font-size: 16px;
  font-weight: 600;
}

.scroll-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.scroll-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.scroll-btn:hover {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

/* --- Products Grid --- */
.product-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.filter-btn.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.products-grid .product-card {
  flex: none;
  min-width: 0;
}

.load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 56px;
}

.load-more-line {
  flex: 1;
  height: 1px;
  max-width: 120px;
  background: var(--border);
}

.load-more-btn {
  padding: 12px 40px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.load-more-btn:hover {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.load-more-btn.loading {
  opacity: 0.4;
  pointer-events: none;
}

/* --- Featured Banner --- */
.featured-banner {
  padding: 0 32px;
  max-width: 100%;
}

.banner-inner {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 420px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 100%);
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 40px;
}

.banner-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.banner-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  margin-bottom: 16px;
}

.banner-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  font-weight: 300;
  margin-bottom: 28px;
}

.banner-cta {
  display: inline-block;
  padding: 14px 40px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.5);
  transition: var(--transition-fast);
}

.banner-cta:hover {
  background: white;
  color: var(--text);
  border-color: white;
}

/* --- Footer --- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 32px 40px;
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 60px;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-sub-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.subscribe-form {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}

.subscribe-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text);
  padding: 8px 0;
  outline: none;
}

.subscribe-input::placeholder {
  color: var(--text-muted);
}

.subscribe-btn {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  padding: 8px 4px 8px 16px;
  transition: opacity var(--transition-fast);
}

.subscribe-btn:hover {
  opacity: 0.6;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 32px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* --- Cart Sidebar --- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

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

.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-title {
  font-size: 16px;
  font-weight: 600;
}

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

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg-alt);
  flex-shrink: 0;
}

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

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

.cart-item-price {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--transition-fast);
}

.qty-btn:hover {
  border-color: var(--text);
}

.qty-num {
  font-size: 14px;
  font-weight: 500;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  font-size: 11px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  align-self: flex-start;
  padding: 4px;
}

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

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

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

.cart-total-amount {
  font-size: 20px;
  font-weight: 600;
}

.checkout-btn {
  width: 100%;
  padding: 16px;
  background: var(--text);
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background var(--transition-fast);
}

.checkout-btn:hover {
  background: var(--accent);
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 301;
  background: var(--surface);
  max-width: 820px;
  width: calc(100% - 40px);
  max-height: 85vh;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}

.modal-image {
  background: var(--bg-alt);
  background-size: cover;
  background-position: center;
  min-height: 360px;
}

.modal-info {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.modal-name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 8px;
  line-height: 1.3;
}

.modal-price {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
}

.modal-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.modal-add-btn {
  width: 100%;
  padding: 16px;
  background: var(--text);
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background var(--transition-fast);
}

.modal-add-btn:hover {
  background: var(--accent);
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: white;
  padding: 14px 28px;
  font-size: 13px;
  border-radius: 2px;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  white-space: nowrap;
}

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

/* --- Reveal Animation (intersection observer) --- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* --- Keyframes --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .categories-grid > :nth-child(4),
  .categories-grid > :nth-child(5) {
    display: none;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 20px 28px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    padding: 14px 0;
    font-size: 14px;
  }

  .nav-link::after { display: none; }

  .menu-toggle {
    display: flex;
  }

  .hero {
    height: 70vh;
    min-height: 420px;
  }

  .hero-content {
    padding: 0 28px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 60px 20px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .categories-grid > :nth-child(3),
  .categories-grid > :nth-child(4),
  .categories-grid > :nth-child(5) {
    display: none;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card {
    min-width: 0;
  }

  .product-card-info {
    padding: 12px;
  }

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

  .product-card-price {
    font-size: 14px;
  }

  .product-filters {
    gap: 6px;
  }

  .filter-btn {
    font-size: 11px;
    padding: 6px 14px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 20px 32px;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .footer-col-sub {
    grid-column: 1 / -1;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-image {
    min-height: 240px;
  }

  .modal-info {
    padding: 28px 24px;
  }

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

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .hero-content .hero-title {
    font-size: 32px;
  }

  .hero-desc {
    font-size: 14px;
  }
}

/* ========================================
   V2 ADDITIONS — Order History, Touch, Image Fallback
   ======================================== */

/* --- Order History Button (below checkout) --- */
.orders-btn {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.orders-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

/* --- Order History Modal --- */
.orders-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 301;
  background: var(--surface);
  max-width: 560px;
  width: calc(100% - 40px);
  max-height: 80vh;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.orders-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

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

.orders-modal-title {
  font-size: 16px;
  font-weight: 600;
}

.orders-modal-close {
  width: 36px;
  height: 36px;
}

.orders-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}

.orders-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.order-card {
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  margin-bottom: 16px;
  animation: fadeInUp 0.3s ease;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.order-id {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.order-date {
  font-size: 12px;
  color: var(--text-muted);
}

.order-items {
  margin-bottom: 12px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  color: var(--text-secondary);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.order-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 8px;
}

/* --- Image Loading & Fallback --- */
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
  opacity: 0;
}

.product-card-image img.loaded {
  opacity: 1;
}

.product-card-image img.error {
  opacity: 0;
}

.product-card-image .img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card-image .img-fallback.show {
  opacity: 1;
}

/* --- Hero Touch Hint --- */
.hero-touch-hint {
  position: absolute;
  bottom: 100px;
  right: 32px;
  z-index: 3;
  color: rgba(255,255,255,0.4);
  animation: floatHint 3s ease-in-out infinite;
  pointer-events: none;
  opacity: 0;
}

@keyframes floatHint {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(8px); opacity: 0.2; }
}

@media (max-width: 768px) {
  .hero-touch-hint {
    opacity: 1;
  }
}

/* --- Search Results (inline) --- */
.search-overlay {
  transform: translateY(-110%);
  transition: transform var(--transition), opacity var(--transition);
}

.search-results {
  max-width: var(--max-width);
  margin: 8px auto 0;
  display: none;
}

.search-results.show {
  display: block;
}

.search-results .search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-results .search-result-item:hover {
  background: var(--bg-alt);
}

.search-result-img {
  width: 40px;
  height: 40px;
  border-radius: 2px;
  object-fit: cover;
  background: var(--bg-alt);
  flex-shrink: 0;
}

.search-result-name {
  font-size: 13px;
  font-weight: 500;
}

.search-result-price {
  font-size: 13px;
  font-weight: 600;
  margin-left: auto;
}

/* --- Checkout Confirmation Overlay --- */
.checkout-confirm {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.checkout-confirm.open {
  opacity: 1;
  pointer-events: auto;
}

.checkout-confirm-box {
  background: var(--surface);
  padding: 40px 36px 32px;
  border-radius: 4px;
  text-align: center;
  max-width: 380px;
  width: calc(100% - 40px);
  transform: scale(0.95);
  transition: transform var(--transition);
}

.checkout-confirm.open .checkout-confirm-box {
  transform: scale(1);
}

.checkout-confirm-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--accent);
}

.checkout-confirm-title {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 8px;
}

.checkout-confirm-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.checkout-confirm-btn {
  width: 100%;
  padding: 14px;
  background: var(--text);
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background var(--transition-fast);
}

.checkout-confirm-btn:hover {
  background: var(--accent);
}

/* --- Desktop hover image zoom for grid --- */
@media (hover: hover) {
  .product-card:hover .product-card-image img.loaded {
    transform: scale(1.04);
  }
}

/* --- Reduce motion preference --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-bg {
    transform: none !important;
  }
}

/* ========================================
   V3 — Product Detail, Wishlist, Sort, Filter
   ======================================== */

/* --- Product Toolbar --- */
/* --- Product Toolbar (v3.1 — clean inline) --- */
.product-toolbar {
  margin-bottom: 28px;
  position: relative;
}

.toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.toolbar-left {
  position: relative;
  flex-shrink: 0;
}

.sort-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  letter-spacing: 0.3px;
}

.sort-trigger:hover {
  color: var(--text);
}

.sort-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.sort-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sort-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sort-option:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.sort-option.active {
  color: var(--text);
  font-weight: 600;
}

/* --- Price Filter --- */
.toolbar-price {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
}

.price-symbol {
  font-size: 12px;
  color: var(--text-muted);
}

.price-input {
  width: 56px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
  text-align: center;
}

.price-input:focus {
  border-color: var(--text);
}

.price-input::placeholder {
  color: var(--text-muted);
  font-size: 11px;
}

.price-sep {
  color: var(--text-muted);
  font-size: 11px;
  margin: 0 2px;
}

.price-apply {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 6px;
}

.price-apply:hover {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.toolbar-count {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.toolbar-count span {
  color: var(--text-secondary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .toolbar-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }
  .toolbar-count {
    margin-left: auto;
  }
  .toolbar-price {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
  .price-input {
    width: 48px;
  }
}

/* --- Detail Page --- */
.detail-page {
  display: none;
  padding-top: var(--header-h);
  min-height: 100vh;
  background: var(--bg);
}

.detail-page.active {
  display: block;
}

.detail-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 32px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 4px;
  transition: color var(--transition-fast);
}

.detail-back:hover {
  color: var(--text);
}

.detail-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Gallery */
.detail-gallery {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.detail-main-img {
  width: 100%;
  aspect-ratio: 1 / 1.1;
  background: var(--bg-alt);
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  margin-bottom: 12px;
  transition: background-image 0.4s ease;
}

.detail-thumbs {
  display: flex;
  gap: 8px;
}

.detail-thumb {
  width: 72px;
  height: 72px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: border-color var(--transition-fast), opacity var(--transition-fast);
  opacity: 0.6;
}

.detail-thumb.active {
  border-color: var(--text);
  opacity: 1;
}

.detail-thumb:hover {
  opacity: 0.8;
}

/* Info */
.detail-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.detail-name {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 400;
  margin-bottom: 12px;
  line-height: 1.3;
}

.detail-price {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}

.detail-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Selectors */
.detail-selector {
  margin-bottom: 20px;
}

.selector-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.selector-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selector-option {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition-fast);
}

.selector-option:hover {
  border-color: var(--text);
}

.selector-option.active {
  border-color: var(--text);
  background: var(--text);
  color: var(--surface);
}

/* Color swatch */
.selector-option.color-swatch {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border-width: 2px;
}

.selector-option.color-swatch.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text);
}

/* Specs */
.detail-specs {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-alt);
  border-radius: 4px;
}

.detail-specs-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-key {
  color: var(--text-secondary);
}

.spec-val {
  color: var(--text);
  font-weight: 500;
}

/* Detail actions */
.detail-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}

.detail-wishlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

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

.detail-wishlist-btn.in-wishlist {
  color: var(--accent);
  border-color: var(--accent);
}

.detail-wishlist-btn.in-wishlist svg {
  fill: var(--accent);
  stroke: var(--accent);
}

.detail-cart-btn {
  flex: 1;
  padding: 14px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: white;
  background: var(--text);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.detail-cart-btn:hover {
  background: var(--accent);
}

/* Recommendations on detail page */
.detail-recs {
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
}

.recs-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.recs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.recs-grid .product-card {
  flex: none;
  min-width: 0;
}

.recs-grid .product-card-image {
  aspect-ratio: 1 / 1.1;
}

.recs-grid .product-card-info {
  padding: 10px;
}

.recs-grid .product-card-name {
  font-size: 12px;
}

.recs-grid .product-card-price {
  font-size: 13px;
}

/* --- Wishlist Header Button --- */
.wishlist-header-btn {
  position: relative;
}

.wishlist-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: scale(0);
  transition: transform var(--transition);
}

.wishlist-badge.show {
  transform: scale(1);
}

/* Heart icon on product cards */
.wishlist-card-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  backdrop-filter: blur(4px);
  border: none;
  opacity: 0;
  transform: translateY(-4px);
}

.product-card:hover .wishlist-card-btn {
  opacity: 1;
  transform: translateY(0);
}

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

.wishlist-card-btn.in-wishlist {
  color: var(--accent);
  opacity: 1;
  transform: translateY(0);
}

.wishlist-card-btn.in-wishlist svg {
  fill: var(--accent);
  stroke: var(--accent);
}

/* --- Cart Tab Switching --- */
.cart-tabs {
  display: flex;
  gap: 0;
}

.cart-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.cart-tab-badge {
  font-size: 10px;
  color: var(--text-muted);
}

.cart-tab.active .cart-tab-badge {
  color: var(--accent);
}

.cart-tab-content {
  display: none;
}

.cart-tab-content.active {
  display: flex;
  flex-direction: column;
}

/* --- Search History --- */
.search-history {
  max-width: var(--max-width);
  margin: 12px auto 0;
  display: none;
}

.search-history.show {
  display: block;
}

.search-history-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-history-clear {
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 4px;
}

.search-history-clear:hover {
  color: var(--accent);
}

.search-history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-history-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-history-tag:hover {
  background: var(--text);
  color: var(--surface);
}

/* --- Product card wishlist heart always visible on mobile --- */
@media (max-width: 768px) {
  .wishlist-card-btn {
    opacity: 1;
    transform: translateY(0);
  }

  .detail-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-gallery {
    position: static;
  }

  .recs-grid {
    grid-template-columns: repeat(2, 1fr);
  }



  .detail-actions {
    flex-direction: column;
  }

  .detail-header {
    padding: 12px 20px;
  }

  .detail-body {
    padding: 0 20px 60px;
  }
}

@media (max-width: 480px) {
  .recs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* ========================================
   V3.2 — Badges, Color Dots, Recents, Cart Recs, etc.
   ======================================== */

/* --- Product Badge --- */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 3px 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
  pointer-events: none;
}
.product-badge.new { background: var(--accent); color: white; }
.product-badge.hot { background: var(--text); color: white; }
.product-badge.pick { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }

/* --- Color Dots on Cards --- */
.product-color-dots {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  padding: 0;
}
.product-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* --- Price Chips --- */
.price-chips {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
}
.price-chip {
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.price-chip:hover,
.price-chip.active {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg-alt);
}

/* --- Breadcrumb --- */
.detail-breadcrumb {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.detail-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.detail-breadcrumb a:hover { color: var(--text); }
.detail-breadcrumb .sep { margin: 0 6px; color: var(--border); }

/* --- Recently Viewed --- */
.recents-section {
  padding-top: 40px;
  padding-bottom: 40px;
}
.recents-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.recents-grid .product-card {
  flex: none;
  min-width: 0;
}
.recents-grid .product-card-image {
  aspect-ratio: 1 / 1.2;
}
.recents-grid .product-card-info {
  padding: 10px;
}
.recents-grid .product-card-name {
  font-size: 12px;
}
.recents-grid .product-card-price {
  font-size: 12px;
}
@media (max-width: 1024px) { .recents-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px) { .recents-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .recents-grid { grid-template-columns: repeat(2, 1fr); } }

/* --- Mobile Detail Bottom Bar --- */
.detail-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  padding: 12px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.06);
}
.detail-bar-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.detail-bar-btn {
  flex: 1;
  max-width: 240px;
  padding: 14px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: white;
  background: var(--text);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s;
}
.detail-bar-btn:hover { background: var(--accent); }

@media (max-width: 768px) {
  .detail-bar.active { display: flex; }
  .detail-body { padding-bottom: 90px; }
}

/* --- Back to Top --- */
.back-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 150;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-top:hover {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}
@media (max-width: 768px) {
  .back-top { bottom: 80px; right: 16px; width: 38px; height: 38px; }
}

/* --- Cart Recommendations --- */
.cart-recs {
  padding: 16px 28px;
  border-top: 1px solid var(--border-light);
}
.cart-recs-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.cart-recs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.cart-recs-grid .product-card {
  flex: none;
  min-width: 0;
  background: var(--bg-alt);
}
.cart-recs-grid .product-card-image {
  aspect-ratio: 1 / 1;
}
.cart-recs-grid .product-card-info {
  padding: 8px;
}
.cart-recs-grid .product-card-name {
  font-size: 11px;
}
.cart-recs-grid .product-card-price {
  font-size: 12px;
}

/* --- Image Zoom (Detail Page) --- */
.detail-main-img {
  overflow: hidden;
  position: relative;
  cursor: crosshair;
}
.detail-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
@media (hover: hover) {
  .detail-main-img:hover img {
    transform: scale(1.08);
  }
}

/* ========================================
   V3.3 — Visual polish & animations
   ======================================== */

/* --- Visual Break (quote divider) --- */
.visual-break {
  padding: 40px 32px 20px;
}
.break-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 600px;
  margin: 0 auto;
}
.break-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.break-text {
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
  flex-shrink: 0;
  max-width: 380px;
}

/* --- Section spacing tuning --- */
.arrivals-section {
  padding-top: 40px;
}
.products-section {
  padding-top: 80px;
}

/* --- Skeleton Loading --- */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skeleton-card {
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}
.skeleton-img {
  width: 100%;
  aspect-ratio: 1 / 1.2;
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border-light) 50%, var(--bg-alt) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite ease-in-out;
}
.skeleton-text {
  padding: 16px;
}
.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border-light) 50%, var(--bg-alt) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  margin-bottom: 8px;
}
.skeleton-line.short { width: 60%; }
.skeleton-line.price { width: 40%; height: 14px; margin-bottom: 0; }

@media (max-width: 768px) {
  .skeleton-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .skeleton-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* --- Hover: show second image --- */
.product-card-image {
  position: relative;
  overflow: hidden;
}
.product-card-image .hover-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}
@media (hover: hover) {
  .product-card:hover .product-card-image .hover-img {
    opacity: 1;
  }
  .product-card:hover .product-card-image img.loaded {
    opacity: 0;
  }
}

/* --- Cart fly animation --- */
.cart-fly {
  position: fixed;
  z-index: 500;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  animation: flyToCart 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes flyToCart {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0.3;
    transform: scale(0.3);
  }
}

/* --- Enhanced hover states --- */
.product-card {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition-fast);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.18);
  border-color: rgba(0,0,0,0.06);
}

.product-card-image img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card-image .hover-img {
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card-actions {
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.add-cart-btn {
  transition: background var(--transition-fast), transform 0.15s ease;
}

.add-cart-btn:active {
  transform: scale(0.97);
}

/* --- Smooth skeleton-to-content transition --- */
.products-grid.fade-in > .product-card {
  animation: cardFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.products-grid.fade-in > .product-card:nth-child(1) { animation-delay: 0s; }
.products-grid.fade-in > .product-card:nth-child(2) { animation-delay: 0.04s; }
.products-grid.fade-in > .product-card:nth-child(3) { animation-delay: 0.08s; }
.products-grid.fade-in > .product-card:nth-child(4) { animation-delay: 0.12s; }
.products-grid.fade-in > .product-card:nth-child(5) { animation-delay: 0.16s; }
.products-grid.fade-in > .product-card:nth-child(6) { animation-delay: 0.20s; }
.products-grid.fade-in > .product-card:nth-child(7) { animation-delay: 0.24s; }
.products-grid.fade-in > .product-card:nth-child(8) { animation-delay: 0.28s; }
.products-grid.fade-in > .product-card:nth-child(9) { animation-delay: 0.32s; }

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

/* --- Section breathing room --- */
.section + .section {
  margin-top: -20px;
}
.arrivals-section + .products-section {
  margin-top: 0;
  padding-top: 60px;
}
.products-section + .visual-break {
  padding-top: 20px;
  padding-bottom: 0;
}

/* --- Hero smooth transitions --- */
.hero-bg {
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-content {
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-slide:not(.active) .hero-bg {
  transform: scale(1.05);
}
.hero-slide:not(.active) .hero-content {
  opacity: 0;
  transform: translateY(12px);
}

/* --- Category card hover polish --- */
.category-card {
  transition: transform var(--transition), box-shadow var(--transition);
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -8px rgba(0,0,0,0.15);
}

/* --- Price chip active state enhancement --- */
.price-chip {
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.price-chip:active {
  transform: scale(0.95);
}

/* --- Back to top button animation --- */
.back-top {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background var(--transition-fast);
}
.back-top:hover {
  transform: translateY(-2px);
}

/* --- Footer spacing polish --- */
.site-footer {
  padding-top: 100px;
}
.footer-inner {
  margin-bottom: 60px;
}

/* --- Subscribe button hover --- */
.subscribe-btn {
  transition: background var(--transition-fast), transform 0.15s ease;
}
.subscribe-btn:active {
  transform: scale(0.97);
}

@media (max-width: 768px) {
  .section { padding: 60px 20px; }
  .section + .section { margin-top: -12px; }
  .products-section { padding-top: 40px; }
}

/* --- Products Page Overlay --- */
.products-page .products-page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 40px;
}

.products-page #productFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.products-page .filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.5px;
}
.products-page .filter-btn:hover {
  border-color: var(--text);
  color: var(--text);
}
.products-page .filter-btn.active {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.products-page-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
}

.products-page .sort-dropdown {
  z-index: 50;
}

@media (max-width: 768px) {
  .products-page .products-page-body {
    padding: 16px;
  }
  .products-page .toolbar-price {
    flex-wrap: wrap;
  }
}

/* --- Sidebar - Right-side drawer --- */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: #fff;
  z-index: 191;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
  display: flex;
  flex-direction: column;
  box-shadow: -2px 0 24px rgba(0,0,0,0.08);
  overflow-y: auto;
}
.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  flex-shrink: 0;
}
.sidebar-logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 3px;
  color: #111;
  text-decoration: none;
  transition: opacity 0.15s;
}
.sidebar-logo:hover {
  opacity: 0.6;
}
.sidebar-close {
  width: 30px;
  height: 30px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: background 0.15s, transform 0.15s;
}
.sidebar-close:hover {
  background: #e8e8e8;
  transform: rotate(90deg);
}
.sidebar-close svg {
  width: 16px;
  height: 16px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  margin: 2px 8px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 14px;
  color: #1a1a18;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  text-align: left;
  width: calc(100% - 16px);
  font-weight: 450;
  line-height: 1.3;
}
.sidebar-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.15s;
}
.sidebar-item:hover:not(:disabled) {
  background: #f3f3f3;
  transform: translateX(2px);
}
.sidebar-item:hover:not(:disabled) svg {
  opacity: 0.65;
}
.sidebar-item:active:not(:disabled) {
  transform: scale(0.98);
}
.sidebar-item:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.sidebar-badge {
  font-size: 9px;
  color: #b5b5b0;
  background: #f0f0f0;
  padding: 2px 7px;
  border-radius: 8px;
  margin-left: auto;
  letter-spacing: 0.3px;
  white-space: nowrap;
  font-weight: 400;
}

.sidebar-cat-group {
  display: flex;
  flex-direction: column;
}
.sidebar-cat-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  margin: 2px 8px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 14px;
  color: #1a1a18;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
  width: calc(100% - 16px);
  font-weight: 450;
}
.sidebar-cat-toggle svg:first-child {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.45;
}
.sidebar-cat-toggle:hover {
  background: #f3f3f3;
}
.sidebar-arrow {
  margin-left: auto;
  width: 10px;
  height: 10px;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
  opacity: 0.35;
}
.sidebar-cat-toggle:hover .sidebar-arrow {
  opacity: 0.55;
}
.sidebar-cat-toggle.expanded .sidebar-arrow {
  transform: rotate(180deg);
}

.sidebar-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s cubic-bezier(0.22,1,0.36,1);
  background: #f8f8f8;
  margin: 0 8px;
  border-radius: 6px;
}
.sidebar-sub.open {
  max-height: 320px;
}
.sidebar-sub-item {
  display: block;
  width: 100%;
  padding: 8px 20px 8px 48px;
  border: none;
  background: none;
  font-size: 13px;
  color: #666;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, transform 0.15s;
  line-height: 1.4;
}
.sidebar-sub-item:hover {
  color: #111;
  background: rgba(0,0,0,0.025);
  transform: translateX(2px);
}
.sidebar-sub-item:active {
  transform: scale(0.98);
}
.sidebar-sub-item:first-child {
  padding-top: 10px;
}
.sidebar-sub-item:last-child {
  padding-bottom: 10px;
}

.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}
.sidebar-footer-text {
  font-size: 10px;
  color: #bbb;
  letter-spacing: 0.5px;
}
/* --- Info Modal - Premium text display --- */
.info-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.info-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.info-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 560px;
  max-width: 90vw;
  max-height: 75vh;
  background: var(--surface, #fff);
  border-radius: 6px;
  z-index: 301;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.info-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.info-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border, #eee);
  flex-shrink: 0;
}
.info-modal-title {
  font-family: var(--font-serif, serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--text, #111);
}
.info-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary, #888);
  transition: background 0.15s;
}
.info-modal-close:hover {
  background: var(--bg-alt, #f5f5f5);
}

.info-modal-body {
  padding: 24px 28px 32px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.9;
  font-size: 15px;
  color: var(--text-secondary, #555);
}
.info-modal-body p {
  margin-bottom: 16px;
}
.info-modal-body p:last-child {
  margin-bottom: 0;
}
.info-modal-body em {
  font-style: italic;
  color: var(--text, #111);
}
.info-modal-body .highlight-box {
  background: var(--bg-alt, #f8f8f8);
  border-left: 2px solid var(--text, #111);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text, #333);
  border-radius: 2px;
}
.info-modal-body .highlight-box strong {
  font-weight: 600;
}

@media (max-width: 640px) {
  .info-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px 12px 0 0;
  }
  .info-modal.open {
    transform: translateY(0);
  }
}

/* --- Letter Envelope Overlay --- */
.letter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.letter-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.letter-modal {
  position: relative;
  width: 560px;
  max-width: 90vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Envelope */
.letter-envelope {
  position: relative;
  width: 260px;
  height: 150px;
  perspective: 800px;
  transition: all 0.6s cubic-bezier(0.22,1,0.36,1);
}
.letter-envelope.open {
  transform: translateY(-60px) scale(0.35);
  opacity: 0;
}
.letter-envelope.hide {
  display: none;
}

.envelope-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 82px;
  background: #f5eee5;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4c8b0;
  border-top: none;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: linear-gradient(135deg, #f0e7db 0%, #efe4d4 100%);
  border-radius: 4px 4px 0 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
  z-index: 2;
  border: 1px solid #d4c8b0;
  border-bottom: none;
}
.letter-envelope.open .envelope-flap {
  transform: rotateX(180deg);
}

.envelope-front {
  text-align: center;
  z-index: 1;
  padding: 0 24px;
}
.envelope-label {
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  color: #b8a893;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 500;
}
.envelope-addr {
  display: block;
  font-family: 'Noto Serif SC', Georgia, 'Times New Roman', serif;
  font-size: 14px;
  color: #5a4a3a;
  line-height: 1.4;
}

/* Letter paper */
.letter-paper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #fcf9f5;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  padding: 36px 32px 28px;
  max-height: 62vh;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
}
.letter-paper.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Custom scrollbar for letter */
.letter-paper::-webkit-scrollbar {
  width: 4px;
}
.letter-paper::-webkit-scrollbar-track {
  background: transparent;
}
.letter-paper::-webkit-scrollbar-thumb {
  background: #ddd7ce;
  border-radius: 2px;
}

.letter-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f0ede8;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: background 0.15s, transform 0.15s;
  z-index: 5;
}
.letter-close:hover {
  background: #e5e0d8;
  transform: rotate(90deg);
}

.letter-content {
  font-family: 'Noto Serif SC', Georgia, 'Source Han Serif SC', serif;
  color: #3a3530;
  line-height: 2;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.letter-content p {
  margin-bottom: 18px;
  text-indent: 2em;
}
.letter-content p:first-child {
  text-indent: 0;
}
.letter-salutation {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 22px;
  color: #2a2520;
  letter-spacing: 0.05em;
}
.letter-sign {
  margin-top: 36px;
  text-align: right;
  text-indent: 0 !important;
  color: #6a6058;
  font-size: 14px;
  line-height: 1.8;
}
.letter-sign span {
  display: block;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .letter-envelope {
    width: 190px;
    height: 120px;
  }
  .envelope-flap {
    height: 60px;
  }
  .letter-paper {
    padding: 24px 18px 20px;
    max-height: 82vh;
  }
  .letter-content {
    font-size: 14px;
    line-height: 1.9;
  }
  .letter-content p {
    margin-bottom: 14px;
  }
  .letter-salutation {
    font-size: 16px;
  }
  .letter-sign {
    margin-top: 28px;
    font-size: 13px;
  }
}
/* --- Hero click ripple transition --- */
.hero-ripple {
  position: fixed;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 50;
  animation: rippleGrow 0.55s cubic-bezier(0.22,1,0.36,1) forwards;
}
.hero-ripple.dark {
  background: rgba(0,0,0,0.25);
}

@keyframes rippleGrow {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    width: 300vmax;
    height: 300vmax;
    opacity: 0;
  }
}

/* Hero content fade-out on click */
.hero-slide.transitioning .hero-content {
  animation: heroContentExit 0.45s cubic-bezier(0.22,1,0.36,1) forwards;
}
.hero-slide.transitioning .hero-bg {
  animation: heroBgZoom 0.45s cubic-bezier(0.22,1,0.36,1) forwards;
}

@keyframes heroContentExit {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-24px); }
}

@keyframes heroBgZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

/* --- Personal Center --- */

.personal-page .personal-body {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 24px 48px;
}

.personal-page .detail-back {
  margin-bottom: 0;
}

/* Profile header */
.personal-header-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.03);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s;
}
.personal-header-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #d47070, var(--accent));
  background-size: 200% 100%;
}

.personal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f8f3f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  opacity: 0.7;
  flex-shrink: 0;
  transition: background 0.25s;
}
.personal-header-card:hover .personal-avatar {
  background: #f0e8e4;
}

.personal-info {
  flex: 1;
  min-width: 0;
}
.personal-name {
  font-size: 17px;
  font-weight: 500;
  color: #1a1a18;
  margin-bottom: 1px;
  cursor: pointer;
}
.personal-since {
  font-size: 12px;
  color: #b5b5b0;
}

/* Stats row */
.personal-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 18px 10px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.03);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.25s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
}
.stat-card:active {
  transform: scale(0.97);
}
.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: #1a1a18;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.stat-label {
  display: block;
  font-size: 11px;
  color: #b5b5b0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Address section */
.personal-section {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.03);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.25s;
}
.personal-section:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
}

.personal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}
.personal-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a18;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.personal-add-addr {
  border: 1px solid #e2e2dc;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  color: #666;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}
.personal-add-addr:hover {
  border-color: #bbb;
  color: #1a1a18;
}
.personal-add-addr:active {
  transform: scale(0.97);
}

.personal-address-list {
  padding: 12px 20px 16px;
}
.personal-addr-empty {
  font-size: 13px;
  color: #c5c5c0;
  text-align: center;
  padding: 20px 0;
}

/* Address card */
.personal-addr-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #fafaf8;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid #efefe9;
  transition: all 0.2s;
}
.personal-addr-card:hover {
  background: #f7f7f2;
  border-color: #e2e2dc;
}
.personal-addr-card:last-child {
  margin-bottom: 0;
}
.personal-addr-card .addr-info {
  flex: 1;
  min-width: 0;
}
.personal-addr-card .addr-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a18;
  margin-bottom: 2px;
}
.personal-addr-card .addr-name .addr-phone {
  font-weight: 400;
  color: #999;
  margin-left: 6px;
  font-size: 13px;
}
.personal-addr-card .addr-detail {
  font-size: 13px;
  color: #888;
  line-height: 1.4;
}
.personal-addr-card .addr-default-badge {
  display: inline-block;
  font-size: 9px;
  color: #a08970;
  background: #f5ede0;
  padding: 1px 7px;
  border-radius: 3px;
  margin-left: 6px;
  letter-spacing: 0.3px;
}
.personal-addr-card .addr-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.addr-action-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 11px;
  color: #b5b5b0;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}
.addr-action-btn:hover {
  color: #1a1a18;
  background: #efefe9;
}
.addr-action-btn.danger:hover {
  color: #b83b3b;
  background: #f8eeec;
}

/* Quick links */
.personal-quick-links {
  padding: 4px 8px 10px;
}
.personal-quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: #333;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.personal-quick-link:hover {
  background: #f7f7f2;
  transform: translateX(4px);
}
.personal-quick-link:active {
  transform: scale(0.98);
}
.personal-quick-link svg:first-child {
  opacity: 0.5;
  flex-shrink: 0;
  color: var(--accent);
}
.ql-arrow {
  margin-left: auto;
  opacity: 0.25;
  flex-shrink: 0;
}


/* Address modal */
.addr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 350;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.addr-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.addr-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%) scale(0.95);
  width: 420px;
  max-width: 90vw;
  background: #fff;
  border-radius: 6px;
  z-index: 351;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 16px 60px rgba(0,0,0,0.12);
}
.addr-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%,-50%) scale(1);
}

.addr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.addr-modal-title {
  font-size: 15px;
  font-weight: 500;
  color: #111;
}
.addr-modal-close {
  width: 30px;
  height: 30px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: background 0.15s, transform 0.15s;
}
.addr-modal-close:hover {
  background: #eee;
  transform: rotate(90deg);
}

.addr-modal-body {
  padding: 20px 24px 24px;
}
.addr-field {
  margin-bottom: 16px;
}
.addr-field label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.addr-field input[type="text"],
.addr-field input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  font-size: 14px;
  color: #1a1a18;
  background: #fafafa;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.addr-field input[type="text"]:focus,
.addr-field input[type="tel"]:focus {
  outline: none;
  border-color: #bbb;
  background: #fff;
}
.addr-field-check label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}
.addr-field-check input[type="checkbox"] {
  accent-color: #111;
}

.addr-save-btn {
  width: 100%;
  padding: 12px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 450;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.15s, transform 0.15s;
}
.addr-save-btn:hover {
  background: #333;
}
.addr-save-btn:active {
  transform: scale(0.98);
}

@media (max-width: 640px) {
  .personal-page .personal-body {
    padding: 8px 12px 32px;
  }
  .personal-header-card {
    padding: 18px 16px;
    border-radius: 10px;
  }
  .personal-stats {
    gap: 8px;
  }
  .stat-card {
    padding: 14px 8px;
    border-radius: 8px;
  }
  .stat-num {
    font-size: 20px;
  }

.personal-collapse.open {
  max-height: 600px;
  opacity: 1;
  margin-bottom: 16px;
  overflow-y: auto;
}

.collapse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}
.collapse-title {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  letter-spacing: 0.5px;
}
.collapse-close {
  width: 26px;
  height: 26px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: background 0.15s, transform 0.15s;
}
.collapse-close:hover {
  background: #eee;
  transform: rotate(90deg);
}

.collapse-body {
  padding: 12px 16px 18px;
}
.collapse-empty {
  text-align: center;
  padding: 28px 0;
  font-size: 13px;
  color: #bbb;
}

/* Order card in personal */
.personal-order-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  background: #fafaf8;
  border: 1px solid #efefe9;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
}
.personal-order-card:hover {
  background: #f4f4f4;
  transform: translateX(2px);
}
.personal-order-card:last-child {
  margin-bottom: 0;
}
.personal-order-card .po-img {
  width: 44px;
  height: 44px;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  background-color: #f5f5f5;
}
.personal-order-card .po-info {
  flex: 1;
  min-width: 0;
}
.personal-order-card .po-name {
  font-size: 13px;
  font-weight: 450;
  color: #1a1a18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.personal-order-card .po-meta {
  font-size: 11px;
  color: #b5b5b0;
}
.personal-order-card .po-price {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  flex-shrink: 0;
}
.personal-order-card .po-status {
  font-size: 10px;
  color: #7a8a6a;
  background: #eef5e8;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* Wishlist card in personal */
.personal-wish-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fafaf8;
  border: 1px solid #efefe9;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: background 0.15s;
  cursor: pointer;
}
.personal-wish-card:hover {
  background: #f4f4f4;
}
.personal-wish-card:last-child {
  margin-bottom: 0;
}
.personal-wish-card .pw-img {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  background-color: #f5f5f5;
}
.personal-wish-card .pw-info {
  flex: 1;
  min-width: 0;
}
.personal-wish-card .pw-name {
  font-size: 13px;
  font-weight: 450;
  color: #1a1a18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.personal-wish-card .pw-cat {
  font-size: 11px;
  color: #b5b5b0;
}
.personal-wish-card .pw-price {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  flex-shrink: 0;
}

/* --- Personal collapse action buttons --- */
.po-action-btn {
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #bbb;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s, transform 0.15s;
  line-height: 1;
}
.po-action-btn:hover {
  color: #444;
  background: #e8e8e8;
}
.po-action-btn:active {
  transform: scale(0.9);
}
.po-action-btn[data-delorder]:hover,
.po-action-btn[data-remcart]:hover,
.po-action-btn[data-remwish]:hover {
  color: #c44;
  background: #fee;
}
.po-qty {
  font-size: 13px;
  color: #666;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* --- Nickname editing --- */
.personal-name {
  font-size: 18px;
  font-weight: 500;
  color: #111;
  margin-bottom: 2px;
  cursor: pointer;
  display: inline-block;
  padding: 2px 6px 2px 0;
  border-radius: 3px;
  transition: background 0.15s;
}
.personal-name:hover {
  background: #f3f3f3;
}
.personal-name-input {
  font-size: 18px;
  font-weight: 500;
  color: #111;
  border: none;
  border-bottom: 2px solid #111;
  background: #f8f8f8;
  padding: 2px 8px;
  outline: none;
  width: 160px;
  border-radius: 2px;
}

/* --- Address Picker (checkout) --- */
.addr-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.addr-picker-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.addr-picker {
  background: #fff;
  border-radius: 6px;
  width: 460px;
  max-width: 90vw;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 60px rgba(0,0,0,0.12);
  transform: translateY(12px);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.addr-picker-overlay.open .addr-picker {
  transform: translateY(0);
}

.addr-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  flex-shrink: 0;
}
.addr-picker-title {
  font-size: 16px;
  font-weight: 500;
  color: #111;
}
.addr-picker-close {
  width: 30px;
  height: 30px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: background 0.15s, transform 0.15s;
}
.addr-picker-close:hover {
  background: #eee;
  transform: rotate(90deg);
}

.addr-picker-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.addr-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  margin-bottom: 8px;
  background: #fafafa;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border: 1.5px solid transparent;
}
.addr-option:hover {
  background: #f5f5f5;
}
.addr-option.selected {
  background: #f8f6f2;
  border-color: #c4b8a0;
}
.addr-option input[type="radio"] {
  accent-color: #111;
  margin-top: 3px;
  flex-shrink: 0;
}
.addr-option-info {
  flex: 1;
  min-width: 0;
}
.addr-option-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a18;
  margin-bottom: 3px;
}
.addr-option-name span {
  font-weight: 400;
  color: #888;
  font-size: 13px;
  margin-left: 8px;
}
.addr-option-detail {
  font-size: 13px;
  color: #777;
  line-height: 1.4;
}

.addr-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 20px;
  flex-shrink: 0;
}
.addr-picker-total {
  font-size: 15px;
  font-weight: 500;
  color: #111;
}
.addr-picker-confirm {
  padding: 10px 28px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.15s, transform 0.15s;
}
.addr-picker-confirm:hover {
  background: #333;
}
.addr-picker-confirm:active {
  transform: scale(0.97);
}

@media (max-width: 640px) {
  .addr-picker {
    max-height: 85vh;
  }
  .addr-picker-body {
    padding: 12px 14px;
  }
}


/* ===== Register Modal ===== */
.reg-overlay {
  position: fixed; inset: 0; z-index: 350;
  background: rgba(30,30,28,0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.reg-overlay.active { opacity: 1; pointer-events: auto; }

.reg-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0.95);
  z-index: 351; width: 90%; max-width: 380px;
  opacity: 0; pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.reg-modal.active { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }

.reg-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 30px; height: 30px; display: flex;
  align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--text-muted); cursor: pointer;
  border-radius: 50%; transition: all 0.2s;
}
.reg-close:hover { background: var(--border-light); color: var(--text); }

.reg-card {
  background: var(--surface);
  border-radius: 18px; padding: 40px 32px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 0 0 1px var(--border-light);
}

.reg-brand {
  font-family: var(--font-serif);
  font-size: 13px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}

.reg-title {
  font-family: var(--font-serif);
  font-size: 24px; font-weight: 600;
  color: var(--text); margin: 0 0 6px; line-height: 1.2;
}

.reg-desc {
  font-size: 14px; color: var(--text-secondary);
  margin: 0 0 28px; line-height: 1.5;
}

.reg-fields {
  display: flex; flex-direction: column; gap: 12px;
}

.reg-field { margin: 0; }

.reg-input {
  width: 100%; padding: 12px 14px; box-sizing: border-box;
  font-family: var(--font-sans); font-size: 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  outline: none; transition: border-color 0.25s, box-shadow 0.25s;
}
.reg-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184,59,59,0.08);
}
.reg-input::placeholder { color: var(--text-muted); }
.reg-input.error { border-color: var(--accent); }

.reg-btn {
  width: 100%; padding: 12px; margin-top: 4px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  background: var(--text); color: var(--surface);
  border: 1px solid var(--text); border-radius: 10px;
  cursor: pointer; transition: all 0.25s;
}
.reg-btn:hover { background: #2a2a28; }
.reg-btn:active { transform: scale(0.98); }

.reg-btn-outline {
  background: transparent; color: var(--text);
  border-color: var(--border);
  margin-top: 8px;
}
.reg-btn-outline:hover { background: var(--bg); border-color: var(--text-muted); }

.reg-already {
  text-align: center; padding: 8px 0 4px;
}

.reg-already-icon {
  display: flex; justify-content: center;
  color: #6b9e6b; margin-bottom: 12px;
}

.reg-already-text {
  font-size: 17px; font-weight: 600; color: var(--text);
  margin: 0 0 4px;
}

.reg-already-name {
  font-size: 14px; color: var(--text-secondary);
  margin: 0 0 16px;
}
