/* =============================================
   Nuvoriatt - Main Stylesheet
   ============================================= */


/* CSS Variables */
:root {
    --font-body-family: 'Lato', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
    --font-body-style: normal;
    --font-body-weight: 400;
    --font-body-weight-bold: 700;
    --font-heading-family: 'Lato', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
    --font-heading-style: normal;
    /* Lato 仅提供 300/400/700/900 字重；800/600/500 等会触发合成 fallback 渲染异常。所有页面显式用 900。 */
    --font-heading-weight: 900;
    --font-body-scale: 1.0;
    --font-heading-scale: 1.3;

    /* Brand Colors */
    --color-primary: #3B71CA;
    --color-primary-rgb: 59, 113, 202;
    --color-primary-dark: #2E5BA6;
    --color-accent-pink: #C4899A;
    --color-accent-pink-rgb: 196, 137, 154;

    /* Text & Background */
    --color-text: #1a1a1a;
    --color-text-rgb: 26, 26, 26;
    --color-text-light: #666666;
    --color-text-muted: rgba(26, 26, 26, 0.6);
    --color-white: #ffffff;
    --color-white-rgb: 255, 255, 255;
    --color-bg-light: #f8f5f2;
    --color-bg-section: #fafafa;

    /* Layout */
    --page-width: 140rem;
    --buttons-radius: 6px;
    --buttons-border-width: 2px;
    --media-radius: 12px;

    /* Legacy compat */
    --color-base-text: 26, 26, 26;
    --color-base-background-1: 255, 255, 255;
    --color-base-background-2: 243, 243, 243;
    --color-base-solid-button-labels: 255, 255, 255;
    --color-base-accent-1: 59, 113, 202;
    --color-shadow: 18, 18, 18;
}

/* =============================================
   Reset & Base
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    box-sizing: border-box;
    font-size: calc(var(--font-body-scale) * 62.5%);
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body-family);
    font-style: var(--font-body-style);
    font-weight: var(--font-body-weight);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul, ol {
    list-style: none;
}

/* =============================================
   Announcement Bar (Blue Top Banner)
   ============================================= */
.announcement-bar {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.8rem 2rem;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    position: relative;
    z-index: 1001;
}

.announcement-bar__content {
    max-width: var(--page-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
}

.announcement-bar__info {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-shrink: 0;
}

.announcement-bar__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.announcement-bar__item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
}

.announcement-bar__promo {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* =============================================
   Header (White Navigation Bar)
   ============================================= */
.site-header {
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-wrapper {
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 1.5rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Navigation (Left) */
.main-navigation {
    flex: 1;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: none;
    letter-spacing: 0.1em;
    padding: 0.8rem 1.5rem;
    border-radius: var(--buttons-radius);
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Logo (Center) */
.header-logo {
    flex: 0 0 auto;
    text-align: center;
}

.logo-link {
    display: block;
    text-decoration: none;
}

.logo-image {
    height: 4rem;
    width: auto;
    max-width: 100%;
}

.logo-text {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--color-text);
    letter-spacing: 0.02em;
}

/* Header Icons (Right) */
.header-icons {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    color: var(--color-text);
    position: relative;
    transition: color 0.3s ease;
    overflow: visible;
}

.header-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.header-icon:hover {
    color: var(--color-primary);
}

/* Cart Badge (Header Icon) */
.header-icon--cart {
    position: relative;
}

.cart-count {
    position: absolute;
    top: 4px;
    right: 2px;
    background-color: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cart-count:empty,
.cart-count[data-count="0"] {
    display: none !important;
}

/* Language Switcher (Custom Dropdown) */
.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.lang-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px 0 10px;
    background: transparent;
    border: 1px solid rgba(26, 26, 26, 0.12);
    border-radius: 999px;
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
    line-height: 1;
}
.lang-switcher__toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background-color: rgba(59, 113, 202, 0.04);
}
.lang-switcher__globe {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    flex-shrink: 0;
}
.lang-switcher__code {
    display: inline-block;
    min-width: 1.5em;
    text-align: left;
}
.lang-switcher__caret {
    width: 10px;
    height: 10px;
    margin-left: 2px;
    stroke: currentColor;
    fill: none;
    transition: transform .2s ease;
    flex-shrink: 0;
}
.lang-switcher.is-open .lang-switcher__caret {
    transform: rotate(180deg);
}
.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 95px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(26, 26, 26, 0.06);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 1500;
}
.lang-switcher__menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-switcher__menu li {
    margin: 0;
    padding: 0;
}
.lang-switcher__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 6px;
    transition: background-color .15s ease, color .15s ease;
    line-height: 1.2;
}
.lang-switcher__link:hover {
    background-color: rgba(59, 113, 202, 0.08);
    color: var(--color-primary);
}
.lang-switcher__link.is-active {
    background-color: rgba(59, 113, 202, 0.08);
    color: var(--color-primary);
    font-weight: 600;
}

