/* ====================================
   24mama 空間美學 — Design System
   2025-2026 Color Trends
   ==================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;600;700;900&family=Noto+Sans+TC:wght@300;400;500;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  /* === Core Colors (2025-2026 Pantone Trends) === */
  --color-cloud:       #F0EDE5;  /* Pantone 2026 COY – Cloud Dancer */
  --color-cream:       #FAF7F2;
  --color-sand:        #DDD5C4;
  --color-mocha:       #A47764;  /* Pantone 2025 COY – Mocha Mousse */
  --color-mocha-dark:  #8B6350;
  --color-mocha-light: #C29A87;
  --color-sienna:      #C4693D;  /* Burnt Sienna – SS2026 */
  --color-sage:        #8B9E7E;  /* Sage Green */
  --color-sage-dark:   #6B7E60;
  --color-sage-light:  #A8B89A;
  --color-teal:        #2D6A6A;  /* Deep Teal – FW25 */
  --color-charcoal:    #2E2E2E;
  --color-warm-gray:   #7A746E;
  --color-warm-white:  #FAF8F5;
  --color-lavender:    #B8A9C9;  /* Digital Lavender – 2026 */
  --color-dusty-rose:  #C9A9A6;

  /* === Semantic Colors === */
  --bg-primary:     var(--color-warm-white);
  --bg-secondary:   var(--color-cloud);
  --bg-dark:        var(--color-charcoal);
  --text-primary:   var(--color-charcoal);
  --text-secondary: var(--color-warm-gray);
  --text-light:     var(--color-cream);
  --accent-primary: var(--color-mocha);
  --accent-hover:   var(--color-mocha-dark);
  --accent-secondary: var(--color-sienna);
  --accent-nature:  var(--color-sage);
  --accent-deep:    var(--color-teal);
  --border-color:   var(--color-sand);
  --success:        var(--color-sage);
  --error:          #D44040;
  --warning:        var(--color-sienna);

  /* === Typography === */
  --font-serif: 'Playfair Display', 'Noto Serif TC', serif;
  --font-sans: 'Noto Sans TC', -apple-system, sans-serif;

  /* === Spacing === */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* === Border Radius === */
  --radius-sm:   0.5rem;
  --radius-md:   1rem;
  --radius-lg:   1.5rem;
  --radius-xl:   2rem;
  --radius-full: 9999px;

  /* === Shadows === */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);

  /* === Transitions === */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-cloud); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--color-mocha), var(--color-sage));
  border-radius: 10px;
}

/* === Typography === */
.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }

.gradient-text {
  background: linear-gradient(135deg, var(--color-mocha), var(--color-sage));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Layout === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header .subtitle {
  color: var(--color-mocha);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: var(--space-md);
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-mocha), var(--color-sage));
  margin: 0 auto var(--space-lg);
  border-radius: 2px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-mocha), var(--color-mocha-dark));
  color: white;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(164, 119, 100, 0.35);
}

.btn-outline {
  border: 2px solid var(--color-mocha);
  color: var(--color-mocha);
}
.btn-outline:hover {
  background: var(--color-mocha);
  color: white;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--color-cloud);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--color-sand);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--color-charcoal);
  color: white;
}
.btn-dark:hover {
  background: #444;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 0.9rem;
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Cards === */
.card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.5s var(--ease-out);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  overflow: hidden;
  aspect-ratio: 1;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

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

.card-body {
  padding: var(--space-lg);
}

/* === Grid Layouts === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2-mobile { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(164, 119, 100, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(164, 119, 100, 0); }
}

.animate-fade-in-up { animation: fadeInUp 0.8s var(--ease-out) both; }
.animate-fade-in-down { animation: fadeInDown 0.6s var(--ease-out) both; }
.animate-slide-right { animation: slideInRight 0.8s var(--ease-out) both; }
.animate-slide-left { animation: slideInLeft 0.8s var(--ease-out) both; }
.animate-scale-in { animation: scaleIn 0.6s var(--ease-out) both; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Scroll-triggered animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.from-left { transform: translateX(-40px); }
.reveal.from-left.visible { transform: translateX(0); }
.reveal.from-right { transform: translateX(40px); }
.reveal.from-right.visible { transform: translateX(0); }

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all 0.4s var(--ease-out);
  padding: 0 1.5rem;
}

.navbar.scrolled {
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-mocha), var(--color-sage));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.3s var(--ease-out);
}

.navbar-logo:hover .navbar-logo-icon {
  transform: scale(1.1);
}

.navbar-logo-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.navbar-logo-sub {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-family: var(--font-sans);
  font-weight: 300;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-mocha), var(--color-sage));
  transition: width 0.4s var(--ease-out);
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.nav-cart:hover { color: var(--text-primary); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--color-sienna);
  color: white;
  font-size: 0.6rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 0;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s var(--ease-out);
}

.mobile-menu-btn span:last-child { width: 60%; }

.mobile-menu-btn.open span:first-child {
  transform: rotate(45deg) translate(4px, 4px);
}
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:last-child {
  width: 100%;
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 5rem;
  left: 0;
  right: 0;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(20px);
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  z-index: 99;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.mobile-menu a:hover { color: var(--color-mocha); }

/* === Hero === */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(46,46,46,0.35) 0%,
    rgba(46,46,46,0.15) 40%,
    rgba(46,46,46,0.4) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 800px;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--color-cream);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.15em;
  animation: fadeInUp 1.2s var(--ease-out) 0.3s both;
}

