/* =========================================
   好市民 Homepage Styles
   ========================================= */

/* ---------- Reset & Base ---------- */
.hsm-homepage {
    margin: 0;
    padding: 0;
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    color: #333;
    background: #f7f7f7;
    overflow-x: hidden;
}

/* ---------- Announcement Bar ---------- */
.hsm-announcement-bar {
    background: #1a1a1a;
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.5px;
    overflow: hidden;
    height: 36px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1001;
}

.hsm-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.hsm-marquee-inner {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    width: max-content;
    animation: hsm-marquee-scroll 20s linear infinite;
    will-change: transform;
}

.hsm-marquee-item {
    flex-shrink: 0;
    padding: 0 12px;
    font-weight: 500;
}

.hsm-marquee-dot {
    flex-shrink: 0;
    opacity: 0.5;
    font-size: 8px;
}

@keyframes hsm-marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---------- Hero Wrapper (contains floating nav + slider) ---------- */
.hsm-hero-wrapper {
    position: relative;
}

/* ---------- Floating Glass Header ---------- */
.hsm-header {
    position: fixed;
    top: 52px; /* 36px announcement bar + 16px gap */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 80px);
    max-width: 1400px;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.54));
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 20px;
    padding: 14px 36px;
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.10),
                0 1px 0 rgba(255, 255, 255, 0.70) inset,
                0 -1px 0 rgba(255, 255, 255, 0.18) inset;
    border: 1px solid rgba(255, 255, 255, 0.58);
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s ease,
                box-shadow 0.3s ease,
                border-radius 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease,
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hsm-header::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.10));
    pointer-events: none;
}

/* Pinned: snap to viewport top, full width, solid background */
.hsm-header.is-pinned {
    top: 0;
    width: 100%;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-color: rgba(0, 0, 0, 0.06);
    border-radius: 0;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.hsm-header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hsm-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1a1a1a;
    flex-shrink: 0;
}

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

.hsm-logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
}

.hsm-nav {
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 0 auto;
}

.hsm-nav-link {
    text-decoration: none;
    color: rgba(31, 41, 55, 0.86);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    padding: 10px 14px;
    border-radius: 999px;
}

.hsm-nav-link:hover {
    color: #111827;
    background: rgba(255, 255, 255, 0.50);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.42) inset;
}

.hsm-nav-link.active {
    color: #111827;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.56) inset;
}

.hsm-header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.hsm-icon-link {
    color: #1f2937;
    font-size: 18px;
    text-decoration: none;
    transition: color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.34);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.30) inset;
}

.hsm-icon-link:hover {
    color: #111827;
    background: rgba(255, 255, 255, 0.64);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(17, 24, 39, 0.08),
                0 0 0 1px rgba(255, 255, 255, 0.54) inset;
}

.hsm-mobile-toggle a {
    color: #1f2937;
    text-decoration: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.34);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.30) inset;
}

