/* ===== Pawmory JP — Design Tokens ===== */
:root {
  --surface: #F4F2EF;
  --surface-inverse: #1A1A1A;
  --foreground: #1A1A1A;
  --foreground-secondary: #4A4A4A;
  --foreground-inverse: #FFFFFF;
  --accent: #C8B496;
  --accent-hover: #B8A486;
  --border: #EEECE8;
  --border-inverse: #333;
  --muted: #999;
  --font-heading: 'Georgia', 'Times New Roman', 'Hiragino Mincho ProN', 'YuMincho', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Noto Sans CJK JP', sans-serif;
  --max-width: 1240px;
  --radius: 2px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--foreground);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
hr { border: none; border-top: 1px solid var(--border-inverse); }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244,242,239,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--foreground);
}
.nav { display: flex; align-items: center; gap: 20px; }
.nav-link { font-size: 13px; color: var(--foreground-secondary); transition: color .2s; }
.nav-link:hover { color: var(--foreground); }
.cart-link { display: flex; align-items: center; gap: 4px; position: relative; }
.cart-count {
  font-size: 10px; background: var(--accent); color: var(--foreground);
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; display: none;
}
.cart-count.has-items { display: flex; }

/* ===== Hero ===== */
.hero {
  width: 100%; min-height: 520px;
  display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(26,26,26,0.1) 0%, rgba(26,26,26,0.65) 100%),
    url('../images/hero-bg.jpg') center/cover no-repeat, #4A4A4A;
}
.hero-overlay { width: 100%; padding: 60px 24px 48px; }
.hero-tag {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px; display: block;
}
.hero-title {
  font-family: var(--font-heading); font-size: 32px; font-weight: 400;
  color: var(--foreground-inverse); line-height: 1.25; margin-bottom: 12px;
}
.hero-sub {
  font-size: 14px; color: rgba(255,255,255,0.75);
  line-height: 1.7; margin-bottom: 24px; max-width: 340px;
}
.btn-primary {
  display: inline-block; padding: 12px 32px;
  background: var(--accent); color: var(--foreground);
  font-size: 13px; font-weight: 500; border-radius: var(--radius);
  transition: background .2s;
}
.btn-primary:hover { background: var(--accent-hover); }

/* ===== Trust Bar ===== */
.trust-bar {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px 12px;
  padding: 32px 20px; background: var(--surface);
  max-width: 600px; margin: 0 auto;
}
.trust-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; color: var(--foreground-secondary); text-align: center;
}
@media (min-width: 768px) {
  .trust-bar { grid-template-columns: repeat(4, 1fr); gap: 32px; max-width: var(--max-width); padding: 40px 20px; }
  .trust-item { font-size: 12px; }
}

/* ===== Sections ===== */
.section { padding: 56px 20px; }
.section-label {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-heading); font-size: 24px; font-weight: 400;
  color: var(--foreground); line-height: 1.3; margin-bottom: 8px;
}
.section-desc { font-size: 13px; color: var(--foreground-secondary); margin-bottom: 24px; }

/* ===== Featured ===== */
.featured, .portraits, .urns { text-align: center; max-width: var(--max-width); margin: 0 auto; }
.portraits { background: #FFFFFF; }
.urns { background: var(--surface); }
.products-grid {
  display: grid; grid-template-columns: 1fr; gap: 20px;
  max-width: 400px; margin: 0 auto;
}
.product-card {
  text-align: left; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  display: block; transition: transform .2s;
}
.product-card:hover { transform: translateY(-2px); }
.product-card:hover .product-title { color: var(--accent); }
.product-img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  background: #E8E5E0; border-radius: 12px; margin-bottom: 12px;
}
.product-title {
  font-size: 14px; font-weight: 500; color: var(--foreground); margin-bottom: 6px;
}
.product-price-row { display: flex; align-items: baseline; gap: 8px; }
.product-price { font-size: 16px; font-weight: 500; color: var(--foreground); }
.product-compare { font-size: 12px; color: var(--muted); text-decoration: line-through; }

