/* ============================================================
   shop.css — lineshop2 前台樣式
   ============================================================ */

/* ── 全域 ───────────────────────────────────────────────── */
body {
  background-color: #f8f9fa;
  color: #333;
}

a {
  text-decoration: none;
}

/* ── Hero Banner（廣告輪播）────────────────────────────── */
.hero-img {
  height: 460px;
  object-fit: cover;
  width: 100%;
  display: block;
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.38);
}

.text-shadow {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

@media (max-width: 768px) {
  .hero-img {
    height: 260px;
  }
  .hero-overlay h2 {
    font-size: 1.5rem;
  }
}

/* 靜態漸層 Hero（無廣告時的備用）*/
.shop-hero {
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
  min-height: 320px;
  padding: 3rem 2rem;
}

@media (max-width: 576px) {
  .shop-hero {
    min-height: 220px;
    padding: 2rem 1rem;
  }
  .shop-hero h1 {
    font-size: 1.75rem;
  }
}

/* ── 社群媒體 ICON ────────────────────────────────────── */
.social-icon {
  transition: color 0.15s ease, transform 0.15s ease;
}

.social-icon:hover {
  color: #fff !important;
  transform: translateY(-2px);
}

/* ── 商品卡片 ────────────────────────────────────────────── */
.product-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border-radius: 0.75rem;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.product-img {
  height: 200px;
  object-fit: cover;
  width: 100%;
  background-color: #f0f0f0;
}

@media (max-width: 576px) {
  .product-img {
    height: 160px;
  }
}

/* 加入購物車按鈕動畫 */
.add-to-cart-btn {
  transition: transform 0.1s ease;
}

.add-to-cart-btn:active {
  transform: scale(0.9);
}

/* ── 最新消息卡片 ────────────────────────────────────────── */
.news-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border-radius: 0.75rem;
  overflow: hidden;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.news-img {
  height: 180px;
  object-fit: cover;
  width: 100%;
  background-color: #f0f0f0;
}

.news-img-placeholder {
  height: 180px;
  width: 100%;
}

/* ── Quill 內容顯示 ──────────────────────────────────────── */
.quill-content,
.news-content {
  line-height: 1.8;
  font-size: 1rem;
  word-break: break-word;
}

.quill-content h1,
.news-content h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 1.2rem 0 0.6rem;
}

.quill-content h2,
.news-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
}

.quill-content h3,
.news-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.9rem 0 0.4rem;
}

.quill-content p,
.news-content p {
  margin-bottom: 0.9rem;
}

.quill-content ul,
.quill-content ol,
.news-content ul,
.news-content ol {
  padding-left: 1.5rem;
  margin-bottom: 0.9rem;
}

.quill-content img,
.news-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 0.5rem 0;
}

.quill-content a,
.news-content a {
  color: #0d6efd;
  text-decoration: underline;
}

.quill-content blockquote,
.news-content blockquote {
  border-left: 4px solid #dee2e6;
  padding-left: 1rem;
  color: #6c757d;
  margin: 1rem 0;
}

/* ── 文字截斷工具類 ──────────────────────────────────────── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 購物車徽章 ──────────────────────────────────────────── */
.cart-badge {
  font-size: 0.65rem;
  min-width: 1.1rem;
  height: 1.1rem;
  line-height: 1.1rem;
  padding: 0 0.25rem;
  top: 2px !important;
  right: -4px !important;
}

/* ── 商品詳情頁 ──────────────────────────────────────────── */
.product-gallery-main {
  height: 380px;
  object-fit: contain;
  background-color: #f8f9fa;
}

@media (max-width: 576px) {
  .product-gallery-main {
    height: 240px;
  }
}

/* 圖片縮圖列 */
.gallery-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.4rem;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.gallery-thumb:hover {
  opacity: 1;
}

.gallery-thumb.active {
  border-color: #0d6efd;
  opacity: 1;
}

/* Carousel 背景色 */
.carousel {
  background-color: #f8f9fa;
}

/* 數量選擇器 */
.qty-input {
  width: 70px;
  text-align: center;
}

/* ── 購物車表格 ──────────────────────────────────────────── */
.cart-product-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.5rem;
  background-color: #f0f0f0;
}

/* ── 會員頁面 ────────────────────────────────────────────── */
.member-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #0d6efd, #6610f2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
}

/* ── 分類標籤按鈕 ────────────────────────────────────────── */
.category-filter .btn {
  border-radius: 2rem;
  padding: 0.3rem 1rem;
  font-size: 0.875rem;
}

/* ── 訂單狀態徽章 ────────────────────────────────────────── */
.order-status-pending     { background-color: #ffc107; color: #000; }
.order-status-processing  { background-color: #0dcaf0; color: #000; }
.order-status-shipped     { background-color: #0d6efd; color: #fff; }
.order-status-delivered   { background-color: #198754; color: #fff; }
.order-status-cancelled   { background-color: #dc3545; color: #fff; }

/* ── 頁尾 ────────────────────────────────────────────────── */
footer a {
  color: rgba(255, 255, 255, 0.7);
}

footer a:hover {
  color: #fff;
}