/* ---------- Hero Slider ---------- */
.hsm-hero {
    position: relative;
    padding: 92px 0 42px; /* top space for fixed header */
    background: linear-gradient(180deg, #f6f3ee 0%, #ffffff 100%);
    overflow: hidden;
}

.hsm-hero-stage {
    position: relative;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 22px;
    margin-top: -22px;
}

.hsm-hero-content {
    position: absolute;
    top: 118px;
    left: 24px;
    z-index: 4;
    width: min(31vw, 410px);
    padding: 42px 32px 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hsm-hero-slider {
    width: 100%;
    overflow: visible;
}

.hsm-hero-slider .swiper-wrapper {
    align-items: stretch;
    transition-timing-function: linear !important;
}

.hsm-slide {
    overflow: hidden;
    border-radius: 32px;
    flex-shrink: 0;
}

.hsm-slide-sm,
.hsm-slide-lg,
.hsm-slide-md {
    width: clamp(520px, 49vw, 700px);
}

.hsm-slide-img {
    width: 100%;
    height: clamp(500px, 48vw, 640px);
    background-size: cover;
    background-position: center;
    background-color: #d8d8d8;
    position: relative;
    border-radius: inherit;
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
}

.hsm-slide-sm .hsm-slide-img {
    background-position: left center;
}

.hsm-slide-lg .hsm-slide-img {
    background-position: center center;
}

.hsm-slide-md .hsm-slide-img {
    background-position: center center;
}

.hsm-badge {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: #1a1a1a;
    font-weight: 800;
    font-size: clamp(28px, 2.9vw, 50px);
    padding: 14px 18px 12px;
    margin-bottom: 22px;
    align-self: flex-start;
    line-height: 1.05;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.hsm-hero-title {
    font-size: clamp(32px, 3.8vw, 56px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin: 0 0 16px;
    color: #1a1a1a;
    max-width: 9ch;
}

.hsm-hero-subtitle {
    font-size: 15px;
    margin: 0 0 24px;
    color: #4b5563;
    background: rgba(255, 255, 255, 0.88);
    display: inline-block;
    padding: 8px 12px;
    border-radius: 12px;
    align-self: flex-start;
}

.hsm-btn-shop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff8c82, #f4675d);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    align-self: flex-start;
    box-shadow: 0 16px 30px rgba(244, 103, 93, 0.26);
}

.hsm-btn-shop:hover {
    background: linear-gradient(135deg, #ff7e73, #e95a50);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(233, 90, 80, 0.28);
}

/* ---------- Categories Section ---------- */
.hsm-categories {
    padding: 60px 0 50px;
    background: #fff;
}

.hsm-section-header {
    text-align: left;
    margin-bottom: 30px;
}

.hsm-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.hsm-section-title span {
    font-size: 14px;
    font-weight: 400;
    color: #e74c3c;
    letter-spacing: 2px;
    margin-left: 8px;
}

.hsm-cat-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
}

.hsm-cat-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s, transform 0.25s;
}

.hsm-cat-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    color: inherit;
}

.hsm-cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.hsm-cat-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.hsm-cat-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.6;
    margin: 0 0 auto;
    padding-bottom: 14px;
}

.hsm-cat-arrow {
    font-size: 18px;
    color: #999;
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
}

.hsm-cat-card:hover .hsm-cat-arrow {
    color: #e74c3c;
    transform: translateX(4px);
}

/* ---------- Promotional Banners ---------- */
.hsm-banners {
    padding: 0 0 50px;
    background: #f7f7f7;
}

.hsm-banners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hsm-banner-item {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
}

.hsm-banner-item:hover {
    transform: scale(1.01);
    color: inherit;
}

.hsm-banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.hsm-banner-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 28px;
    color: #fff;
}

.hsm-banner-text-right {
    text-align: right;
}