/* ===== Promise ===== */
.promise {
  background: var(--surface-inverse); color: var(--foreground-inverse);
  text-align: center;
}
.promise .section-title { color: var(--foreground-inverse); }
.steps { display: flex; flex-direction: column; gap: 28px; margin-top: 32px; }
.step { max-width: 280px; margin: 0 auto; }
.step-num {
  font-family: var(--font-heading); font-size: 28px; color: var(--accent);
  display: block; margin-bottom: 8px;
}
.step h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.step p { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ===== Testimonial ===== */
.testimonial { text-align: center; padding: 64px 20px; }
.testimonial blockquote p {
  font-family: var(--font-heading); font-size: 18px; font-style: italic;
  color: var(--foreground); line-height: 1.8; margin-bottom: 12px;
}
.testimonial cite { font-size: 12px; color: var(--foreground-secondary); font-style: normal; }

/* ===== Footer ===== */
.footer {
  background: var(--surface-inverse); color: var(--muted);
  text-align: center; padding: 48px 24px 32px; font-size: 12px;
}
.footer-brand { margin-bottom: 20px; }
.footer-logo {
  font-family: var(--font-heading); font-size: 18px; color: var(--foreground-inverse);
  display: block; margin-bottom: 4px;
}
.footer-tagline { font-size: 11px; color: var(--accent); letter-spacing: 2px; }
.footer hr { margin: 20px 0; opacity: 0.3; }
.footer-cols { display: flex; justify-content: center; gap: 48px; margin-bottom: 8px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col-title {
  font-size: 10px; letter-spacing: 2px; color: var(--accent); margin-bottom: 4px;
}
.footer-col a { color: var(--muted); transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-payment-label { font-size: 10px; color: #666; letter-spacing: 1px; margin-bottom: 8px; }
.footer-payment-icons { margin-bottom: 8px; }
.footer-payment-icons .payment_holder {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px;
}
.s_payment_icon { display: block; height: 24px; width: auto; opacity: 0.7; transition: opacity .2s; flex-shrink: 0; }
.s_payment_icon:hover { opacity: 1; }
.footer-legal { margin-top: 8px; color: #888; }
.footer-address { color: #777; font-size: 10px; margin-top: 2px; }
.footer-copy { margin-top: 8px; color: #777; font-size: 10px; }

/* ===== Cart Drawer ===== */
.cart-drawer { display: none; }
.cart-drawer.open { display: block; position: fixed; inset: 0; z-index: 200; }
.cart-drawer-overlay {
  position: absolute; inset: 0;
  background: rgba(26,26,26,0.5);
  backdrop-filter: blur(4px);
}
.cart-drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 100%; max-width: 400px; background: var(--surface);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  animation: slideInRight .25s ease;
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.cart-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.cart-drawer-header h3 { font-size: 15px; font-weight: 500; }
.cart-drawer-close {
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--foreground); line-height: 1; padding: 4px;
}
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-empty { text-align: center; color: var(--foreground-secondary); font-size: 13px; padding: 40px 0; }
.cart-loading { text-align: center; color: var(--foreground-secondary); font-size: 13px; padding: 20px 0; }
.cart-item {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.cart-item-img { width: 72px; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius); background: #E8E5E0; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-item-title { font-size: 13px; font-weight: 500; }
.cart-item-variant { font-size: 11px; color: var(--foreground-secondary); }
.cart-item-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.cart-item-qty { font-size: 11px; color: var(--muted); }
.cart-item-price { font-size: 13px; font-weight: 500; }
.cart-drawer-footer {
  padding: 16px 20px; border-top: 1px solid var(--border);
}
.cart-total { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; font-weight: 500; }
.btn-checkout {
  display: block; text-align: center; padding: 14px 0; width: 100%;
  background: var(--accent); color: var(--foreground);
  font-size: 14px; font-weight: 500; border-radius: var(--radius);
  transition: background .2s;
}
.btn-checkout:hover { background: var(--accent-hover); }

/* ===== Loading / Error ===== */
.loading, .error-state {
  text-align: center; padding: 40px; color: var(--foreground-secondary);
  font-size: 13px; grid-column: 1 / -1;
}
.loading::before {
  content: ''; display: block; width: 24px; height: 24px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive — Tablet ===== */
@media (min-width: 768px) {
  .header-inner { height: 64px; padding: 0 40px; }
  .hero { min-height: 640px; }
  .hero-overlay { padding: 80px 40px 64px; }
  .hero-title { font-size: 48px; max-width: 600px; }
  .hero-sub { font-size: 16px; max-width: 500px; }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 720px;
  }
  .section { padding: 80px 40px; }
  .section-title { font-size: 32px; }
  .steps { flex-direction: row; justify-content: center; gap: 48px; }
  .testimonial blockquote p { font-size: 22px; }
  .footer { padding: 64px 48px 40px; }
  .footer-cols { gap: 80px; }
}

/* ===== Responsive — Desktop ===== */
@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
  }
  .steps { gap: 64px; }
  .step { max-width: 300px; }
}