.hero-content .hero-sub {
  color: rgba(250, 247, 242, 0.7);
  font-size: 1rem;
  font-weight: 300;
  margin-top: 1.5rem;
  line-height: 1.8;
  animation: fadeInUp 1.2s var(--ease-out) 0.8s both;
}

.hero-tag {
  color: rgba(250, 247, 242, 0.75);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-weight: 300;
  margin-bottom: 1rem;
  animation: fadeInUp 1.2s var(--ease-out) 0.1s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 1.2s var(--ease-out) 1.1s both;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  animation: float 6s ease-in-out infinite;
}

.hero-scroll-indicator {
  width: 1.5rem;
  height: 2.5rem;
  border: 2px solid rgba(250, 247, 242, 0.4);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.hero-scroll-dot {
  width: 4px;
  height: 12px;
  background: rgba(250, 247, 242, 0.6);
  border-radius: var(--radius-full);
  animation: float 2s ease-in-out infinite;
}

/* === Product Grid === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .product-grid { gap: 1rem; }
}

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.5s var(--ease-out);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-card .card-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

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

.product-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(46,46,46,0.5), transparent);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.product-card:hover .card-overlay { opacity: 1; }

.product-card .card-body {
  padding: 1rem 1.25rem;
}

.product-card .product-name {
  font-family: var(--font-serif);
  font-size: 1rem;
}

.product-card .product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
}

.product-card .product-category {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.product-card .product-price {
  font-size: 0.85rem;
  color: var(--color-sienna);
  font-weight: 500;
}

/* === Filter Tabs === */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.filter-tab {
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: transparent;
  transition: all 0.3s var(--ease-out);
}

.filter-tab:hover,
.filter-tab.active {
  background: linear-gradient(135deg, var(--color-mocha), var(--color-mocha-dark));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(164, 119, 100, 0.3);
}

/* === Cart Drawer === */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(46,46,46,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

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

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 90vw);
  background: var(--bg-primary);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
}

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

