/* ===== CSS Variables ===== */
:root {
  --bg: #F9F7F4;
  --text: #2C2C2C;
  --accent: #B76E79;
  --accent-hover: #a05d67;
  --border: #E8E6E3;
  --trust: #2D5F3F;
  --white: #ffffff;
  --shadow: 0 2px 16px rgba(44,44,44,0.06);
  --shadow-lg: 0 8px 32px rgba(44,44,44,0.10);
  --radius: 12px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-title: 'Georgia', 'Noto Serif SC', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249,247,244,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease);
}
.header.scrolled { box-shadow: var(--shadow); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.logo { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text);
}
.logo-sub { font-size: 11px; color: var(--accent); letter-spacing: 2px; }

.nav-desktop { display: flex; gap: 28px; }
.nav-link {
  font-size: 14px;
  color: var(--text);
  padding: 6px 0;
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.search-box {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 6px 12px;
  transition: border-color 0.2s var(--ease);
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 140px;
  font-size: 13px;
  color: var(--text);
}
.search-btn { font-size: 16px; color: var(--accent); padding: 2px; }

.cart-icon {
  position: relative;
  font-size: 22px;
  transition: transform 0.2s var(--ease);
}
.cart-icon:hover { transform: scale(1.1); }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--accent);
  color: var(--white);
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  font-size: 24px;
  color: var(--text);
}
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }
.nav-mobile .nav-link { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s var(--ease);
  letter-spacing: 0.5px;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(183,110,121,0.3);
}
.btn-outline {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 15px; }
.btn-block { width: 100%; }

/* ===== Hero Section ===== */
.hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #F9F7F4 0%, #f0ebe5 50%, #F9F7F4 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: radial-gradient(circle at 30% 50%, var(--accent) 0%, transparent 60%),
              radial-gradient(circle at 70% 50%, var(--trust) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 2; padding: 20px; }
.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 0.2s forwards;
}
.hero p {
  font-size: clamp(15px, 2vw, 20px);
  color: #666;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 0.4s forwards;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 0.6s forwards;
}
.scroll-arrow {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  color: var(--accent);
  animation: bounce 2s infinite;
}

