
/*
  首頁專用樣式 - Modern E-commerce Design
*/
/* ========== Google Fonts Import ========== */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap");
/* ========== 全域樣式變數 ========== */
:root {
  --font-heading: "Poppins", "Noto Sans TC", sans-serif;
  --font-body: "Open Sans", "Noto Sans TC", sans-serif;
  --color-primary: #3B82F6;
  --color-secondary: #60A5FA;
  --color-success: #10B981;
  --color-danger: #EF4444;
  --color-warning: #F59E0B;
  --color-info: #06B6D4;
  --color-text: #1E293B;
  --color-text-muted: #64748B;
  --color-bg: #F8FAFC;
  --color-border: #E2E8F0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

/* ========== Banner 輪播區 ========== */
.banner-section {
  margin-bottom: 0;
}
.banner-section .carousel {
  background-color: var(--color-bg);
}
.banner-section .carousel-fade .carousel-item {
  transition: opacity 0.6s ease-in-out;
}
.banner-section .banner-link {
  cursor: pointer;
  transition: opacity var(--transition-base);
}
.banner-section .banner-link:hover {
  opacity: 0.95;
}
.banner-section .banner-image {
  height: 450px;
  object-fit: cover;
  width: 100%;
}
@media (max-width: 768px) {
  .banner-section .banner-image {
    height: 280px;
  }
}
@media (max-width: 576px) {
  .banner-section .banner-image {
    height: 200px;
  }
}
.banner-section .banner-title {
  font-family: var(--font-heading);
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.banner-section .carousel-caption {
  background: rgba(0, 0, 0, 0.5);
  padding: 20px 30px;
  bottom: 20px;
  left: 5%;
  right: 5%;
}
.banner-section .carousel-caption h5 {
  margin-bottom: 0;
  font-size: 1.5rem;
}
@media (max-width: 768px) {
  .banner-section .carousel-caption h5 {
    font-size: 1.2rem;
  }
}
.banner-section .carousel-indicators li {
  width: 10px;
  height: 10px;
  margin: 0 6px;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  transition: all var(--transition-base);
}
.banner-section .carousel-indicators li.active {
  width: 28px;
  background-color: #fff;
}
.banner-section .carousel-control-prev,
.banner-section .carousel-control-next {
  width: 5%;
  opacity: 0.6;
  transition: opacity var(--transition-base);
}
.banner-section .carousel-control-prev:hover,
.banner-section .carousel-control-next:hover {
  opacity: 1;
}

/* ========== 區塊標題 ========== */
.section-header .section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
@media (max-width: 768px) {
  .section-header .section-title {
    font-size: 1.5rem;
  }
}
.section-header .section-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}
.section-header .section-icon {
  display: inline-block;
  vertical-align: middle;
}

/* ========== 首頁區塊交替背景色 ========== */
.home-sections .home-section:nth-child(odd) {
  background-color: #fff;
}
.home-sections .home-section:nth-child(even) {
  background-color: var(--color-bg);
}

/* ========== 商品分類區 ========== */
.category-section {
  background-color: inherit;
}
.category-section .category-card {
  cursor: pointer;
  transition: all var(--transition-slow);
  background: #fff;
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.category-section .category-card:hover {
  background: var(--color-bg);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}
.category-section .category-card:hover .category-icon-wrapper {
  transform: scale(1.1);
  color: var(--color-primary);
}
.category-section .category-card .category-icon-wrapper {
  transition: all var(--transition-slow);
  color: var(--color-text);
}
.category-section .category-card .category-icon {
  display: block;
}
.category-section .category-card .category-name {
  font-family: var(--font-body);
  color: var(--color-text);
  font-weight: 600;
  font-size: 1rem;
  transition: color var(--transition-base);
}
.category-section .category-card:hover .category-name {
  color: var(--color-primary);
}

/* ========== 最新商品區 ========== */
.new-products-section {
  background-color: inherit;
}

/* ========== 最新消息區 ========== */
.news-section .news-card {
  cursor: pointer;
  border: none;
  overflow: hidden;
  transition: all var(--transition-slow);
  box-shadow: var(--shadow-sm);
  background: #fff;
}
.news-section .news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}
.news-section .news-card .news-image {
  height: 180px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.news-section .news-card .news-image-placeholder {
  height: 180px;
  background: #f8f9fa;
}
.news-section .news-card:hover .news-image {
  transform: scale(1.05);
}
.news-section .news-card .news-title {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-base);
}
.news-section .news-card:hover .news-title {
  color: var(--color-primary);
}

/* ========== 店家資訊區 ========== */
.store-info-section {
  background-color: #fff;
  border-top: 1px solid var(--color-border);
}
.store-info-section .info-item {
  padding: 2rem 1rem;
  transition: all var(--transition-slow);
}
.store-info-section .info-item:hover {
  background: var(--color-bg);
  transform: translateY(-5px);
}
.store-info-section .info-item:hover .info-icon {
  transform: scale(1.1);
}
.store-info-section .info-item .info-icon-wrapper {
  display: inline-block;
}
.store-info-section .info-item .info-icon {
  transition: transform var(--transition-slow);
}
.store-info-section .info-item h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.store-info-section .info-item p {
  font-family: var(--font-body);
  color: var(--color-text-muted);
}

/* ========== 按鈕樣式 ========== */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn svg {
  transition: transform var(--transition-base);
}
.btn:hover svg {
  transform: translateX(3px);
}

.btn-theme-primary:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ========== 區塊 icon 主題色 ========== */
.dashboard-section-icon {
  color: var(--theme-primary-color);
}

/* ========== 響應式調整 ========== */
@media (max-width: 768px) {
  .section-header .section-title {
    font-size: 1.5rem;
  }
  .section-header .section-subtitle {
    font-size: 0.9rem;
  }

  .category-card .category-name {
    font-size: 0.9rem;
  }

  .store-info-section .info-item {
    padding: 1.5rem 0.75rem;
  }
  .store-info-section .info-item h5 {
    font-size: 1rem;
  }
  .store-info-section .info-item p {
    font-size: 0.875rem;
  }

  .btn-lg {
    font-size: 1rem;
    padding: 0.5rem 2rem;
  }
}
/* ========== 通用樣式 ========== */
.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

/* ========== 首頁彈出視窗 ========== */
.popup-modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
}

