/* ============================================
 * EC Shop — 共用前台樣式 (combined)
 * 包含：首頁 + 分類頁 所有樣式
 * 生成日期：2026-04-11
 * ============================================ */

/* ══════════════════════════════════════════════
   PART A — 首頁樣式（原 home.php $pageCSS）
   ══════════════════════════════════════════════ */

/* ── Banner ── */
.banner-section { overflow: hidden; position: relative; background: #0f172a; }
.banner-slider { position: relative; }
.banner-slide { display: none; position: relative; animation: fadeIn .6s ease; }
.banner-slide.active { display: block; }
.banner-slide img { width: 100%; height: 480px; object-fit: cover; }
.banner-slide .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(15,23,42,.65) 0%, rgba(15,23,42,.25) 50%, transparent 100%);
    display: flex; align-items: center; padding-left: 8%;
}
.banner-text { max-width: 520px; }
.banner-text .tag {
    display: inline-block; background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
    padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 600;
    color: #fff; margin-bottom: 16px; letter-spacing: .5px;
}
.banner-text h2 { color: #fff; font-size: 40px; font-weight: 800; margin-bottom: 12px; line-height: 1.2; letter-spacing: -.5px; }
.banner-text p { color: rgba(255,255,255,.85); font-size: 16px; margin-bottom: 24px; line-height: 1.6; }
.banner-text .btn-banner {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; background: var(--primary); color: #fff;
    border-radius: 50px; font-weight: 700; font-size: 15px;
    transition: all var(--transition); box-shadow: 0 4px 16px rgba(13,148,136,.3);
}
.banner-text .btn-banner:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(13,148,136,.4); }
.banner-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.banner-dots .dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: all .3s; border: 2px solid transparent; }
.banner-dots .dot.active { background: #fff; transform: scale(1.15); border-color: var(--primary); }
.banner-arrows button {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.9); border: none; width: 48px; height: 48px; border-radius: 50%;
    font-size: 18px; cursor: pointer; z-index: 2; transition: all var(--transition); color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,.1); opacity: 0;
}
.banner-section:hover .banner-arrows button { opacity: 1; }
.banner-arrows button:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.banner-arrows .prev { left: 20px; }
.banner-arrows .next { right: 20px; }
.banner-progress { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--primary); z-index: 3; transition: width .1s linear; }

