/* ========================================
   DIDI DADA 超級商城 - 全站共用樣式
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 色彩定義 */
:root {
  --color-pink: #FF6B9D;      /* A類 - 美妝保養｜穿搭｜減肥 */
  --color-teal: #4ECDC4;      /* B類 - 3C小物｜居家｜露營 */
  --color-purple: #9B59B6;    /* C類 - 線上課程｜軟體｜旅遊 */
  --color-light-pink: #FFB3D9;
  --color-light-teal: #A8E6E1;
  --color-light-purple: #D7BDE2;
  --color-white: #FFFFFF;
  --color-light-gray: #F8F9FA;
  --color-dark-gray: #333333;
  --color-text: #555555;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
  --border-radius: 12px;
}

/* 基礎樣式 - 100% 高度與平滑滾動 */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

@media (min-width: 1920px) {
  html {
    font-size: 18px;
  }
}

@media (max-width: 1366px) {
  html {
    font-size: 15px;
  }
}

@media (max-width: 1024px) {
  html {
    font-size: 14px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--color-white);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100%;
}

body {
  background-color: var(--color-light-gray);
}

/* 容器 - 以 1920x1080 為基準 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* 流式布局容器 */
.fluid-container {
  width: 100%;
  max-width: 100%;
  padding: 0 2rem;
}

/* 標題樣式 - 使用相對單位 */
h1, h2, h3 {
  color: var(--color-dark-gray);
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2rem);
  margin-bottom: 2rem;
  text-align: center;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  margin-bottom: 0.75rem;
}

/* 連結樣式 */
a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-purple);
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
  width: 100%;
  height: 500px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 3rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
  max-width: 800px;
  padding: 2rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
}

/* 首頁 Hero */
.hero-home {
  background-image: url('../images/hero_home.jpg');
}

/* 分類專頁 Hero */
.hero-cat-a {
  background-image: url('../images/hero_cat_a.jpg');
  height: 400px;
}

.hero-cat-b {
  background-image: url('../images/hero_cat_b.jpg');
  height: 400px;
}

.hero-cat-c {
  background-image: url('../images/hero_cat_c.jpg');
  height: 400px;
}

/* ========================================
   頁頭與導航
   ======================================== */

header {
  background-color: var(--color-white);
  padding: 1.5rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark-gray);
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text-main {
  font-size: 1.2rem;
  font-weight: 700;
}

.logo-text-sub {
  font-size: 0.75rem;
  color: var(--color-text);
}

nav a {
  margin-left: 2rem;
  font-weight: 500;
  color: var(--color-dark-gray);
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--color-teal);
}

/* ========================================
   分類卡片區塊
   ======================================== */

.categories-section {
  padding: 3rem 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.category-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.category-card-banner {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.category-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.category-card-subtitle {
  font-size: 0.95rem;
  color: var(--color-text);
}

/* 分類色彩 */
.category-card.cat-a {
  border-top: 4px solid var(--color-pink);
}

.category-card.cat-a .category-card-title {
  color: var(--color-pink);
}

.category-card.cat-b {
  border-top: 4px solid var(--color-teal);
}

.category-card.cat-b .category-card-title {
  color: var(--color-teal);
}

.category-card.cat-c {
  border-top: 4px solid var(--color-purple);
}

.category-card.cat-c .category-card-title {
  color: var(--color-purple);
}

/* ========================================
   內容區塊（最新項目、最新穿著）
   ======================================== */

.content-section {
  padding: 3rem 0;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--color-dark-gray);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.item-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.item-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.item-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background-color: var(--color-light-gray);
}

.item-card-content {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.item-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-dark-gray);
}

.item-card-description {
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  flex-grow: 1;
}

.item-card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-pink);
  margin-bottom: 1rem;
}

.item-card-category {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--color-light-gray);
  border-radius: 20px;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.item-card-link {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background-color: var(--color-teal);
  color: var(--color-white);
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.item-card-link:hover {
  background-color: var(--color-purple);
  color: var(--color-white);
}

/* ========================================
   分類專頁 - 頁面頂部
   ======================================== */

.category-page-title {
  text-align: center;
  margin: 2rem 0 3rem 0;
  padding: 0 2rem;
}

.category-page-title h1 {
  color: var(--color-white);
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 0.5rem;
}

.category-page-title p {
  color: var(--color-white);
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/* ========================================
   頁尾
   ======================================== */

footer {
  background-color: var(--color-dark-gray);
  color: var(--color-white);
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

footer a {
  color: var(--color-light-teal);
}

footer a:hover {
  color: var(--color-light-pink);
}

.footer-nav {
  margin-bottom: 1rem;
}

.footer-nav a {
  margin: 0 1rem;
}

.footer-copyright {
  font-size: 0.9rem;
  color: #999;
}

/* ========================================
   響應式設計 - 完整斷點系統
   基準：1920x1080 (Full HD)
   ======================================== */

/* 4K 超高清 (2560px+) */
@media (min-width: 2560px) {
  .container {
    max-width: 1800px;
  }

  .hero-section {
    height: 600px;
  }

  .hero-title {
    font-size: 4rem;
  }

  .hero-subtitle {
    font-size: 2rem;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

/* 大型桌面 (1920px - 2559px) - 預設基準 */
@media (min-width: 1920px) and (max-width: 2559px) {
  .container {
    max-width: 1400px;
  }

  .hero-section {
    height: 500px;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* 中型桌面 (1366px - 1919px) */
@media (min-width: 1366px) and (max-width: 1919px) {
  .container {
    max-width: 1200px;
  }

  .hero-section {
    height: 450px;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .hero-subtitle {
    font-size: 1.4rem;
  }
}

/* 小型桌面/大型平板 (1024px - 1365px) */
@media (min-width: 1024px) and (max-width: 1365px) {
  .container {
    max-width: 960px;
  }

  .hero-section {
    height: 400px;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 平板 (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .category-card-banner {
    height: 150px;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }

  nav a {
    margin-left: 1rem;
    font-size: 0.9rem;
  }

  .hero-section {
    height: 350px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-cat-a,
  .hero-cat-b,
  .hero-cat-c {
    height: 300px;
  }
}

/* 小型平板/大型手機 (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
  .container {
    max-width: 100%;
    padding: 0 1.5rem;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .hero-section {
    height: 300px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  nav a {
    font-size: 0.85rem;
    margin-left: 0.75rem;
  }
}

/* 手機 (480px 以下) */
@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav a {
    margin: 0;
    font-size: 0.85rem;
  }

  .category-card-banner {
    height: 120px;
  }

  .category-card-content {
    padding: 1rem;
  }

  .items-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .item-card-image {
    height: 150px;
  }

  .content-section {
    padding: 1.5rem 0;
  }

  .hero-section {
    height: 250px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-content {
    padding: 1rem;
  }

  .hero-cat-a,
  .hero-cat-b,
  .hero-cat-c {
    height: 200px;
  }

  .category-page-title {
    margin: 1rem 0 2rem 0;
  }

  footer {
    padding: 1.5rem;
  }

  .footer-nav a {
    display: block;
    margin: 0.5rem 0;
  }
}

/* ========================================
   其他工具類樣式
   ======================================== */

.text-center {
  text-align: center;
}

.mt-3 {
  margin-top: 3rem;
}

.mb-3 {
  margin-bottom: 3rem;
}

.py-3 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