.popup-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  z-index: 10;
  color: #fff;
  font-size: 32px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  opacity: 1;
  padding: 0 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-base);
}
.popup-modal-close:hover {
  color: #fff;
  opacity: 0.8;
}

.popup-modal-link {
  display: block;
}

.popup-modal-image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ========== 多欄內容區塊（Columns Block）========== */
.home-block-columns .row {
  margin-left: calc(var(--columns-gap, 24px) / -2);
  margin-right: calc(var(--columns-gap, 24px) / -2);
}
.home-block-columns .row > [class*=col] {
  padding-left: calc(var(--columns-gap, 24px) / 2);
  padding-right: calc(var(--columns-gap, 24px) / 2);
}
.home-block-columns .column-item {
  transition: transform 0.3s ease;
}
.home-block-columns .column-item:hover {
  transform: translateY(-4px);
}
.home-block-columns .column-image img {
  object-fit: contain;
  transition: transform 0.3s ease;
}
.home-block-columns .column-image:hover img {
  transform: scale(1.05);
}
.home-block-columns .column-icon i {
  transition: transform 0.3s ease;
}
.home-block-columns .column-icon:hover i {
  transform: scale(1.1);
}

/* ========== 影片嵌入區塊（Video Block）========== */
.video-embed-wrapper {
  max-width: 960px;
  position: relative;
  width: 100%;
}

.video-embed-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 響應式調整 */
@media (max-width: 576px) {
  .popup-modal-close {
    top: -35px;
    font-size: 28px;
  }

  .popup-modal-image {
    max-height: 70vh;
  }

  #homePopupModal .modal-dialog {
    margin: 15px;
  }
}