/* ── Section（通用區塊） ── */
.section { padding: 56px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.section-header h2 { font-size: 24px; font-weight: 800; letter-spacing: -.3px; position: relative; padding-left: 16px; }
.section-header h2::before { content:""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 2px; background: var(--primary); }
.section-header .view-all {
    font-size: 14px; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 4px;
    padding: 8px 16px; border-radius: 8px; transition: all var(--transition);
}
.section-header .view-all:hover { background: var(--primary-light); }

/* ── Categories（首頁分類格） ── */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card {
    background: var(--white); border-radius: 16px; overflow: hidden; text-align: center;
    border: 1px solid var(--border); transition: all .35s cubic-bezier(.4,0,.2,1);
    display: block; color: var(--text); position: relative;
}
.cat-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.08); transform: translateY(-6px); border-color: var(--primary-light); }
.cat-card .img-container { overflow: hidden; }
.cat-card img { width: 100%; height: 160px; object-fit: cover; transition: transform .5s ease; }
.cat-card:hover img { transform: scale(1.08); }
.cat-card .name { padding: 14px; font-weight: 600; font-size: 15px; transition: color var(--transition); }
.cat-card:hover .name { color: var(--primary); }
.cat-placeholder { height: 160px; background: linear-gradient(135deg, var(--primary-light), #e0f2fe); display: flex; align-items: center; justify-content: center; font-size: 42px; }

/* ── Product Grid + Card（首頁版本） ── */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card {
    background: var(--white); border-radius: 16px; overflow: hidden;
    border: 1px solid var(--border); transition: all .35s cubic-bezier(.4,0,.2,1);
    position: relative; display: flex; flex-direction: column; color: var(--text);
}
.product-card:hover { box-shadow: 0 12px 36px rgba(0,0,0,.1); transform: translateY(-6px); border-color: transparent; }
.product-card .img-wrap { position: relative; padding-top: 100%; overflow: hidden; background: #f1f5f9; }
.product-card .img-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .img-wrap img { transform: scale(1.08); }
.product-card .badge-sale {
    position: absolute; background: var(--danger); color: #fff;
    font-size: 12px; padding: 4px 10px; border-radius: 6px; font-weight: 700; z-index: 2;
    box-shadow: 0 2px 8px rgba(239,68,68,.3);
}
.product-card .badge-custom {
    position: absolute; padding: 4px 10px; border-radius: 6px;
    font-size: 12px; font-weight: 700; z-index: 2;
}
.badge-pos-top-left { top: 12px; left: 12px; }
.badge-pos-top-right { top: 12px; right: 12px; }
.badge-pos-bottom-left { bottom: 12px; left: 12px; }
.badge-pos-bottom-right { bottom: 12px; right: 12px; }
.product-card .info { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-card .pname {
    font-size: 14px; font-weight: 600; margin-bottom: 8px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: color var(--transition);
}
.product-card:hover .pname { color: var(--primary); }
.product-card .price { font-size: 18px; font-weight: 800; color: var(--primary); margin-bottom: auto; }
.product-card .price .original { font-size: 13px; color: var(--text-light); text-decoration: line-through; margin-left: 8px; font-weight: 400; }
.product-card .price .member { display: block; font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 4px; }
.product-card .add-cart-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 12px; padding: 10px; border-radius: 10px;
    background: var(--primary-light); color: var(--primary);
    font-size: 13px; font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
}
.product-card:hover .add-cart-btn { background: var(--primary); color: #fff; }
.product-card .add-cart-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.product-card .out-of-stock {
    position: absolute; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 16px; z-index: 1; letter-spacing: 1px;
}

/* ── Flash Sale ── */
.flash-bar { background: linear-gradient(90deg, #dc2626, #ef4444, #f87171); padding: 3px; border-radius: 16px; }
.flash-inner { background: var(--white); border-radius: 14px; }
.flash-header-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.flash-title { display: flex; align-items: center; gap: 12px; }
.flash-title h2 { color: #dc2626; font-size: 20px; margin: 0; padding: 0; }
.flash-title h2::before { display: none; }
.countdown { display: flex; gap: 4px; align-items: center; }
.countdown .cd-block { background: #1e293b; color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 16px; font-weight: 800; font-family: 'Inter', monospace; min-width: 40px; text-align: center; }
.countdown .cd-sep { color: #dc2626; font-weight: 800; font-size: 16px; }

/* ── Trust Bar ── */
.trust-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust-item {
    text-align: center; padding: 28px 16px;
    background: var(--white); border-radius: 16px; border: 1px solid var(--border);
    transition: all var(--transition);
}
.trust-item:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.trust-item .trust-icon {
    width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.trust-item:nth-child(1) .trust-icon { background: #dbeafe; color: #2563eb; }
.trust-item:nth-child(2) .trust-icon { background: #d1fae5; color: #059669; }
.trust-item:nth-child(3) .trust-icon { background: #fef3c7; color: #d97706; }
.trust-item:nth-child(4) .trust-icon { background: #ede9fe; color: #7c3aed; }
.trust-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.trust-item p { font-size: 12px; color: var(--text-light); }

/* ── Homepage Announce ── */
.homepage-announce-section { padding: 24px 0 0; }
.homepage-announce-content {
    background: var(--white); border-radius: 16px;
    border: 1px solid var(--border); padding: 24px;
    overflow: hidden;
}

/* ── Brand Logos ── */
.brand-logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.brand-logo-card {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 20px 12px; background: var(--white); border-radius: 12px;
    border: 1px solid var(--border); transition: all .3s ease; color: var(--text);
}
.brand-logo-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); transform: translateY(-3px); border-color: var(--primary-light); }
.brand-logo-card img { width: 64px; height: 64px; object-fit: contain; }
.brand-logo-card .brand-name { font-size: 12px; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ── Empty ── */
.empty-hint {
    text-align: center; padding: 80px 20px; color: var(--text-light);
    background: var(--white); border-radius: 20px;
    border: 2px dashed var(--border); margin: 40px 0;
}

/* ── 首頁 Responsive ── */
@media (max-width: 768px) {
    .banner-slide img { height: 260px; }
    .banner-text h2 { font-size: 24px; }
    .banner-text p { font-size: 14px; }
    .banner-text .tag { font-size: 11px; }
    .banner-arrows button { opacity: 1; width: 36px; height: 36px; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .section { padding: 36px 0; }
    .trust-bar { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .flash-header-bar { flex-direction: column; gap: 12px; }
}


/* ══════════════════════════════════════════════
   PART B — 分類頁樣式（原 category.php $pageCSS）
   ══════════════════════════════════════════════ */

/* ── Breadcrumb ── */
.breadcrumb { padding: 16px 0; font-size: 13px; color: var(--text-light); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb svg { width: 12px; height: 12px; stroke: var(--text-light); }

/* ── Category Hero ── */
.cat-hero { position: relative; border-radius: 20px; overflow: hidden; margin-bottom: 32px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); min-height: 180px; display: flex; align-items: center; }
.cat-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .25; }
.cat-hero-content { position: relative; z-index: 1; padding: 40px 48px; color: #fff; max-width: 640px; }
.cat-hero-content h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -.3px; }
.cat-hero-content p { font-size: 15px; line-height: 1.7; opacity: .9; }
.cat-hero-content .cat-count { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 14px; background: rgba(255,255,255,.15); border-radius: 20px; font-size: 13px; font-weight: 600; backdrop-filter: blur(4px); }

/* ── Subcategory Chips ── */
.subcats { display: flex; gap: 12px; overflow-x: auto; padding: 0 0 24px; scrollbar-width: none; -ms-overflow-style: none; }
.subcats::-webkit-scrollbar { display: none; }
.subcat-chip { display: flex; align-items: center; gap: 8px; padding: 8px 20px; border: 2px solid var(--border); border-radius: 12px; background: var(--white); font-size: 13px; font-weight: 600; white-space: nowrap; transition: all var(--transition); text-decoration: none; color: var(--text); flex-shrink: 0; }
.subcat-chip:hover, .subcat-chip.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.subcat-chip img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.subcat-chip .cnt { font-size: 11px; color: var(--text-light); font-weight: 400; }

/* ── Category Layout（Sidebar + Main） ── */
.cat-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding-bottom: 48px; align-items: start; }
.cat-sidebar { position: sticky; top: 90px; }
.sidebar-section { background: var(--white); border-radius: 16px; border: 1px solid var(--border); padding: 20px; margin-bottom: 16px; }
.sidebar-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.sidebar-section h3 a { font-size: 12px; color: var(--text-light); font-weight: 400; }
.sidebar-section h3 a:hover { color: var(--primary); }

/* ── Sidebar Category List ── */
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-size: 13px; color: var(--text-mid); border-radius: 8px; transition: all var(--transition); text-decoration: none; }
.cat-list li a:hover, .cat-list li a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.cat-list li a .cnt { font-size: 11px; color: var(--text-light); background: var(--bg); padding: 2px 8px; border-radius: 10px; }
.cat-sublist { margin: 0; padding: 0; list-style: none; }
.cat-sublist li a { padding-left: 28px; font-size: 12px; }
.cat-sublist .cat-sublist li a { padding-left: 44px; }
.cat-sublist .cat-sublist .cat-sublist li a { padding-left: 60px; }
.cat-sublist .cat-sublist .cat-sublist .cat-sublist li a { padding-left: 76px; }

/* ── Sidebar Filters ── */
.filter-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; cursor: pointer; color: var(--text-mid); transition: color var(--transition); text-decoration: none; }
.filter-item:hover { color: var(--primary); }
.filter-item .cnt { margin-left: auto; font-size: 11px; color: var(--text-light); background: var(--bg); padding: 1px 8px; border-radius: 10px; }
.filter-item.active { color: var(--primary); font-weight: 600; }
.fake-checkbox { width: 16px; height: 16px; border: 2px solid var(--border); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; transition: all var(--transition); flex-shrink: 0; }
.fake-checkbox.checked { background: var(--primary); border-color: var(--primary); }
.fake-checkbox.checked::after { content: '✓'; color: #fff; font-size: 11px; font-weight: 700; }

/* ── Price Filter ── */
.price-inputs { display: flex; gap: 8px; align-items: center; }
.price-inputs input { width: 100%; padding: 8px 12px; border: 2px solid var(--border); border-radius: 10px; font-size: 13px; font-family: inherit; outline: none; transition: border-color var(--transition); }
.price-inputs input:focus { border-color: var(--primary); }
.price-inputs span { color: var(--text-light); font-size: 13px; flex-shrink: 0; }
.btn-filter { width: 100%; padding: 10px; margin-top: 10px; background: var(--primary); color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--transition); font-family: inherit; }
.btn-filter:hover { background: var(--primary-dark); }

/* ── Filter Tags ── */
.filter-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.filter-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; background: var(--primary-light); color: var(--primary); border-radius: 8px; font-size: 12px; font-weight: 600; }
.filter-tag a { color: var(--primary); font-size: 14px; line-height: 1; margin-left: 2px; }

/* ── Category Toolbar ── */
.cat-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.cat-toolbar .result-count { font-size: 14px; color: var(--text-mid); }
.cat-toolbar .result-count strong { color: var(--text); font-weight: 700; }
.cat-toolbar-right { display: flex; align-items: center; gap: 10px; }
.sort-select { padding: 8px 32px 8px 14px; border: 2px solid var(--border); border-radius: 10px; font-size: 13px; font-family: inherit; background: var(--white); cursor: pointer; outline: none; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.sort-select:focus { border-color: var(--primary); }
.view-toggle { display: flex; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; }
.view-toggle button { padding: 8px 12px; border: none; background: var(--white); cursor: pointer; color: var(--text-light); transition: all var(--transition); display: flex; align-items: center; }
.view-toggle button.active { background: var(--primary-light); color: var(--primary); }
.view-toggle button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Products Grid（分類頁版本，用 auto-fill） ── */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.products-grid.list-view { grid-template-columns: 1fr; }
.products-grid.list-view .product-card { display: grid; grid-template-columns: 180px 1fr; gap: 20px; }

/* ── Product Card（分類頁 pc-* 版本） ── */
.pc-image { display: block; aspect-ratio: 1; overflow: hidden; background: #f8fafc; position: relative; }
.pc-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .pc-image img { transform: scale(1.06); }
.pc-badge { position: absolute; background: var(--danger); color: #fff; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; z-index: 2; }
.pc-badge-custom { position: absolute; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; z-index: 2; }
.pc-sold-out { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.pc-info { padding: 14px 16px 18px; }
.pc-brand { font-size: 11px; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }
.pc-name { display: -webkit-box; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 8px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-decoration: none; }
.pc-name:hover { color: var(--primary); }
.pc-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pc-price-now { font-size: 17px; font-weight: 800; color: var(--primary); }
.pc-price-was { font-size: 13px; color: var(--text-light); text-decoration: line-through; }
.pc-member-price { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 4px; }

/* ── Add to Cart Button（分類頁版本） ── */
.add-cart-btn { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 8px 12px; border-radius: 10px; border: none; background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--transition); font-family: inherit; }
.product-card:hover .add-cart-btn { background: var(--primary); color: #fff; }
.add-cart-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 32px 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; transition: all var(--transition); }
.pagination a { color: var(--text-mid); border: 1px solid var(--border); background: var(--white); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.pagination .active { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
.pagination .dots { border: none; color: var(--text-light); }
.pagination .prev-next { font-size: 13px; }
.pagination .prev-next svg { width: 16px; height: 16px; stroke: currentColor; }

/* ── Category Empty State ── */
.cat-empty { text-align: center; padding: 80px 20px; color: var(--text-light); }
.cat-empty svg { width: 64px; height: 64px; stroke: var(--border); margin-bottom: 16px; }
.cat-empty h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.cat-empty p { font-size: 14px; margin-bottom: 20px; }
.cat-empty a { color: var(--primary); font-weight: 600; }

/* ── Category Banner ── */
.cat-banner { margin-bottom: 24px; border-radius: 16px; overflow: hidden; }
.cat-banner img { width: 100%; display: block; }

/* ── Mobile Sidebar ── */
.filter-toggle { display: none; padding: 10px 20px; border: 2px solid var(--border); border-radius: 12px; background: var(--white); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; color: var(--text); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999; }

/* ── 分類頁 Responsive ── */
@media (max-width: 1024px) {
    .cat-layout { grid-template-columns: 220px 1fr; gap: 24px; }
}
@media (max-width: 768px) {
    .cat-layout { grid-template-columns: 1fr; }
    .cat-sidebar { position: fixed; top: 0; left: -300px; width: 280px; height: 100vh; background: var(--white); z-index: 1000; padding: 24px; overflow-y: auto; transition: left .3s ease; box-shadow: 4px 0 24px rgba(0,0,0,.1); }
    .cat-sidebar.open { left: 0; }
    .sidebar-overlay.open { display: block; }
    .filter-toggle { display: inline-flex; align-items: center; gap: 6px; }
    .cat-hero-content { padding: 24px; }
    .cat-hero-content h1 { font-size: 24px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .pc-info { padding: 10px 12px 14px; }
    .pc-name { font-size: 13px; }
    .pc-price-now { font-size: 15px; }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}


/* ══════════════════════════════════════════════
   PART C — 共用動畫
   ══════════════════════════════════════════════ */

@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* 首頁版本（animate-on-scroll） */
.animate-on-scroll { opacity: 1; }

/* 分類頁版本（fade-in） */
.fade-in { animation: fadeIn .5s ease both; }

/* Stagger delays（兩版共用） */
.stagger-1 { animation-delay: .05s; }
.stagger-2 { animation-delay: .1s; }
.stagger-3 { animation-delay: .15s; }
.stagger-4 { animation-delay: .2s; }
.stagger-5 { animation-delay: .25s; }
.stagger-6 { animation-delay: .3s; }
.stagger-7 { animation-delay: .35s; }
.stagger-8 { animation-delay: .4s; }
