/* ============================================
   Japan LAMA - Custom Styles
   ============================================ */

:root {
  --color-primary: #c41e3a;
  --color-primary-dark: #9b1630;
  --color-secondary: #d4a574;
  --color-bg: #faf8f5;
  --color-bg-dark: #f0ebe3;
  --color-text: #2d2d2d;
  --color-text-light: #6b6b6b;
  --color-border: #e5e0d8;
  --color-success: #2d8a4e;
  --color-warning: #d4a400;
  --color-error: #c41e3a;
}

* { box-sizing: border-box; }

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
  background: #faf8f5;
  color: var(--color-text);
  line-height: 1.8;
  margin: 0;
}

/* Navbar */
.navbar {
  background: white;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: 'Hiragino Mincho ProN', 'Yu Mincho', 'MS PMincho', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-primary); }
.nav-cart-count {
  background: var(--color-primary);
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  position: relative;
  top: -8px;
  right: 4px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fce4ec 0%, #f8e8e0 50%, #fff3e0 100%);
}
.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1rem;
  text-align: center;
}
.hero-title {
  font-family: 'Hiragino Mincho ProN', 'Yu Mincho', 'MS PMincho', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary { background: var(--color-text); color: white; }
.btn-primary:hover { background: #000; }
.btn-outline { background: transparent; color: var(--color-text); border: 1px solid var(--color-text); }
.btn-outline:hover { background: var(--color-text); color: white; }
.btn-danger { background: var(--color-error); color: white; }
.btn-danger:hover { background: var(--color-primary-dark); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* External platform cards */
.platform-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:1.25rem; }
.platform-card { display:flex; flex-direction:column; align-items:center; padding:1.5rem 1rem; background:white; border-radius:12px; border:1px solid #eee; text-decoration:none; color:var(--color-text); transition:all 0.25s; }
.platform-card:hover { transform:translateY(-4px); box-shadow:0 12px 32px rgba(0,0,0,0.1); border-color:transparent; }
.platform-icon { width:64px; height:64px; border-radius:16px; display:flex; align-items:center; justify-content:center; font-size:1.6rem; font-weight:700; margin-bottom:0.75rem; overflow:hidden; }
.platform-icon img { width:100%; height:100%; object-fit:contain; }
.platform-name { font-weight:600; font-size:0.9rem; margin-bottom:0.25rem; }
.platform-desc { font-size:0.75rem; color:var(--color-text-light); margin-bottom:0.75rem; }
.platform-btn { padding:0.5rem 1.5rem; border-radius:24px; font-size:0.8rem; font-weight:500; text-decoration:none; transition:all 0.2s; }
.platform-card { background:#f5f5f5; }
.platform-icon { background:#eee; }
.platform-amazon .platform-btn { background:#ff9900; color:white; }
.platform-amazon .platform-btn:hover { background:#e68900; }
.platform-tiktok .platform-btn { background:#000; color:white; }
.platform-tiktok .platform-btn:hover { background:#333; }
.platform-qoo10 .platform-btn { background:#e60012; color:white; }
.platform-qoo10 .platform-btn:hover { background:#c50010; }
.platform-rakuten .platform-btn { background:#bf0000; color:white; }
.platform-rakuten .platform-btn:hover { background:#a00000; }
@media (max-width:768px) { .platform-grid { grid-template-columns:repeat(2,1fr); } }

/* Series showcase module (left image + right products) */
.series-module { display:grid; grid-template-columns:380px 1fr; gap:2rem; align-items:stretch; }
.series-image { position:relative; overflow:hidden; border-radius:8px; background:var(--color-bg-dark); min-height:400px; display:flex; align-items:center; justify-content:center; }
.series-image img { width:100%; height:100%; object-fit:cover; position:absolute; top:0; left:0; }
.series-image-text { position:absolute; bottom:0; left:0; right:0; padding:2rem 1.5rem; background:linear-gradient(transparent, rgba(0,0,0,0.5)); color:white; z-index:1; }
.series-image-text h3 { font-family:'Hiragino Mincho ProN','Yu Mincho','MS PMincho',serif; font-size:1.25rem; margin-bottom:0.35rem; }
.series-image-text p { font-size:0.85rem; opacity:0.9; margin:0; }
.series-products { display:flex; flex-direction:column; gap:1rem; }
.series-product-card { display:flex; gap:1rem; background:white; border-radius:8px; padding:1rem; text-decoration:none; color:var(--color-text); transition:all 0.2s; align-items:center; border:1px solid var(--color-border); }
.series-product-card:hover { box-shadow:0 4px 16px rgba(0,0,0,0.08); transform:translateY(-1px); }
.series-product-img { width:100px; height:100px; border-radius:6px; background:var(--color-bg-dark); display:flex; align-items:center; justify-content:center; font-size:1.8rem; flex-shrink:0; overflow:hidden; position:relative; }
.series-product-img img { width:100%; height:100%; object-fit:cover; position:absolute; top:0; left:0; }
.series-product-info { flex:1; }
.series-product-info .name { font-weight:600; font-size:0.95rem; margin-bottom:0.25rem; }
.series-product-info .desc { font-size:0.8rem; color:var(--color-text-light); line-height:1.5; margin-bottom:0.5rem; }
.series-product-info .price { font-weight:700; color:var(--color-primary); font-size:0.95rem; }
.series-module-alt { direction:rtl; }
.series-module-alt > * { direction:ltr; }
@media (max-width:768px) {
  .series-module { grid-template-columns:1fr; }
  .series-image { min-height:250px; }
}

/* Promo video */
.video-container { max-width:900px; margin:0 auto; border-radius:8px; overflow:hidden; box-shadow:0 4px 24px rgba(0,0,0,0.1); }
.video-container video { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; }

/* Product description images */
.product-description { text-align:left; }
.product-description img { max-width:80% !important; width:auto !important; height:auto !important; margin:0 auto !important; display:block !important; border-radius:4px; }
.product-description p { margin-bottom:10px; }

/* Product image gallery */
.product-gallery { position:relative; max-width:500px; margin:0 auto; }
.product-gallery-main-wrap { position:relative; display:flex; align-items:center; justify-content:center; }
.product-gallery-main { width:100%; max-height:500px; object-fit:contain; border-radius:8px; background:var(--color-bg-dark); }
.gallery-arrow { position:absolute; top:50%; transform:translateY(-50%); width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,0.85); border:1px solid var(--color-border); cursor:pointer; font-size:1.1rem; display:flex; align-items:center; justify-content:center; z-index:10; transition:all 0.2s; color:var(--color-text); }
.gallery-arrow:hover { background:white; box-shadow:0 2px 8px rgba(0,0,0,0.12); }
.gallery-arrow.prev { left:4px; }
.gallery-arrow.next { right:4px; }
.gallery-arrow:disabled { opacity:0; cursor:default; }
.product-gallery-thumbs { display:flex; gap:8px; margin-top:12px; overflow-x:auto; justify-content:center; }
.product-gallery-thumb { width:60px; height:60px; object-fit:cover; border-radius:4px; cursor:pointer; border:2px solid transparent; background:var(--color-bg-dark); flex-shrink:0; }
.product-gallery-thumb:hover, .product-gallery-thumb.active { border-color:var(--color-text); }

/* Variant thumbnails */
.variant-thumb-grid { display:flex; flex-wrap:wrap; gap:0.5rem; }
.variant-thumb { display:flex; flex-direction:column; align-items:center; gap:4px; cursor:pointer; }
.variant-thumb-img { width:56px; height:56px; border-radius:6px; border:2px solid var(--color-border); background:var(--color-bg-dark); display:flex; align-items:center; justify-content:center; font-size:1.2rem; overflow:hidden; transition:border-color 0.2s; }
.variant-thumb-img img { width:100%; height:100%; object-fit:cover; }
.variant-thumb.selected .variant-thumb-img { border-color:var(--color-text); }
.variant-thumb-name { font-size:0.7rem; color:var(--color-text-light); text-align:center; max-width:60px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Cards */
.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.product-card { cursor: pointer; }
.product-card .product-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--color-bg-dark);
}
.product-card .product-info { padding: 1rem; }
.product-card .product-name { font-weight: 500; font-size: 0.9rem; margin-bottom: 0.25rem; }
.product-card .product-price { font-weight: 700; color: var(--color-primary); }
.product-card .product-compare { font-size: 0.8rem; color: var(--color-text-light); text-decoration: line-through; margin-left: 0.5rem; }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Section */
.section { padding: 4rem 1rem; }
.section-title {
  font-family: 'Hiragino Mincho ProN', 'Yu Mincho', 'MS PMincho', serif;
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.35rem; }
.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  background: white;
  transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--color-text); }
.form-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  background: white;
}

/* Cart */
.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
}
.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--color-bg-dark);
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 500; }
.cart-item-price { color: var(--color-primary); font-weight: 600; }

/* Footer */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: 3rem 1rem 2rem;
  margin-top: 3rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer h4 { color: white; font-size: 0.9rem; margin-bottom: 0.75rem; }
.footer a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.85rem; display: block; margin-bottom: 0.35rem; }
.footer a:hover { color: white; }
.footer-bottom { text-align: center; padding-top: 2rem; margin-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; }

/* Alert */
.alert { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #fde8e8; color: var(--color-error); border: 1px solid #f5c6c6; }
.alert-success { background: #e8f5e9; color: var(--color-success); border: 1px solid #c8e6c9; }
.alert-info { background: #e3f2fd; color: #1976d2; border: 1px solid #bbdefb; }

/* Badge */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-success { background: #e8f5e9; color: var(--color-success); }
.badge-warning { background: #fff8e1; color: #f57f17; }
.badge-error { background: #fde8e8; color: var(--color-error); }
.badge-info { background: #e3f2fd; color: #1976d2; }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-text);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .hero-title { font-size: 1.75rem; }
  .hero-content { padding: 3rem 1rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .nav-links { gap: 0.75rem; }
  .nav-links a { font-size: 0.75rem; }
  .cart-item { flex-wrap: wrap; }
}

/* Page layout */
.page-header {
  background: white;
  border-bottom: 1px solid var(--color-border);
  padding: 2rem 1rem;
  text-align: center;
}
.page-title {
  font-family: 'Hiragino Mincho ProN', 'Yu Mincho', 'MS PMincho', serif;
  font-size: 1.75rem;
  font-weight: 600;
}
.page-content { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }

/* Admin layout */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
  width: 240px;
  background: var(--color-text);
  color: white;
  padding: 1.5rem 0;
  flex-shrink: 0;
}
.admin-sidebar a {
  display: block;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.1); color: white; }
.admin-main { flex: 1; padding: 2rem; background: #f9f9f9; overflow-x: auto; }

/* Table */
.table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; }
.table th { background: #f5f5f5; text-align: left; padding: 0.75rem 1rem; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; }
.table td { padding: 0.75rem 1rem; border-top: 1px solid var(--color-border); font-size: 0.875rem; }
.table tr:hover { background: #fafafa; }

/* Payment method icons */
.payment-method {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.payment-method:hover, .payment-method.selected { border-color: var(--color-text); background: #fafafa; }

/* Step indicator */
.steps { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; }
.step { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--color-text-light); }
.step.active { color: var(--color-text); font-weight: 600; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 600; border: 2px solid var(--color-border); }
.step.active .step-num { background: var(--color-text); color: white; border-color: var(--color-text); }

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 4px;
  color: white;
  font-size: 0.9rem;
  z-index: 3000;
  animation: slideUp 0.3s ease;
  max-width: 400px;
}
.toast-success { background: var(--color-success); }
.toast-error { background: var(--color-error); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