/* ===== Brand Scroll ===== */
.brand-scroll {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.brand-track {
  display: flex;
  gap: 48px;
  animation: scrollX 20s linear infinite;
  width: max-content;
}
.brand-item {
  font-family: var(--font-title);
  font-size: 18px;
  color: #999;
  white-space: nowrap;
  letter-spacing: 2px;
  transition: color 0.3s;
}
.brand-item:hover { color: var(--accent); }

/* ===== Section ===== */
.section { padding: 64px 0; }
.section-title {
  font-family: var(--font-title);
  font-size: clamp(22px, 3vw, 32px);
  text-align: center;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  color: #888;
  font-size: 14px;
  margin-bottom: 40px;
}

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s var(--ease);
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.product-card-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f2ef;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
}
.product-card:hover .product-card-overlay {
  opacity: 1;
  transform: translateY(0);
}
.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
}
.product-card-info { padding: 16px; }
.product-card-brand {
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.product-card-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.3;
}
.product-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-current {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
}
.price-original {
  font-size: 13px;
  color: #bbb;
  text-decoration: line-through;
}
.product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}
.stars { color: #f5c518; letter-spacing: 1px; }

/* ===== Category Cards ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.category-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s var(--ease);
  cursor: pointer;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.category-icon { font-size: 36px; margin-bottom: 12px; }
.category-name { font-size: 15px; font-weight: 500; }
.category-count { font-size: 12px; color: #999; margin-top: 4px; }

/* ===== Reviews ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}
.review-meta { flex: 1; }
.review-user { font-weight: 500; font-size: 14px; }
.review-date { font-size: 12px; color: #999; }
.review-text { font-size: 14px; line-height: 1.6; color: #555; }

/* ===== Subscribe ===== */
.subscribe-section {
  background: linear-gradient(135deg, #2C2C2C, #3d3d3d);
  color: var(--white);
  padding: 64px 20px;
  text-align: center;
}
.subscribe-section h2 {
  font-family: var(--font-title);
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 8px;
}
.subscribe-section p { color: #ccc; margin-bottom: 24px; font-size: 14px; }
.subscribe-form {
  display: flex;
  max-width: 460px;
  margin: 0 auto;
  gap: 12px;
}
.subscribe-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #555;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.subscribe-form input::placeholder { color: #999; }
.subscribe-form input:focus { border-color: var(--accent); }

/* ===== Product List Page ===== */
.list-page { display: flex; gap: 32px; padding: 32px 0; }
.filter-sidebar {
  width: 220px;
  flex-shrink: 0;
}
.filter-group { margin-bottom: 24px; }
.filter-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.filter-option {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: color 0.2s;
}
.filter-option:hover, .filter-option.active { color: var(--accent); font-weight: 500; }

.list-main { flex: 1; }
.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.sort-options { display: flex; gap: 16px; }
.sort-btn {
  font-size: 13px;
  color: #888;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.sort-btn:hover, .sort-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.result-count { font-size: 13px; color: #999; }

/* ===== Product Detail ===== */
.detail-page { padding: 32px 0; }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.detail-gallery {}
.detail-main-img {
  border-radius: var(--radius);
  overflow: hidden;
  background: #f5f2ef;
  aspect-ratio: 1;
  margin-bottom: 12px;
}
.detail-main-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumbs { display: flex; gap: 8px; }
.detail-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.detail-thumb.active, .detail-thumb:hover { border-color: var(--accent); }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-info {}
.detail-brand {
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.detail-name {
  font-family: var(--font-title);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  margin-bottom: 16px;
}
.detail-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}
.detail-price .price-current { font-size: 28px; }
.detail-price .price-original { font-size: 16px; }
.detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #888;
}
.detail-desc {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 24px;
}
.detail-notes {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.detail-notes h4 { font-size: 14px; margin-bottom: 12px; }
.note-row { display: flex; gap: 12px; margin-bottom: 8px; font-size: 13px; }
.note-label { color: var(--accent); font-weight: 500; min-width: 48px; }
.detail-stock { font-size: 13px; margin-bottom: 20px; }
.stock-ok { color: var(--trust); }
.stock-low { color: #e67e22; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Detail Tabs ===== */
.detail-tabs { margin-top: 48px; }
.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 32px;
}
.tab-btn {
  padding: 12px 0;
  font-size: 15px;
  color: #888;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab-btn:hover, .tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-content { padding: 24px 0; font-size: 14px; line-height: 1.8; color: #555; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Cart Page ===== */
.cart-page { padding: 32px 0; }
.cart-page h1 {
  font-family: var(--font-title);
  font-size: 24px;
  margin-bottom: 32px;
}
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; }
.cart-items {}
.cart-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.cart-item-img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  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; margin-bottom: 4px; }
.cart-item-brand { font-size: 12px; color: var(--accent); margin-bottom: 8px; }
.cart-item-price { font-weight: 600; color: var(--accent); }
.cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.cart-qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.cart-qty button:hover { border-color: var(--accent); color: var(--accent); }
.cart-qty span { font-size: 14px; min-width: 24px; text-align: center; }
.cart-item-remove {
  font-size: 13px;
  color: #ccc;
  transition: color 0.2s;
  align-self: flex-start;
}
.cart-item-remove:hover { color: #e74c3c; }

.cart-summary {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 100px;
  height: fit-content;
}
.cart-summary h3 { font-size: 16px; margin-bottom: 20px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.summary-total {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
  font-weight: 600;
  font-size: 18px;
}
.summary-total .price-current { font-size: 22px; }
.cart-summary .btn { margin-top: 20px; }
.cart-empty {
  text-align: center;
  padding: 80px 20px;
}
.cart-empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.3; }
.cart-empty p { color: #999; margin-bottom: 24px; }

/* ===== Checkout ===== */
.checkout-page { padding: 32px 0; }
.checkout-page h1 {
  font-family: var(--font-title);
  font-size: 24px;
  margin-bottom: 32px;
}
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }
.form-section { margin-bottom: 32px; }
.form-section h3 { font-size: 16px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: #666; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background: var(--white);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===== Contact ===== */
.contact-page { padding: 48px 0; }
.contact-page h1 {
  font-family: var(--font-title);
  font-size: 28px;
  text-align: center;
  margin-bottom: 8px;
}
.contact-subtitle { text-align: center; color: #888; margin-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 900px; margin: 0 auto; }
.contact-info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.contact-info-card h3 { font-size: 16px; margin-bottom: 20px; }
.contact-item { display: flex; gap: 12px; margin-bottom: 16px; font-size: 14px; }
.contact-item-icon { font-size: 20px; }
.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.contact-form h3 { font-size: 16px; margin-bottom: 20px; }

/* ===== Order Confirm ===== */
.order-confirm { padding: 64px 20px; text-align: center; max-width: 600px; margin: 0 auto; }
.order-confirm-icon { font-size: 64px; color: var(--trust); margin-bottom: 16px; }
.order-confirm h1 { font-family: var(--font-title); font-size: 24px; margin-bottom: 24px; }
.order-detail-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: left;
  margin-bottom: 24px;
}
.order-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.order-detail-row:last-child { border-bottom: none; }

/* ===== Footer ===== */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 { font-size: 14px; margin-bottom: 16px; }
.footer-col p, .footer-col a {
  display: block;
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: #bbb;
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--white);
  border-radius: 8px;
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.3s var(--ease);
  border-left: 3px solid var(--accent);
}
.toast.success { border-left-color: var(--trust); }
.toast.error { border-left-color: #e74c3c; }

/* ===== Promo Popup ===== */
.promo-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: linear-gradient(135deg, var(--accent), #d4919a);
  color: var(--white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
}
.promo-popup.show { transform: translateY(0); }
.promo-content { text-align: center; }
.promo-close {
  position: absolute;
  top: 8px;
  right: 16px;
  font-size: 20px;
  color: rgba(255,255,255,0.7);
}
.promo-close:hover { color: var(--white); }
.promo-icon { font-size: 28px; margin-bottom: 4px; }
.promo-content h3 { font-size: 16px; margin-bottom: 2px; }
.promo-amount { font-size: 24px; font-weight: 700; }
.promo-desc { font-size: 12px; opacity: 0.9; margin-bottom: 8px; }
.promo-btn { background: var(--white); color: var(--accent); font-weight: 600; }
.promo-btn:hover { background: #f5f2ef; }

/* ===== Mobile Cart Bar ===== */
.mobile-cart-bar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
}
.mobile-cart-icon {
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(183,110,121,0.4);
  position: relative;
  transition: transform 0.2s;
}
.mobile-cart-icon:hover { transform: scale(1.1); }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}
@keyframes scrollX {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .list-page { flex-direction: column; }
  .filter-sidebar { width: 100%; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .nav-desktop { display: none; }
  .mobile-menu-btn { display: block; }
  .search-box input { width: 100px; }
  .hero { height: 55vh; min-height: 360px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card-info { padding: 10px; }
  .product-card-name { font-size: 13px; }
  .price-current { font-size: 15px; }
  .section { padding: 40px 0; }
  .subscribe-form { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .detail-actions { flex-direction: column; }
  .detail-actions .btn { width: 100%; }
}

/* ===== User Authentication ===== */

/* Nav Icon Link */
.nav-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text);
  font-size: 20px;
  transition: all 0.25s var(--ease);
  position: relative;
}
.nav-icon-link:hover {
  background: rgba(183,110,121,0.08);
  color: var(--accent);
}

/* User Menu Container */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
}
.user-menu-trigger:hover {
  background: rgba(183,110,121,0.06);
  border-color: var(--border);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #d4959f);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-arrow {
  font-size: 10px;
  color: #999;
  transition: transform 0.25s var(--ease);
}
.user-menu:hover .user-arrow {
  transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s var(--ease);
  z-index: 200;
  overflow: hidden;
}
.user-menu:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s var(--ease);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.user-dropdown-item:hover {
  background: rgba(183,110,121,0.06);
  color: var(--accent);
}
.user-dropdown-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  opacity: 0.7;
}
.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.user-dropdown-item.logout {
  color: #c0392b;
}
.user-dropdown-item.logout:hover {
  background: rgba(192,57,43,0.06);
  color: #c0392b;
}

/* ===== Auth Pages ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 60px;
  background: linear-gradient(135deg, #fdf8f6 0%, #f9f2f0 50%, #f5ece8 100%);
}
.auth-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  animation: fadeInUp 0.5s var(--ease);
}
.auth-card-header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-card-logo {
  font-family: var(--font-title);
  font-size: 28px;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.auth-card-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.auth-card-subtitle {
  font-size: 14px;
  color: #999;
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #4a4a4a;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.auth-form-group input {
  height: 48px;
  padding: 0 16px;
  border: 1px solid #e0ded9;
  border-radius: 10px;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  transition: all 0.3s var(--ease);
  outline: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.auth-form-group input:hover {
  border-color: #d0ccc5;
}
.auth-form-group input:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(183,110,121,0.08), 0 2px 8px rgba(183,110,121,0.06);
}
.auth-form-group input::placeholder {
  color: #c5c0b8;
  font-size: 14px;
}
.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.auth-form-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #777;
  cursor: pointer;
}
.auth-form-options input[type="checkbox"] {
  accent-color: var(--accent);
}
.auth-form-options a {
  color: var(--accent);
  font-weight: 500;
}
.auth-form-options a:hover {
  text-decoration: underline;
}
.auth-form .btn {
  height: 50px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  letter-spacing: 1px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.auth-form .btn-primary {
  background: linear-gradient(135deg, #c9808a 0%, var(--accent) 50%, #a5626c 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(183,110,121,0.3);
}
.auth-form .btn-primary:hover {
  background: linear-gradient(135deg, #d4939c 0%, #c27883 50%, #b06a74 100%);
  box-shadow: 0 6px 20px rgba(183,110,121,0.4);
  transform: translateY(-1px);
}
.auth-form .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(183,110,121,0.3);
}
.auth-form-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #bbb;
  font-size: 12px;
}
.auth-form-divider::before,
.auth-form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-form-footer {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin-top: 4px;
}
.auth-form-footer a {
  color: var(--accent);
  font-weight: 600;
}
.auth-form-footer a:hover {
  text-decoration: underline;
}

/* Auth Message */
.auth-message {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  display: none;
}
.auth-message.error {
  display: block;
  background: #fef2f2;
  color: #c0392b;
  border: 1px solid #fecaca;
}
.auth-message.success {
  display: block;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* ===== Auth BEM Styles (for public/ pages) ===== */
.auth-card__header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-card__title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.auth-card__subtitle {
  font-size: 14px;
  color: #999;
}

/* Auth Form BEM */
.auth-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-form__label {
  font-size: 13px;
  font-weight: 600;
  color: #4a4a4a;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.auth-form__input {
  height: 48px;
  padding: 0 16px;
  border: 1px solid #e0ded9;
  border-radius: 10px;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  transition: all 0.3s var(--ease);
  outline: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.auth-form__input:hover {
  border-color: #d0ccc5;
}
.auth-form__input:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(183,110,121,0.08), 0 2px 8px rgba(183,110,121,0.06);
}
.auth-form__input::placeholder {
  color: #c5c0b8;
  font-size: 14px;
}
.auth-form__submit {
  height: 50px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  letter-spacing: 1px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: none;
  background: linear-gradient(135deg, #c9808a 0%, var(--accent) 50%, #a5626c 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(183,110,121,0.3);
}
.auth-form__submit:hover {
  background: linear-gradient(135deg, #d4939c 0%, #c27883 50%, #b06a74 100%);
  box-shadow: 0 6px 20px rgba(183,110,121,0.4);
  transform: translateY(-1px);
}
.auth-form__submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(183,110,121,0.3);
}
.auth-form__footer {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin-top: 4px;
}
.auth-form__link {
  color: var(--accent);
  font-weight: 600;
}
.auth-form__link:hover {
  text-decoration: underline;
}

/* ===== Auth Page (login.php / register.php) ===== */
.auth-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.auth-title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.auth-subtitle {
  font-size: 14px;
  color: #999;
  text-align: center;
  margin-bottom: 28px;
}

/* Auth Form Group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #4a4a4a;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-group input {
  height: 48px;
  padding: 0 16px;
  border: 1px solid #e0ded9;
  border-radius: 10px;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  transition: all 0.3s var(--ease);
  outline: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.form-group input:hover {
  border-color: #d0ccc5;
}
.form-group input:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(183,110,121,0.08), 0 2px 8px rgba(183,110,121,0.06);
}
.form-group input::placeholder {
  color: #c5c0b8;
  font-size: 14px;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.auth-footer a {
  color: var(--accent);
  font-weight: 600;
  transition: color 0.2s var(--ease);
}
.auth-footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-error {
  background: #fef2f2;
  color: #c0392b;
  border: 1px solid #fecaca;
}
.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Alert BEM */
.alert--error {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  background: #fef2f2;
  color: #c0392b;
  border: 1px solid #fecaca;
  margin-bottom: 20px;
}
.alert--success {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  margin-bottom: 20px;
}

/* ===== Account Page ===== */
.account-page {
  padding: 60px 0;
}
.account-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #d4959f);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  flex-shrink: 0;
}
.account-info h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}
.account-info p {
  font-size: 14px;
  color: #888;
}
.account-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
}
.account-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.account-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s var(--ease);
  cursor: pointer;
}
.account-nav-item:hover,
.account-nav-item.active {
  background: rgba(183,110,121,0.08);
  color: var(--accent);
}
.account-nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.account-content {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px;
}
.account-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ===== Orders Page ===== */
.orders-page {
  padding: 60px 0;
}
.orders-header {
  margin-bottom: 32px;
}
.orders-header h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}
.orders-header p {
  font-size: 14px;
  color: #888;
}
.order-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.25s var(--ease);
}
.order-card:hover {
  box-shadow: var(--shadow);
}
.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.order-id {
  font-size: 13px;
  color: #888;
}
.order-id span {
  font-weight: 600;
  color: var(--text);
}
.order-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}
.order-status.pending {
  background: #fef3c7;
  color: #92400e;
}
.order-status.shipped {
  background: #dbeafe;
  color: #1e40af;
}
.order-status.delivered {
  background: #d1fae5;
  color: #065f46;
}
.order-status.cancelled {
  background: #fee2e2;
  color: #991b1b;
}
.order-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.order-item {
  display: flex;
  align-items: center;
  gap: 16px;
}
.order-item-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #f5f2ef;
  object-fit: cover;
  flex-shrink: 0;
}
.order-item-info {
  flex: 1;
}
.order-item-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}
.order-item-meta {
  font-size: 12px;
  color: #999;
}
.order-item-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.order-total {
  font-size: 14px;
  color: #666;
}
.order-total strong {
  font-size: 18px;
  color: var(--text);
}

/* ===== Auth Responsive ===== */
@media (max-width: 767px) {
  .user-name {
    display: none;
  }
  .user-menu-trigger {
    padding: 4px;
  }
  .auth-card {
    padding: 32px 24px;
  }
  .auth-card-logo {
    font-size: 24px;
  }
  .auth-card-title {
    font-size: 20px;
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
  .account-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .account-nav-item {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .nav-mobile-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
  }
}
