/* ═══════════════════════════════════════════════════
   Yijing Shop Module Styles
   Bootstrap 5 + Jinja2 — mobile-first
   ═══════════════════════════════════════════════════ */

:root {
  --shop-primary: #8B4513;
  --shop-accent: #D4A574;
  --shop-bg: #FFF8F0;
}

/* ── Typography ───────────────────────────────── */
.shop-heading {
  color: var(--shop-primary);
  font-weight: 700;
}

.shop-sidebar-header {
  background: linear-gradient(135deg, var(--shop-primary), var(--shop-accent));
  color: #fff;
}

.shop-bazi-tag {
  background: var(--shop-primary);
}
.shop-card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--shop-bg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.15);
}

.shop-card-img {
  width: 100%;
  display: block;
}

/* ── Waterfall Masonry ─────────────────────────── */
.shop-waterfall {
  column-count: 2;
  column-gap: 1rem;
}
.shop-waterfall > .col {
  break-inside: avoid;
  margin-bottom: 1rem;
  display: block;
  width: 100% !important;
  flex: none !important;
  padding: 0 !important;
}

@media (min-width: 576px) {
  .shop-waterfall { column-count: 2; column-gap: 1.25rem; }
}
@media (min-width: 992px) {
  .shop-waterfall { column-count: 3; column-gap: 1.5rem; }
}
@media (min-width: 1400px) {
  .shop-waterfall { column-count: 4; column-gap: 1.5rem; }
}

.shop-card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--shop-accent);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.shop-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Price ──────────────────────────────────────── */
.shop-price {
  font-weight: 700;
  color: var(--shop-accent);
  font-size: 1.1rem;
}

.shop-price-original {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 0.875rem;
}

/* ── Button ─────────────────────────────────────── */
.shop-btn {
  background: var(--shop-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.shop-btn:hover {
  background: #c08d5a;
  color: #fff;
}

/* ── Cart Sticky Bar ────────────────────────────── */
.shop-cart-sticky {
  position: sticky;
  bottom: 0;
  z-index: 1030;
  background: #fff;
  border-top: 1px solid #e9ecef;
  padding: 0.75rem 1rem;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}

/* ── Empty State ────────────────────────────────── */
.shop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.shop-empty::before {
  content: "🛒";
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

/* ── Breadcrumb ─────────────────────────────────── */
.shop-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: #6c757d;
}

.shop-breadcrumb a {
  color: var(--shop-primary);
  text-decoration: none;
}

.shop-breadcrumb a:hover {
  text-decoration: underline;
}

.shop-breadcrumb .separator {
  margin: 0 0.35rem;
  color: #adb5bd;
}

/* ── Category Sidebar ───────────────────────────── */
.shop-category-sidebar {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shop-category-sidebar li {
  margin-bottom: 0.25rem;
}

.shop-category-sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--shop-primary);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.shop-category-sidebar a:hover {
  background: var(--shop-bg);
  color: var(--shop-primary);
}

.shop-category-sidebar a.active,
.shop-category-sidebar .active a {
  background: var(--shop-accent);
  color: #fff;
  font-weight: 600;
}

/* Bootstrap overrides for shop active states */
.shop-sidebar .list-group-item.active {
  background-color: var(--shop-accent);
  border-color: var(--shop-accent);
}

/* ── Pagination ──────────────────────────────── */
.shop-pagination .page-item.active .page-link {
  background-color: var(--shop-accent);
  border-color: var(--shop-accent);
  color: #fff;
}

.shop-pagination .page-link {
  color: var(--shop-primary);
}

.shop-pagination .page-link:hover {
  color: var(--shop-accent);
}

/* ── Responsive (768px+) ────────────────────────── */
@media (min-width: 768px) {
  .shop-card-body {
    padding: 1.25rem;
  }

  .shop-price {
    font-size: 1.2rem;
  }

  .shop-cart-sticky {
    padding: 1rem 1.5rem;
  }

  .shop-empty {
    padding: 4rem 2rem;
  }

  .shop-empty::before {
    font-size: 4rem;
  }

  .shop-breadcrumb {
    padding: 1rem 0;
    font-size: 0.95rem;
  }

  .shop-category-sidebar a {
    padding: 0.6rem 1rem;
  }
}