/* Checkout form: required asterisk + address radio */
.required-mark {
    color: #e53935;
    font-weight: 700;
    margin-left: 2px;
}
.checkout-form-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
    display: block;
}
.addr-type-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
}
.addr-type-label.is-disabled {
    color: #bbb;
    cursor: not-allowed;
}
.addr-type-label input[type="radio"]:disabled + span {
    color: #bbb;
}

/* Search Modal */
.search-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.search-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.search-modal {
    position: relative;
    width: min(620px, 92vw);
    background: #fff;
    border-radius: 16px;
    padding: 30px 28px 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    transform: translateY(-16px);
    transition: transform .2s ease;
}
.search-modal-overlay.active .search-modal {
    transform: translateY(0);
}
.search-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: var(--color-text-light, #666);
    cursor: pointer;
    border-radius: 50%;
}
.search-modal-close:hover { background: var(--color-bg-light, #f5f5f5); }
.search-modal-title {
    font-family: var(--font-heading-family, 'Lato', sans-serif);
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 18px;
    color: var(--color-text, #1a1a1a);
}
.search-modal-field {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(var(--color-primary-rgb, 59, 113, 202), .25);
    border-radius: 12px;
    padding: 4px 6px 4px 14px;
    transition: border-color .15s ease;
}
.search-modal-field:focus-within {
    border-color: var(--color-primary, #3B71CA);
}
.search-modal-icon {
    width: 20px;
    height: 20px;
    flex: none;
    stroke: var(--color-text-light, #888);
    fill: none;
    stroke-width: 1.8;
}
.search-modal-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    color: var(--color-text, #1a1a1a);
    background: transparent;
    padding: 12px 4px;
}
.search-modal-submit {
    flex: none;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: var(--color-primary, #3B71CA);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}
.search-modal-submit:hover { background: var(--color-primary-dark, #2E5BA6); }
.search-modal-submit svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}
.search-modal-hint {
    margin: 14px 2px 0;
    font-size: 12px;
    color: var(--color-text-muted, #999);
}

/* ===== Login Modal (guest only) ===== */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 14vh;
    z-index: 30000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.login-modal {
    position: relative;
    width: min(420px, 92vw);
    background: #fff;
    border-radius: 16px;
    padding: 30px 28px 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    transform: translateY(-16px);
    transition: transform .2s ease;
}
.login-modal-overlay.active .login-modal {
    transform: translateY(0);
}
.login-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: var(--color-text-light, #666);
    cursor: pointer;
    border-radius: 50%;
}
.login-modal-close:hover { background: var(--color-bg-light, #f5f5f5); }
.login-modal-title {
    font-family: var(--font-heading-family, 'Lato', sans-serif);
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 4px;
    color: var(--color-text, #1a1a1a);
}
.login-modal-sub {
    margin: 0 0 20px;
    font-size: 13px;
    color: var(--color-text-light, #666);
}
.login-field { margin-bottom: 14px; }
.login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text, #1a1a1a);
    margin-bottom: 6px;
}
.login-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text, #1a1a1a);
    background: #fff;
    transition: border-color .15s ease;
}
.login-input:focus {
    outline: none;
    border-color: var(--color-primary, #3B71CA);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 59, 113, 202), .12);
}
.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 16px;
    font-size: 13px;
}
.login-remember { color: var(--color-text-light, #555); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.login-agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--color-text-muted, #999);
    margin: 0 0 16px;
    cursor: pointer;
}
.login-agree input { margin-top: 2px; flex: none; }
.login-agree a { color: var(--color-primary, #3B71CA); text-decoration: none; }
.login-agree a:hover { text-decoration: underline; }
.login-forgot { color: var(--color-primary, #3B71CA); text-decoration: none; }
.login-forgot:hover { text-decoration: underline; }
.login-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--color-primary, #3B71CA);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease;
}
.login-submit:hover { background: var(--color-primary-dark, #2E5BA6); }
.login-submit.loading {
    cursor: not-allowed;
    opacity: .85;
}
.login-submit.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-submit-spin .8s linear infinite;
    vertical-align: middle;
}
@keyframes login-submit-spin {
    to { transform: rotate(360deg); }
}
.login-terms {
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text-muted, #999);
    text-align: center;
}
.login-terms a { color: var(--color-primary, #3B71CA); text-decoration: none; }
.login-terms a:hover { text-decoration: underline; }
.login-msg { margin: 12px 0 0; font-size: 13px; text-align: center; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    font-size: 2.4rem;
    color: var(--color-text);
}

.mobile-menu-toggle svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-white);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.5, 0, 0, 1);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    padding: 2rem;
    text-align: right;
}

.mobile-menu-close {
    font-size: 2.8rem;
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.mobile-navigation {
    padding: 4rem 3rem;
}

.mobile-nav-list {
    list-style: none;
}

.mobile-nav-list li {
    margin-bottom: 2.5rem;
}

.mobile-nav-list a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mobile-nav-list a:hover {
    color: var(--color-primary);
}

/* =============================================
   Hero Section (Full-width Banner)
   ============================================= */
.hero-section {
    position: relative;
    width: 100%;
    background-color: #fdf6f0;
}

.hero-banner {
    width: 100%;
    line-height: 0;
}

.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Feature Badges Row (below hero) */
.hero-features {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
    padding: 3rem 4rem;
    background-color: var(--color-white);
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-feature svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-text);
    fill: none;
    stroke-width: 1.8;
    flex-shrink: 0;
}

.hero-feature span {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text);
}

/* =============================================
   Comparison Section (Skin Care Patches)
   ============================================= */
/* =============================================
   Comparison Section (Skin Care Patches)
   ============================================= */
.comparison-section {
    padding: 8rem 4rem;
    background-color: var(--color-white);
}

.comparison-inner {
    max-width: var(--page-width);
    margin: 0 auto;
}

.comparison-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 6rem;
    align-items: center;
}

/* Comparison Text Side */
.comparison-text-side {
    padding-top: 1rem;
}

.comparison-text-side .comparison-title {
    font-family: var(--font-heading-family);
    font-weight: var(--font-heading-weight);
    font-size: 4rem;
    color: var(--color-text);
    margin-bottom: 2rem;
    line-height: 1.25;
}

.comparison-text-side .comparison-subtitle {
    font-size: 1.8rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Comparison Table */
.comparison-table-wrapper {
    display: flex;
    justify-content: center;
}

.comparison-table {
    width: 100%;
    max-width: 52rem;
    position: relative;
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 1.2rem 0;
}

/* Blue band behind nuvoriatt column, extends above/below table */
.comparison-table::before {
    content: '';
    position: absolute;
    top: -12px;
    bottom: -12px;
    left: 50%;
    width: 25%;
    background-color: var(--color-primary);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(59, 113, 202, 0.35);
    z-index: 1;
}

.comparison-table-head {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 2;
}

.comparison-brand {
    padding: 1.6rem 1rem;
    font-size: 1.6rem;
    font-weight: 900;
    text-align: center;
    color: var(--color-white);
}

.comparison-others {
    padding: 1.6rem 1rem;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    color: var(--color-text);
}

/* Individual card rows */
.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    position: relative;
    z-index: 2;
    background: transparent;
    box-shadow: none;
}

.comparison-row > div {
    padding: 1.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Feature column cell */
.comparison-row > div:first-child {
    font-weight: 500;
    color: var(--color-text);
    justify-content: flex-start;
    padding-left: 3rem;
}

/* nuvoriatt cell */
.comparison-row > div:nth-child(2) {
    color: var(--color-white);
}

/* Others cell */
.comparison-row > div:last-child {
    justify-content: center;
}

.comparison-row > div svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.icon-check {
    color: var(--color-white);
}

.icon-cross {
    color: var(--color-text);
    font-size: 1.8rem;
    font-weight: 700;
}

/* Row separation lines */
.comparison-row:not(:last-child) > div:first-child,
.comparison-row:not(:last-child) > div:last-child {
    border-bottom: 1px solid #f0f0f0;
}

.comparison-table-head > div:first-child,
.comparison-table-head > div:last-child {
    border-bottom: 1px solid #f0f0f0;
}

/* =============================================
   Feature Columns (Premium / Easy / Comfortable)
   ============================================= */
.features-section {
    padding: 6rem 4rem 8rem;
    background-color: var(--color-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5rem;
    max-width: var(--page-width);
    margin: 0 auto;
}

.feature-column {
    text-align: center;
    padding: 0 1rem;
}

.feature-icon-circle {
    width: 6.4rem;
    height: 6.4rem;
    border-radius: 50%;
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.5rem;
}

.feature-icon-circle svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-white);
    fill: none;
    stroke-width: 2.5;
}

.feature-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.feature-text {
    font-size: 1.5rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* =============================================
   Catalog / Product Listing Page
   ============================================= */
.catalog-section {
    padding: 4rem 4rem 8rem;
    background-color: var(--color-white);
}

.catalog-inner {
    max-width: var(--page-width);
    margin: 0 auto;
}

.catalog-title {
    font-family: var(--font-heading-family);
    font-weight: var(--font-heading-weight);
    font-size: 3.6rem;
    color: var(--color-text);
    margin-bottom: 3rem;
}

/* Toolbar: Filters + Sort */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.catalog-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.catalog-sort {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.filter-dropdown {
    position: relative;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    background: var(--color-white);
    border: 1px solid #d4d4d4;
    border-radius: var(--buttons-radius);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--color-primary);
}

.filter-btn svg {
    transition: transform 0.2s ease;
}

.filter-btn.open svg {
    transform: rotate(180deg);
}

.product-count {
    font-size: 1.4rem;
    color: var(--color-text-light);
    white-space: nowrap;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6rem 2rem;
    font-size: 1.6rem;
    color: var(--color-text-light);
}

/* Product Card */
.product-card {
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    color: var(--color-white);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.product-card-info {
    padding: 1.8rem;
}

.product-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2rem;
}

.product-card-price {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.price-current {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text);
}

.price-compare {
    font-size: 1.4rem;
    color: #999;
    text-decoration: line-through;
}

.product-card-btn {
    display: block;
    width: 100%;
    padding: 1.1rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--buttons-radius);
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.3s ease;
    text-decoration: none;
    text-transform: none;
}

.product-card-btn:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
}

/* =============================================
   Wave Divider - blue band with wave texture
   ============================================= */
.wave-divider {
    position: relative;
    width: 100%;
    line-height: 0;
    overflow: hidden;
    background-color: transparent;
    margin-bottom: -2px;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 120px;
}

/* Base fill: same blue as container (invisible, ensures full coverage) */
.wave-divider .wave-path-1 {
    fill: var(--color-primary);
    animation: waveScrollLeft1 12s linear infinite;
}

/* Middle wave: medium blue wave layer */
.wave-divider .wave-path-2 {
    fill: rgba(var(--color-primary-rgb), 0.35);
    animation: waveScrollRight2 18s linear infinite;
}

/* Top accent wave: light blue wave layer */
.wave-divider .wave-path-3 {
    fill: rgba(var(--color-primary-rgb), 0.15);
    animation: waveScrollLeft3 28s linear infinite;
}

@keyframes waveScrollLeft1 {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-25%, 2px, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes waveScrollRight2 {
    0% { transform: translate3d(-50%, 0, 0); }
    50% { transform: translate3d(-25%, -3px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

@keyframes waveScrollLeft3 {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-25%, 4px, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 6rem 4rem 3rem;
}

.footer-wrapper {
    max-width: var(--page-width);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.2fr;
    gap: 5rem;
    margin-bottom: 5rem;
}

/* Footer Brand */
.footer-brand .logo-text {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.footer-email {
    font-size: 1.4rem;
    opacity: 0.9;
}

/* Footer Links */
.footer-heading {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--color-white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1.2rem;
}

.footer-links a {
    font-size: 1.4rem;
    opacity: 0.85;
    transition: opacity 0.3s ease, padding-left 0.3s ease;
    color: var(--color-white);
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 0.5rem;
}

/* Footer Newsletter */
.footer-newsletter .footer-heading {
    margin-bottom: 1rem;
}

.newsletter-desc {
    font-size: 1.4rem;
    opacity: 0.85;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-width: 36rem;
}

.newsletter-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--buttons-radius);
    background-color: transparent;
    color: var(--color-white);
    font-size: 1.4rem;
    font-family: inherit;
    outline: none;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
    border-color: var(--color-white);
}

.newsletter-button {
    width: 100%;
    padding: 1.2rem 2.5rem;
    background-color: var(--color-white);
    color: var(--color-primary);
    font-size: 1.4rem;
    font-weight: 700;
    border: 2px solid var(--color-white);
    border-radius: var(--buttons-radius);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.newsletter-button:hover {
    background-color: transparent;
    color: var(--color-white);
}

/* Newsletter signup feedback is shown via the top toast (showToast), not an inline box */

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.list-payment {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    width: 100%;
    list-style: none;
    padding: 0;
}

.list-payment__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.list-payment__item svg {
    height: 24px;
    width: 38px;
    display: block;
}

.footer-copyright-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.copyright {
    font-size: 1.3rem;
    opacity: 0.7;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 2rem;
    z-index: 99;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    background-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll Animation */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.animated {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   Responsive Design
   ============================================= */
@media screen and (max-width: 990px) {
    .header-wrapper {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }

    .main-navigation {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        justify-self: start;
    }

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

    .logo-image {
        height: 3.2rem;
    }

    .header-icons {
        flex: none;
        justify-self: end;
        gap: 1rem;
        min-width: 0;
    }

    .header-icon {
        width: 3.6rem;
        height: 3.6rem;
    }

    .announcement-bar__content {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .comparison-layout {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

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

    .catalog-section {
        padding: 3rem 2rem 6rem;
    }

    .features-grid {
        gap: 3rem;
    }

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

@media screen and (max-width: 750px) {
    .hero-features {
        flex-direction: column;
        gap: 2rem;
        padding: 2.5rem 2rem;
    }

    .comparison-section {
        padding: 5rem 2rem;
    }

    .comparison-text-side .comparison-title {
        font-size: 2.8rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .comparison-text-side .comparison-subtitle {
        font-size: 1.6rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .features-section {
        padding: 4rem 2rem 6rem;
    }

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

    .site-footer {
        padding: 4rem 2rem 3rem;
    }

    .footer-copyright-row {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .wave-divider svg {
        height: 80px;
    }
}

@media screen and (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .catalog-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .comparison-table {
        min-width: auto;
    }

    .comparison-row > div {
        padding: 1.2rem 0.8rem;
        font-size: 1.2rem;
    }

    .comparison-row > div:first-child {
        padding-left: 1.2rem;
    }

    .comparison-brand, .comparison-others {
        font-size: 1.3rem;
        padding: 1.2rem 0.5rem;
    }


    .footer-bottom {
        padding-bottom: 5rem;
    }

    .scroll-to-top {
        right: 0;
        bottom: 0;
    }
}

/* =============================================
   Cart Side Drawer Component
   ============================================= */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background-color: var(--color-white);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 20001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer-overlay.active .cart-drawer {
    right: 0;
}

/* Header */
.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.cart-drawer-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-text);
}

.cart-drawer-close {
    font-size: 2.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: 0;
    line-height: 1;
}

/* Timer */
.cart-drawer-timer {
    background-color: #111;
    color: var(--color-white);
    padding: 1.2rem 2rem;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Items */
.cart-drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* =============================================
   Cart Drawer Items — high-specificity overrides
   (base.css Shopify forces grid/table on .cart-item)
   ============================================= */
.cart-drawer-items .cart-item {
    display: flex !important;
    gap: 1.4rem;
    padding: 1.6rem 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    box-sizing: border-box;
}

.cart-drawer-items .cart-item:last-child {
    border-bottom: none;
}

/* Media + badge */
.cart-drawer-items .cart-item-media {
    position: relative;
    width: 9rem;
    height: 9rem;
    flex-shrink: 0;
}

.cart-drawer-items .cart-item-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    background-color: #fafafa;
    border: 1px solid #eee;
}

/* Body */
.cart-drawer-items .cart-item-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.cart-drawer-items .cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.cart-drawer-items .cart-item-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
    flex: 1;
    word-break: break-word;
    margin: 0;
}

.cart-drawer-items .cart-item-delete {
    background: none;
    border: none;
    color: #b0b0b0;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.2rem;
    transition: color 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
}

.cart-drawer-items .cart-item-delete:hover {
    color: #e74c3c;
}

.cart-drawer-items .cart-item-sub {
    font-size: 1.2rem;
    color: #888;
    margin-top: 0.35rem;
    line-height: 1.3;
}

/* Subscription info dashed pill */
.cart-drawer-items .cart-item-sub-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.13rem;
    color: #555;
    margin-top: 0.8rem;
    padding: 0.5rem 0.85rem;
    border: 1.5px dashed var(--color-primary);
    border-radius: 6px;
    background-color: rgba(59, 113, 202, 0.04);
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
}

.cart-sub-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Foot: qty selector + pricing */
.cart-drawer-items .cart-item-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    width: 100%;
}

/* Quantity Selector (cart drawer) */
.cart-drawer-items .qty-selector {
    display: flex;
    align-items: center;
    border: 1.5px solid #d0d0d0;
    border-radius: 5px;
    overflow: hidden;
}

.cart-drawer-items .qty-btn {
    width: 3rem;
    height: 3rem;
    background-color: #f8f8f8;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    user-select: none;
    color: #555;
}

.cart-drawer-items .qty-btn:hover {
    background-color: #eee;
}

.cart-drawer-items .qty-input {
    width: 3.8rem;
    height: 3rem;
    border: none;
    border-left: 1.5px solid #d0d0d0;
    border-right: 1.5px solid #d0d0d0;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    background-color: var(--color-white);
    outline: none;
    color: var(--color-text);
}

.cart-drawer-items .cart-item-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text);
}

.cart-drawer-items .cart-item-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.cart-drawer-items .cart-item-price-compare {
    font-size: 1.2rem;
    color: #aaa;
    text-decoration: line-through;
}

.cart-drawer-items .cart-item-price-save {
    font-size: 1.12rem;
    color: #2e9e5b;
    font-weight: 600;
}

/* Empty Cart State */
.cart-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--color-text-light);
    padding: 4rem 2rem;
}

.cart-drawer-empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

/* Footer */
.cart-drawer-footer {
    padding: 2rem;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.cart-savings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

/* Mixed subscription + one-time items warning banner */
.cart-mixed-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background-color: #fff8e1;
    border: 2px solid #f39c12;
    border-radius: 10px;
    margin-bottom: 16px;
}

.cart-mixed-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.cart-mixed-text {
    flex: 1;
    min-width: 0;
}

.cart-mixed-text strong {
    display: block;
    font-size: 15px;        /* px: 不受 html{font-size:10px} 影响 */
    color: #c27803;
    margin-bottom: 4px;
}

.cart-mixed-text p {
    margin: 0;
    font-size: 13.5px;
    color: #8a6d20;
    line-height: 1.45;
}

.savings-label {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-primary);
}

.savings-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.subtotal-label {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
}

.subtotal-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-text);
}

.cart-checkout-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-checkout-btn {
    width: 100%;
    padding: 1.3rem 2rem;
    background-color: #ffc439;
    border: none;
    border-radius: var(--buttons-radius);
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cart-checkout-btn:hover {
    background-color: #f5ba35;
}

.cart-checkout-btn:active {
    transform: scale(0.985);
}

/* Disabled state for mixed-cart checkout buttons */
.cart-checkout-btn.btn-disabled {
    background-color: #d5d5d5 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: none;
    box-shadow: none !important;
}
.cart-checkout-btn.btn-disabled:hover {
    background-color: #d5d5d5 !important;
    transform: none !important;
}

.btn-paypal-text {
    font-size: 1.6rem;
    font-weight: 600;
    color: #003087;
    letter-spacing: 0.01em;
}

.btn-paypal-logo {
    height: 1.9rem;
    width: auto;
}

/* =============================================
   Payment Loading Overlay (full-screen, shopping bag icon)
   ============================================= */
.payment-loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.payment-loading-overlay.active {
    display: flex;
}

.payment-loader {
    text-align: center;
    animation: loaderFadeIn 0.3s ease-out;
}

.loader-bag-icon {
    width: 64px;
    height: 56px;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    animation: bagBounce 1s ease-in-out infinite;
}

.loader-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.loader-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: dotPulse 1.2s ease-in-out infinite;
}

.loader-dots span:nth-child(2) { animation-delay: 0.16s; }
.loader-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes loaderFadeIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes bagBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
    40%        { opacity: 1;   transform: scale(1); }
}

@media screen and (max-width: 480px) {
    .cart-drawer {
        max-width: 100%;
        right: -100%;
    }
}

/* =============================================
   Product Detail Page — Screenshot Replica Styles
   ============================================= */
.product-detail-section {
    padding: 4rem 4rem 6rem;
    background-color: var(--color-white);
}

.product-detail-inner {
    max-width: var(--page-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
}

/* ================================
   LEFT COLUMN — Image Gallery
   ================================ */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1.05;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
}

.main-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Discount badge (orange starburst) */
.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #FF5722;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.25;
    padding: 0.7rem 1rem;
    border-radius: 50%;
    text-align: center;
    z-index: 3;
    box-shadow: 0 3px 10px rgba(255,87,34,0.4);
    clip-path: polygon(
        20% 0%, 80% 0%, 100% 20%,
        100% 80%, 80% 100%, 20% 100%,
        0% 80%, 0% 20%
    );
    width: 9rem;
    height: 9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.discount-badge strong {
    font-size: 1.6rem;
}

/* Size annotation overlay on image */
.size-annotation {
    position: absolute;
    bottom: 60px;
    left: 14px;
    background: rgba(255,255,255,0.92);
    color: #222;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-size: 1.15rem;
    font-weight: 700;
    z-index: 3;
    line-height: 1.3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Shop Now bar at bottom of main image */
.shop-now-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000;
    color: #fff;
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    padding: 0.9rem 0;
    z-index: 3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.25s;
}

.shop-now-bar:hover {
    background-color: #222;
}

.shop-arrow {
    font-size: 2.4rem;
    font-weight: 900;
}

/* Thumbnail slider with arrows — exactly 5 visible, square, evenly fill left column */
.thumbnail-slider {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.thumbnail-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1;
    width: 100%;
    padding: 0;
    /* Hide scrollbar completely */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.thumbnail-track::-webkit-scrollbar {
    display: none;
}

.thumbnail-item {
    /* Each thumbnail = exactly 1/5 of track width, square */
    flex: 0 0 calc((100% - 32px) / 5);
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: border-color 0.25s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.thumbnail-item:hover {
    transform: translateY(-2px);
}

.thumbnail-item.active {
    border-color: var(--color-primary);
}

/* Arrow nav buttons for thumbnails — positioned absolute over slider ends */
.thumb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: 1.5px solid #ddd;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1.6rem;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    line-height: 1;
    padding-bottom: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.thumb-prev {
    left: 5px;
}

.thumb-next {
    right: 5px;
}

.thumb-nav:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #fff;
}

/* ================================
   RIGHT COLUMN — Purchase Info
   ================================ */
.product-info-column-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-info-column {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow-y: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.product-info-column::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Rating row */
.product-rating-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.35rem;
    flex-wrap: wrap;
}

.rating-stars {
    color: #3B71CA; /* blue stars to match screenshot style */
    letter-spacing: 0.08em;
    font-size: 1.45rem;
}

.rating-text {
    color: var(--color-text-light);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Title */
.product-detail-title {
    font-size: 2.65rem;
    font-weight: 900;
    line-height: 1.22;
    color: var(--color-text);
}

/* Price */
.product-detail-price-row {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--color-text);
}

.product-divider {
    border: none;
    border-top: 1.5px solid #e0e0e0;
    margin: 0.4rem 0;
}

/* Bundle & Save title with side lines */
.bundle-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    color: #333;
    margin-bottom: 0.4rem;
    position: relative;
    padding: 0 1rem;
}

.bundle-section-title::before,
.bundle-section-title::after {
    content: '';
    flex: 1;
    border-top: 1.5px solid #ccc;
}

/* Bundle options list */
.bundle-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.bundle-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 1.35rem 1.8rem;
    border: 2px solid #c5c5c5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    background-color: #fff;
    margin-top: 12px;
}

.bundle-option:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(59,113,202,0.1);
}

.bundle-option.active {
    border-color: var(--color-primary);
    background-color: rgba(59, 113, 202, 0.04);
    box-shadow: 0 0 0 1px var(--color-primary), 0 2px 12px rgba(59,113,202,0.18);
}

.bundle-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.bundle-title {
    font-size: 1.38rem;
    font-weight: 650;
    color: var(--color-text);
}

.badge-popular {
    position: absolute;
    top: -12px;
    left: 16px;
    font-size: 1.05rem;
    font-weight: 900;
    font-family: var(--font-body-family);
    color: var(--color-white);
    background-color: var(--color-primary);
    padding: 0.32rem 0.85rem;
    border-radius: 4px;
    text-transform: capitalize;
    letter-spacing: 0.03em;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(59,113,202,0.35);
    white-space: nowrap;
}

.bundle-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.bundle-price {
    font-size: 1.42rem;
    font-weight: 750;
    color: var(--color-primary);
    line-height: 1.2;
}

.bundle-compare-price {
    font-size: 1.15rem;
    color: var(--color-text-light);
    text-decoration: line-through;
    line-height: 1.2;
    margin-top: 0.15rem;
    font-weight: 500;
}

.product-price-actual {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--color-primary);
}

.product-price-compare {
    font-size: 1.8rem;
    color: var(--color-text-light);
    text-decoration: line-through;
    font-weight: 500;
    margin-left: 0.8rem;
}

.product-price-save-badge {
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--color-white);
    background-color: var(--color-primary);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 0.8rem;
}

/* Subscribe & Save Box — single toggleable checkbox card */
.subscribe-save-box {
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    padding: 1.4rem 1.8rem;
    display: flex !important;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    gap: 1rem;
}

.subscribe-save-box.active {
    border: 2px dashed var(--color-primary);
    background-color: rgba(59, 113, 202, 0.05);
}

.subscribe-save-box:hover {
    background-color: rgba(59, 113, 202, 0.04);
}

/* Hidden native checkbox */
.sub-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom checkbox indicator */
.sub-check-indicator {
    width: 22px;
    height: 22px;
    border: 2px solid #c0c0c0;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: #fff;
}

.sub-check-indicator::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
    margin-top: -2px;
}

.subscribe-save-box.active .sub-check-indicator {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.subscribe-save-box.active .sub-check-indicator::after {
    transform: rotate(45deg) scale(1);
}

.sub-box-left {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sub-box-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.sub-box-title {
    font-size: 1.48rem;
    font-weight: 900;
    color: var(--color-text);
}

.sub-box-badge {
    font-size: 1rem;
    font-weight: 750;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.18rem 0.55rem;
    border-radius: 3px;
    display: inline-block;
}

.sub-box-desc {
    font-size: 1.2rem;
    color: var(--color-text-light);
}

.sub-box-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sub-price-current {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-text);
}

.sub-price-compare {
    font-size: 1.28rem;
    color: #999;
    text-decoration: line-through;
}

/* Quantity */
.quantity-wrapper {
    margin-top: 0.3rem;
}

.quantity-label {
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.6rem;
}

.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    width: 3.6rem;
    height: 3.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border: none;
    font-size: 1.6rem;
    color: #444;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 0;
}

.qty-btn:hover {
    background: #eee;
}

.qty-input {
    width: 4rem;
    height: 3.6rem;
    text-align: center;
    border: none;
    border-left: 1.5px solid #ddd;
    border-right: 1.5px solid #ddd;
    font-size: 1.4rem;
    font-weight: 600;
    outline: none;
    background: #fff;
    color: var(--color-text);
}

/* Action Buttons — stacked in order: ADD TO CART > PayPal > Card */
.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 0.6rem;
}

/* ADD TO CART — Blue solid primary button */
.btn-add-to-cart-primary {
    width: 100%;
    padding: 1.35rem 2rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--buttons-radius);
    font-family: var(--font-body-family);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: none;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.btn-add-to-cart-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-add-to-cart-primary:active {
    transform: translateY(0);
}

/* PayPal — Yellow */
.btn-paypal {
    width: 100%;
    padding: 1.25rem 2rem;
    background-color: #ffc439;
    border: none;
    border-radius: var(--buttons-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 1.4rem;
    font-weight: 650;
    color: #003087;
    transition: background-color 0.25s ease;
}

.btn-paypal:hover {
    background-color: #f2ba36;
}

.btn-paypal svg {
    height: 18px;
    width: auto;
}

/* Credit/Debit Card — White with border */
.btn-card {
    width: 100%;
    padding: 1.25rem 2rem;
    background-color: #fff;
    color: var(--color-text);
    border: 2px solid #c0c0c0;
    border-radius: var(--buttons-radius);
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
}

.btn-card:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background-color: rgba(59,113,202,0.02);
}

/* Airwallex Card Button — white bg with blue border/text for brand coordination */
.btn-card-airwallex {
    width: 100%;
    padding: 1.25rem 2rem;
    background-color: #fff;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: var(--buttons-radius);
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
}
.btn-card-airwallex:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}
/* Override cart-checkout-btn yellow bg when combined with airwallex */
.cart-checkout-btn.btn-card-airwallex {
    background-color: #fff;
    box-shadow: none;
}
.cart-checkout-btn.btn-card-airwallex:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ================================
   Product Description (Rich Text)
   ================================ */
.product-description-section {
    padding: 5rem 4rem 8rem;
    background-color: #fafafa;
}

.product-description-inner {
    max-width: var(--page-width);
    margin: 0 auto;
}

.product-description-content {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

.product-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* ================================
   Responsive
   ================================ */
@media screen and (max-width: 1024px) {
    .product-detail-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .product-info-column {
        padding-right: 0;
    }

    .product-detail-title {
        font-size: 2.2rem;
    }
}

@media screen and (max-width: 768px) {
    .product-detail-section {
        padding: 3rem 2rem 5rem;
    }

    .product-detail-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .product-info-column-wrapper {
        position: static;
        height: auto;
    }

    .product-info-column {
        position: static;
        height: auto;
        min-height: 0;
        overflow-y: visible;
        padding-right: 0;
    }

    .product-detail-title {
        font-size: 2rem;
    }

    .product-description-section {
        padding: 3rem 2rem 5rem;
    }

    /* On mobile, show ~3.5 thumbnails at a time to suggest scrolling */
    .thumbnail-item {
        flex: 0 0 calc((100% - 24px) / 3.5);
    }

    .thumb-nav {
        display: none;
    }

    .discount-badge {
        width: 7rem;
        height: 7rem;
        font-size: 1rem;
        padding: 0.5rem;
    }

    .discount-badge strong {
        font-size: 1.3rem;
    }
}


/* =============================================
   Toast Notification System
   ============================================= */
.toast-container {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    pointer-events: none;
    width: auto;
    max-width: 92vw;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 340px;
    max-width: 500px;
    padding: 14px 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 3px 10px rgba(0,0,0,0.08);
    font-size: 15px;          /* px: 不受 html{font-size:10px} 的 rem 基准影响 */
    line-height: 1.5;
    color: var(--color-text);
    animation: toastSlideIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.toast.toast-removing {
    animation: toastSlideOut 0.3s ease-in forwards;
}

/* Toast types */
.toast--error {
    border-left-color: #e74c3c;
    background: #fff;
}
.toast--error .toast-icon {
    color: #e74c3c;
}

.toast--success {
    border-left-color: #27ae60;
    background: #fff;
}
.toast--success .toast-icon {
    color: #27ae60;
}

.toast--warning {
    border-left-color: #f39c12;
    background: #fff;
}
.toast--warning .toast-icon {
    color: #f39c12;
}

.toast--info {
    border-left-color: var(--color-primary);
    background: #fff;
}
.toast--info .toast-icon {
    color: var(--color-primary);
}

.toast-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 22px;
    height: 22px;
}

.toast-message {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity 0.2s;
    border: none;
    background: none;
    padding: 0;
    color: inherit;
}
.toast-close:hover {
    opacity: 0.7;
}

/* Progress bar for auto-dismiss */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 0 10px;
    animation: toastProgressShrink linear forwards;
}
.toast--error .toast-progress { background: #e74c3c; }
.toast--success .toast-progress { background: #27ae60; }
.toast--warning .toast-progress { background: #f39c12; }
.toast--info .toast-progress { background: var(--color-primary); }

@keyframes toastSlideIn {
    0% { opacity: 0; transform: translateY(-20px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastSlideOut {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-16px) scale(0.96); }
}

@keyframes toastProgressShrink {
    0% { width: 100%; }
    100% { width: 0%; }
}

@media (max-width: 480px) {
    .toast-container {
        top: 1rem;
        max-width: 95vw;
    }
    .toast {
        min-width: 280px;
        max-width: 95vw;
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* =============================================
   Confirm Dialog (replaces native confirm())
   ============================================= */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: confirmFadeIn 0.2s ease;
}

.confirm-overlay.confirm-removing {
    animation: confirmFadeOut 0.2s ease forwards;
}

.confirm-dialog {
    background: #fff;
    border-radius: 14px;
    padding: 1.8rem 2rem 1.4rem;
    max-width: 380px;
    width: 90vw;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    text-align: center;
    animation: confirmSlideUp 0.3s cubic-bezier(0.21, 1.02, 0.73, 1);
}

.confirm-dialog-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: #f39c12;
}

.confirm-dialog-icon svg {
    width: 100%;
    height: 100%;
}

.confirm-dialog-message {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.confirm-dialog-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.confirm-btn {
    flex: 1;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.confirm-btn--cancel {
    background: #f2f2f2;
    color: var(--color-text);
}
.confirm-btn--cancel:hover {
    background: #e5e5e5;
}

.confirm-btn--ok {
    background: #e74c3c;
    color: #fff;
}
.confirm-btn--ok:hover {
    background: #c0392b;
}

@keyframes confirmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes confirmFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes confirmSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}


