/* ==========================================================================
   PrintStory - DTC 定制睡衣品牌独立站
   全局公共样式
   ========================================================================== */

:root {
  --color-cream: #FAF7F2;
  --color-beige: #F5F1EA;
  --color-sand: #E8DFD0;
  --color-brown-dark: #3D2E1F;
  --color-brown: #6B4F3A;
  --color-brown-light: #A08770;
  --color-cta: #D9614C;
  --color-cta-hover: #C24E3B;
  --color-green: #2C4A3E;
  --color-text: #2A2118;
  --color-text-muted: #7A6F62;
  --color-border: #E8DFD0;
  --color-white: #FFFFFF;
  --color-success: #4A7C59;
  --color-warning: #D9A441;

  --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 2px 8px rgba(61, 46, 31, 0.06);
  --shadow-md: 0 4px 20px rgba(61, 46, 31, 0.08);
  --shadow-lg: 0 12px 40px rgba(61, 46, 31, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --container: 1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-cream);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-cta); }

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

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

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; color: var(--color-brown-dark); }
h1 { font-size: clamp(36px, 5vw, 64px); }
h2 { font-size: clamp(28px, 3.5vw, 44px); }
h3 { font-size: clamp(20px, 2vw, 28px); }
h4 { font-size: 18px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: var(--container); margin: 0 auto;
}
.logo {
  font-family: var(--font-serif); font-size: 26px; font-weight: 700;
  color: var(--color-brown-dark); letter-spacing: 0.5px;
}
.logo span { color: var(--color-cta); }
.nav { display: flex; gap: 32px; }
.nav a { font-size: 14px; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }
.nav a.active { color: var(--color-cta); border-bottom: 2px solid var(--color-cta); padding-bottom: 4px; }
.header-actions { display: flex; gap: 16px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: background 0.2s;
}
.icon-btn:hover { background: var(--color-sand); }
.cart-badge {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--color-cta); color: white;
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

.lang-switch {
  display: inline-flex; align-items: center;
  border: 1px solid var(--color-border); border-radius: var(--radius-full);
  padding: 3px; gap: 2px; background: rgba(255,255,255,0.65);
}
.lang-btn {
  padding: 6px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
  color: var(--color-text-muted); background: transparent;
  cursor: pointer; font-family: inherit; border: none; transition: color 0.2s, background 0.2s;
}
.lang-btn:hover { color: var(--color-brown-dark); }
.lang-btn.active { background: var(--color-brown-dark); color: var(--color-white); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; transition: all 0.3s;
  cursor: pointer;
}
.btn-primary { background: var(--color-cta); color: white; }
.btn-primary:hover { background: var(--color-cta-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); color: white; }
.btn-secondary { background: var(--color-brown-dark); color: white; }
.btn-secondary:hover { background: #2a1f12; color: white; }
.btn-outline { background: transparent; color: var(--color-brown-dark); border: 1.5px solid var(--color-brown-dark); }
.btn-outline:hover { background: var(--color-brown-dark); color: white; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Footer ===== */
.footer {
  background: var(--color-brown-dark); color: var(--color-cream);
  padding: 80px 0 40px; margin-top: 100px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px; margin-bottom: 60px;
}
.footer h4 {
  color: white; font-family: var(--font-sans);
  font-size: 13px; text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 20px;
}
.footer-brand .logo { color: white; font-size: 32px; margin-bottom: 16px; display: block; }
.footer-brand p { color: rgba(250, 247, 242, 0.7); margin-bottom: 24px; line-height: 1.7; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 12px; }
.footer ul a { color: rgba(250, 247, 242, 0.7); font-size: 14px; }
.footer ul a:hover { color: var(--color-cta); }
.newsletter-form {
  display: flex; background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full); padding: 4px; margin-top: 16px;
}
.newsletter-form input {
  flex: 1; background: none; border: none; padding: 12px 20px;
  color: white; font-family: inherit; font-size: 14px; outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form button {
  background: var(--color-cta); color: white;
  padding: 10px 24px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; text-transform: uppercase;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px; display: flex; justify-content: space-between;
  align-items: center; color: rgba(250, 247, 242, 0.5); font-size: 13px;
}
.social-icons { display: flex; gap: 16px; }
.social-icons a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.social-icons a:hover { background: var(--color-cta); }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 30px; right: 30px;
  background: var(--color-brown-dark); color: white;
  padding: 16px 24px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); font-size: 14px;
  display: flex; align-items: center; gap: 12px;
  transform: translateY(100px); opacity: 0;
  transition: all 0.4s; z-index: 200;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast .check { color: var(--color-success); font-size: 20px; }

/* ===== Common Section ===== */
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title .eyebrow {
  display: block; font-size: 12px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--color-cta);
  margin-bottom: 16px; font-weight: 600;
}
.section-title h2 { margin-bottom: 16px; }
.section-title p { color: var(--color-text-muted); max-width: 600px; margin: 0 auto; }

/* ===== Product Card ===== */
.product-card {
  background: white; border-radius: var(--radius-md);
  overflow: hidden; transition: all 0.3s; cursor: pointer;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-image {
  aspect-ratio: 4/5; overflow: hidden; position: relative;
  background: var(--color-sand);
}
.product-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.product-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--color-brown-dark); color: white;
  padding: 6px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase;
}
.product-tag.bestseller { background: var(--color-cta); }
.product-info { padding: 16px; }
.product-name {
  font-family: var(--font-serif); font-size: 17px;
  font-weight: 600; color: var(--color-brown-dark);
  margin-bottom: 6px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-meta {
  display: flex; justify-content: space-between; align-items: center;
}
.product-price { font-size: 16px; font-weight: 600; color: var(--color-text); }
.product-rating {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--color-text-muted);
}
.star { color: #E8B931; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav { display: none; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .section { padding: 60px 0; }
}