.hsm-banner-quote {
    font-size: 22px;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.hsm-banner-text h3 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 4px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.hsm-banner-text p {
    font-size: 16px;
    margin: 0 0 10px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hsm-banner-tag {
    display: inline-block;
    background: #4CAF50;
    color: #fff;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

/* ---------- Shared: Section header with row layout ---------- */
.hsm-section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---------- TOP SELLERS (熱銷商品) ---------- */
.hsm-top-sellers {
    padding: 50px 0;
    background: #fff;
}

.hsm-product-slide {
    width: 220px;
}

.hsm-product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.hsm-product-card:hover {
    transform: translateY(-3px);
    color: inherit;
}

.hsm-product-img {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    overflow: hidden;
}

.hsm-product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hsm-product-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a1a1a;
}

.hsm-product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.hsm-product-price strong {
    font-size: 16px;
    font-weight: 700;
    color: #e74c3c;
}

.hsm-product-price del {
    font-size: 13px;
    color: #aaa;
}

.hsm-product-save {
    display: inline-block;
    background: #fff0ef;
    color: #e74c3c;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.hsm-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.hsm-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
}

.hsm-star {
    color: #fbbf24;
}

.hsm-star-empty {
    color: #ddd;
}

.hsm-review-count {
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}

.hsm-product-actions {
    display: flex;
    gap: 6px;
}

.hsm-action-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: 15px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.hsm-action-btn:hover {
    color: #e74c3c;
}

/* Slider nav arrows */
.hsm-slider-nav {
    display: flex;
    gap: 8px;
}

.hsm-arrow {
    width: 36px;
    height: 36px;
    border-radius: 0;
    border: none;
    background: none;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.hsm-arrow:hover {
    color: #e74c3c;
}

/* ---------- ENDORSEMENTS (聯合推薦) ---------- */
.hsm-endorsements {
    padding: 60px 0 70px;
    background: #f5f5f5;
}

.hsm-tag-pill {
    display: inline-block;
    background: #fff0ef;
    color: #e74c3c;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 20px;
    margin-left: 12px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.hsm-endorse-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding-top: 30px;
}

.hsm-endorse-card {
    position: relative;
    background: #fff;
    border-radius: 18px;
    overflow: visible;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s, transform 0.3s;
    min-height: 300px;
    padding: 40px 44% 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hsm-endorse-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.hsm-endorse-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hsm-endorse-quote {
    border-left: 4px solid #e74c3c;
    padding-left: 18px;
    margin-bottom: 24px;
}

.hsm-endorse-quote p {
    font-size: 16px;
    line-height: 1.85;
    color: #333;
    margin: 0;
}

.hsm-endorse-quote p strong {
    color: #1a1a1a;
    font-weight: 700;
}

.hsm-endorse-author {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.hsm-endorse-title {
    font-size: 13px;
    color: #999;
}

.hsm-endorse-photo {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 44%;
    height: 110%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.hsm-endorse-photo img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transition: transform 0.4s;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.hsm-endorse-card:hover .hsm-endorse-photo img {
    transform: scale(1.03);
}

/* ---------- RECOMMENDED (推薦商品) ---------- */
.hsm-recommended {
    padding: 50px 0 60px;
    background: #fff;
}

.hsm-view-all {
    font-size: 14px;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.hsm-view-all:hover {
    color: #e74c3c;
}

.hsm-rec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.hsm-rec-card {
    display: flex;
    gap: 20px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    padding: 20px;
    transition: box-shadow 0.25s;
}

.hsm-rec-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.hsm-rec-img {
    width: 180px;
    flex-shrink: 0;
    background: #f9f9f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.hsm-rec-img img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.hsm-rec-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hsm-rec-info .hsm-product-name {
    font-size: 16px;
    margin-bottom: 6px;
}

.hsm-rec-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.6;
    margin: 8px 0 auto;
    padding-bottom: 10px;
}

/* ---------- HEALTH INSIGHTS (健康新知) ---------- */
.hsm-insights {
    padding: 50px 0 60px;
    background: #f9f9f9;
}

.hsm-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.hsm-article-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.2s;
}

.hsm-article-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    transform: translateY(-3px);
    color: inherit;
}

.hsm-article-img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.hsm-article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.hsm-article-card:hover .hsm-article-img img {
    transform: scale(1.04);
}

.hsm-article-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.hsm-article-body {
    padding: 20px;
}

.hsm-article-body h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a1a1a;
    line-height: 1.4;
}

.hsm-article-body p {
    font-size: 13px;
    color: #777;
    line-height: 1.7;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hsm-read-more {
    font-size: 13px;
    color: #e74c3c;
    font-weight: 600;
}

/* ---------- BRAND STORY (品牌故事) ---------- */
.hsm-brand-story {
    padding: 50px 0 60px;
    background: #fff;
}

.hsm-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: 18px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}

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

/* ---------- Footer ---------- */
.hsm-footer {
    background: #fff;
    border-top: 1px solid #f0f0f0;
    padding: 50px 0 0;
}

.hsm-footer-logo {
    margin-bottom: 36px;
}

.hsm-footer-logo img {
    height: 44px;
    width: auto;
}

.hsm-footer-logo .hsm-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.hsm-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr auto;
    gap: 40px;
    padding-bottom: 40px;
}

.hsm-footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px;
}

.hsm-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hsm-footer-col ul li {
    margin-bottom: 10px;
}

.hsm-footer-col ul li a {
    font-size: 13px;
    color: #777;
    text-decoration: none;
    transition: color 0.2s;
}

.hsm-footer-col ul li a:hover {
    color: #e74c3c;
}

.hsm-contact-list li {
    font-size: 13px;
    color: #777;
}

.hsm-footer-social {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-top: 4px;
}

.hsm-footer-social a {
    color: #555;
    transition: color 0.2s;
}

.hsm-footer-social a:hover {
    color: #e74c3c;
}

.hsm-footer-bottom {
    border-top: 1px solid #f0f0f0;
    padding: 20px 0;
    text-align: right;
}

.hsm-footer-bottom p {
    margin: 0;
    font-size: 12px;
    color: #aaa;
}

/* ---------- Floating Buttons ---------- */
.hsm-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.hsm-float-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background 0.2s, opacity 0.3s;
    font-size: 10px;
    line-height: 1;
}