.cart-drawer-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.cart-drawer-header h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.cart-item-size {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.cart-item-price {
  color: var(--color-sienna);
  font-weight: 600;
  margin-top: 0.25rem;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cart-qty button {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.cart-qty button:hover {
  border-color: var(--color-mocha);
  color: var(--color-mocha);
}

.cart-qty span {
  font-size: 0.85rem;
  min-width: 1.5rem;
  text-align: center;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.cart-empty svg {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  opacity: 0.3;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cart-total-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cart-total-amount {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-sienna);
  font-weight: 700;
}

/* === Modal / Product Detail === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(46,46,46,0.75);
  backdrop-filter: blur(8px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

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

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: rgba(46,46,46,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.modal-close:hover { background: rgba(46,46,46,0.2); }

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

@media (max-width: 768px) {
  .modal-grid { grid-template-columns: 1fr; }
}

/* === Size Selector === */
.size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.size-btn {
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease-out);
}

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

.size-btn.selected {
  border-color: var(--color-mocha);
  color: var(--color-mocha);
  background: rgba(164, 119, 100, 0.08);
  box-shadow: 0 0 0 2px rgba(164, 119, 100, 0.2);
}

.size-btn .size-label { display: block; font-weight: 500; }
.size-btn .size-price { display: block; font-size: 0.65rem; margin-top: 2px; }

/* === Footer === */
.footer {
  background: var(--color-charcoal);
  color: rgba(250, 247, 242, 0.6);
  padding: 4rem 1.5rem 2rem;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer h4 {
  color: var(--color-cream);
  font-weight: 500;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer ul { list-style: none; }

.footer ul li { margin-bottom: 0.75rem; }

.footer ul li a {
  font-size: 0.85rem;
  transition: color 0.3s;
}

.footer ul li a:hover { color: var(--color-mocha); }

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.footer-social a {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(250, 247, 242, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.footer-social a:hover {
  border-color: var(--color-mocha);
  color: var(--color-mocha);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(250, 247, 242, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(250, 247, 242, 0.3);
}

@media (max-width: 768px) {
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
}

/* === Forms === */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-mocha);
  box-shadow: 0 0 0 3px rgba(164, 119, 100, 0.1);
}

.form-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* === Badge === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 500;
}

.badge-info {
  background: var(--color-cloud);
  color: var(--text-secondary);
}

.badge-success {
  background: rgba(139, 158, 126, 0.15);
  color: var(--color-sage-dark);
}

.badge-warning {
  background: rgba(196, 105, 61, 0.12);
  color: var(--color-sienna);
}

.badge-teal {
  background: rgba(45, 106, 106, 0.12);
  color: var(--color-teal);
}

/* === AI Chat Widget === */
.chat-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-teal), var(--color-sage-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
}

.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(45, 106, 106, 0.4);
}

.chat-window {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: min(380px, calc(100vw - 2rem));
  height: min(520px, 70vh);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 91;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s var(--ease-out);
}

.chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--color-teal), var(--color-sage-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header h4 {
  font-size: 0.9rem;
  font-weight: 500;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.chat-message {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
}

.chat-message.bot .chat-bubble {
  background: var(--color-cloud);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-message.user .chat-bubble {
  background: var(--color-mocha);
  color: white;
  border-radius: var(--radius-md) var(--radius-md) 4px var(--radius-md);
}

.chat-bubble {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 80%;
}

.chat-input-area {
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

.chat-input-area input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  outline: none;
}

.chat-input-area input:focus {
  border-color: var(--color-teal);
}

.chat-send-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background: var(--color-teal);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Admin Styles === */
.admin-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

@media (max-width: 1024px) {
  .admin-layout { grid-template-columns: 1fr; }
}

.admin-sidebar {
  background: var(--color-charcoal);
  color: var(--color-cream);
  padding: 2rem 0;
}

.admin-sidebar-logo {
  padding: 0 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-nav { list-style: none; }

.admin-nav li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.85rem;
  color: rgba(250, 247, 242, 0.6);
  transition: all 0.3s;
}

.admin-nav li a:hover,
.admin-nav li a.active {
  color: var(--color-cream);
  background: rgba(250, 247, 242, 0.08);
  border-right: 3px solid var(--color-mocha);
}

.admin-content {
  padding: 2rem;
  background: var(--color-cloud);
}

.admin-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.admin-stat {
  text-align: center;
}

.admin-stat .stat-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-mocha);
}

.admin-stat .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* === Table === */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-color);
}

.data-table td {
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover td {
  background: var(--color-cloud);
}

/* === Status Badge === */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 500;
}

.status-new { background: rgba(45, 106, 106, 0.12); color: var(--color-teal); }
.status-processing { background: rgba(164, 119, 100, 0.12); color: var(--color-mocha); }
.status-shipped { background: rgba(196, 105, 61, 0.12); color: var(--color-sienna); }
.status-completed { background: rgba(139, 158, 126, 0.15); color: var(--color-sage-dark); }
.status-cancelled { background: rgba(212, 64, 64, 0.1); color: var(--error); }

/* === Checkout === */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .checkout-grid { grid-template-columns: 1fr; }
}

.order-summary {
  background: var(--color-cloud);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: sticky;
  top: 6rem;
}

/* === Utility === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.hidden { display: none; }

/* === AI Chat Widget === */
.ai-chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  cursor: pointer;
}

.ai-chat-btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-teal), var(--color-sage-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s var(--ease-out);
  position: relative;
  z-index: 2;
}

.ai-chat-widget:hover .ai-chat-btn {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(45, 106, 106, 0.4);
}

.ai-chat-pulse {
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-teal);
  animation: pulse-glow 2s ease-in-out infinite;
  z-index: 1;
}

/* === Mobile Cart Button === */
.mobile-cart-btn {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-cart-btn {
    display: flex !important;
  }
}