.hsm-float-btn:hover {
    background: #c0392b;
    color: #fff;
}

.hsm-back-to-top {
    opacity: 0;
}

.hsm-back-to-top span {
    font-size: 9px;
    font-weight: 600;
    margin-top: 1px;
}

/* ---------- Mobile Menu ---------- */
.hsm-mobile-nav {
    display: flex;
    flex-direction: column;
}

.hsm-mobile-nav a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.hsm-mobile-nav a:hover {
    color: #e74c3c;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1199px) {
    .hsm-header {
        width: calc(100% - 40px);
        padding: 12px 24px;
    }

    .hsm-hero-stage {
        padding: 0 16px;
        margin-top: -16px;
    }

    .hsm-hero-content {
        top: 96px;
        left: 18px;
        width: min(34vw, 360px);
        padding: 34px 26px 30px;
    }

    .hsm-cat-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hsm-endorse-photo {
        width: 160px;
    }
}

@media (max-width: 991px) {
    .hsm-header {
        width: calc(100% - 30px);
        padding: 10px 16px;
        border-radius: 14px;
        top: 46px;
    }

    .hsm-header.is-pinned {
        width: 100%;
        border-radius: 0;
    }

    .hsm-hero {
        padding: 88px 0 24px;
    }

    .hsm-hero-stage {
        padding: 0 15px;
        margin-top: -10px;
    }

    .hsm-hero-content {
        position: absolute;
        left: 36px;
        bottom: 28px;
        top: auto;
        width: min(56vw, 430px);
        margin-bottom: 0;
        padding: 28px 22px 24px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 4;
    }

    .hsm-hero-slider {
        overflow: visible;
    }

    .hsm-slide-sm,
    .hsm-slide-lg,
    .hsm-slide-md {
        width: calc(100vw - 72px);
        min-width: calc(100vw - 72px);
        max-width: calc(100vw - 72px);
    }

    .hsm-slide-img {
        height: 420px;
    }

    .hsm-badge {
        font-size: 26px;
        margin-bottom: 14px;
    }

    .hsm-hero-title {
        font-size: 38px;
        margin-bottom: 12px;
    }

    .hsm-hero-subtitle {
        margin-bottom: 18px;
    }

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

    .hsm-banner-img {
        height: 220px;
    }

    .hsm-endorse-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hsm-endorse-photo {
        width: 140px;
    }

    .hsm-rec-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .hsm-footer-grid {
        grid-template-columns: 1fr 1fr 1.5fr auto;
    }
}

@media (max-width: 767px) {
    .hsm-header {
        width: calc(100% - 20px);
        padding: 10px 14px;
        border-radius: 12px;
        top: 40px;
    }

    .hsm-header.is-pinned {
        width: 100%;
        border-radius: 0;
    }

    .hsm-header-inner {
        display: grid;
        grid-template-columns: 40px 1fr 40px;
        gap: 10px;
    }

    .hsm-header-icons {
        gap: 14px;
        justify-self: end;
    }

    .hsm-header-icons .hsm-icon-link:not(:last-child) {
        display: none;
    }

    .hsm-logo {
        justify-self: center;
    }

    .hsm-icon-link {
        font-size: 16px;
    }

    .hsm-hero {
        padding: 84px 0 20px;
    }

    .hsm-hero-stage {
        display: flex;
        flex-direction: column;
        padding: 0 0 0;
        margin-top: -6px;
    }

    .hsm-hero-content {
        position: static;
        order: 2;
        width: 100%;
        max-width: none;
        margin: -50px 0 0;
        padding: 0 16px 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .hsm-hero-slider {
        order: 1;
        overflow: visible;
    }

    .hsm-slide-sm,
    .hsm-slide-lg,
    .hsm-slide-md {
        width: 82vw;
        min-width: 82vw;
        max-width: 82vw;
    }

    .hsm-slide-img {
        height: 470px;
    }

    .hsm-hero-title {
        display: inline;
        font-size: 26px;
        max-width: none;
        line-height: 1.2;
        background: #fff;
        padding: 6px 10px 8px;
        box-decoration-break: clone;
        -webkit-box-decoration-break: clone;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    }

    .hsm-badge {
        font-size: 22px;
        padding: 10px 14px;
        margin: 0 0 14px;
        border-radius: 14px;
    }

    .hsm-hero-subtitle {
        display: inline-block;
        font-size: 14px;
        margin: 18px 0 20px;
        background: #fff;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    }

    .hsm-btn-shop {
        padding: 12px 20px;
    }

    .hsm-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hsm-banners-grid {
        grid-template-columns: 1fr;
    }

    .hsm-banner-img {
        height: 200px;
    }

    .hsm-endorse-grid {
        grid-template-columns: 1fr;
    }

    .hsm-endorse-card {
        flex-direction: row;
    }

    .hsm-endorse-photo {
        width: 120px;
    }

    .hsm-rec-grid {
        grid-template-columns: 1fr;
    }

    .hsm-rec-card {
        flex-direction: row;
        gap: 16px;
    }

    .hsm-rec-img {
        width: 140px;
    }

    .hsm-articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hsm-article-card {
        display: flex;
        flex-direction: row;
    }

    .hsm-article-img {
        width: 140px;
        flex-shrink: 0;
        aspect-ratio: auto;
    }

    .hsm-article-body {
        padding: 14px;
    }

    .hsm-article-body h3 {
        font-size: 14px;
    }

    .hsm-article-body p {
        -webkit-line-clamp: 2;
    }

    .hsm-video-wrapper {
        border-radius: 12px;
    }

    .hsm-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .hsm-footer-social {
        grid-column: 1 / -1;
    }

    .hsm-footer-bottom {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hsm-announcement-bar {
        font-size: 11px;
        height: 30px;
    }

    .hsm-logo-text {
        font-size: 18px;
    }

    .hsm-hero-stage {
        padding: 0;
        margin-top: -4px;
    }

    .hsm-hero-content {
        margin-top: -42px;
        padding: 0 12px 0;
    }

    .hsm-slide-sm,
    .hsm-slide-lg,
    .hsm-slide-md {
        width: 84vw;
        min-width: 84vw;
        max-width: 84vw;
    }

    .hsm-slide-img {
        height: 400px;
    }

    .hsm-hero-title {
        font-size: 23px;
    }

    .hsm-hero-subtitle {
        font-size: 13px;
        padding: 7px 10px;
    }

    .hsm-btn-shop {
        padding: 11px 18px;
        font-size: 14px;
    }

    .hsm-section-title {
        font-size: 20px;
    }
}

/* ============================================================
   Inner pages — clear the fixed glass header
   ============================================================ */
.hsm-inner-page #main-content,
.hsm-product-page #main-content {
    padding-top: 130px;
}

@media (max-width: 767.98px) {
    .hsm-inner-page #main-content,
    .hsm-product-page #main-content {
        padding-top: 100px;
    }
}

/* ============================================================
   Announcement-bar hidden: pull header up to viewport top
   ============================================================ */
body:not(:has(.hsm-announcement-bar)) .hsm-header {
    top: 16px;
}
body:not(:has(.hsm-announcement-bar)) .hsm-inner-page #main-content,
body:not(:has(.hsm-announcement-bar)) .hsm-product-page #main-content {
    padding-top: 100px;
}
@media (max-width: 767.98px) {
    body:not(:has(.hsm-announcement-bar)) .hsm-inner-page #main-content,
    body:not(:has(.hsm-announcement-bar)) .hsm-product-page #main-content {
        padding-top: 80px;
    }
}

/* 隱藏所有商品徽章（In Stock / % Off / New / Trending / Pre-Order 等） */
.on-sale-wrap,
.on-sale-item {
    display: none !important;
}

/* 隱藏 Live Sales 即時購買通知 toast */
#live-sales-container,
.live-notification {
    display: none !important;
}

/* 隱藏右下角浮動按鈕（TOP / Chat） */
.hsm-floating {
    display: none !important;
}

/* Footer 3 欄：聯絡資訊 / 其他資訊 / FB Page Plugin */
.hsm-footer-grid {
    grid-template-columns: 1.4fr 1fr minmax(500px, auto);
}
.hsm-footer-social {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.hsm-fb-page {
    width: 100%;
    max-width: 500px;
}
.hsm-fb-page iframe,
.hsm-fb-page span,
.hsm-fb-page > div {
    width: 100% !important;
    max-width: 100% !important;
}
