/* ════════════════════════════════════════════════════════
   B2B White-Label — Product Listing Styles
   Loaded by all-itineraries, collection, destination pages.
   Overrides main-site dark-theme variables to B2B
   white-gold platinum scheme, and styles product cards.
   ════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════
   STRUCTURAL STYLES — B2B Tour Card Layout
   Self-contained layout definitions (same as tour-card.css
   but adapted for B2B; no need to load tour-card.css separately).
   ════════════════════════════════════════════════════════ */

/* ── Card Grid ── */
.card-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0;
}

/* ── Tour Card: desktop horizontal (image-left, content-right) ── */
.tour-card {
    display: flex;
    flex-direction: row;
    border-radius: 12px;
    gap: 24px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* ── Card Image Box ── */
.card-img-box {
    flex: 0 0 25%;
    overflow: hidden;
    position: relative;
    align-self: stretch;
    min-height: 200px;
}
.card-img-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}
.tour-card:hover .card-img-box img {
    transform: scale(1.08);
}

/* ── Image Overlay (subtle gradient) ── */
.card-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.03) 35%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* ── Image English Sub-text ── */
.card-img-sub-en {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.55rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    padding: 0 6px;
    line-height: 1.3;
}

/* ── No Image Placeholder ── */
.no-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    text-align: center;
}

/* ── Card Content ── */
.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 18px 0;
    min-width: 0;
    overflow: hidden;
    justify-content: flex-start;
}

/* ── Content Top Container ── */
.card-content-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Top Row: info-left (location/days) + product type badge ── */
.card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

/* ── Badges ── */
.badge-recommend {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 4px;
    z-index: 10;
    line-height: 1.4;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.badge-days {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    z-index: 10;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ── Card Tag List (bottom-left) ── */
.card-tag-list {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

/* ── Card Tag ── */
.card-tag {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ── Product Type Badge ── */
.card-product-type {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border: 1px solid currentColor;
    opacity: 0.9;
}

/* ── Product Title ── */
.product-card-title-wrap {
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 0;
    flex: 0 0 auto;
}
.product-card-title,
.card-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* ── Card Description ── */
.card-desc {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 8px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── Bottom Info Bar: tags (left) + price (right) ── */
.card-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: auto;
    gap: 12px;
    border-top: 1px solid #E8E0D0;
}

/* ── Info Left: location/days (now in card-top-row) ── */
.card-info-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 0.9rem;
}
.card-info-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.card-info-item i {
    font-size: 0.8rem;
}
.card-info-sep {
    font-size: 0.85rem;
}
/* Nearest departure: desktop hidden, mobile visible */
.card-nearest-departure {
    display: none;
}

/* ── Price Section ── */
.card-price-section {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
}
.card-price-label {
    font-size: 0.82rem;
    letter-spacing: 0.5px;
}
/* Desktop: display:contents lets NT$/number/起 appear inline */
.card-price-row {
    display: contents;
}
.card-price-nt {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.card-price-num {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.card-price-suffix {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════ */

/* ── Override main-site dark CSS variables ── */
:root {
    --black-rich: #FFFFFF;
    --black-pure: #FFFFFF;
    --gray-900: #FAFAF8;
    --gray-850: #F5F5F3;
    --gray-800: #F0ECE4;
    --gray-700: #E8E0D0;
    --gray-600: #D4CFC5;
    --gray-400: #888888;
    --gray-300: #666666;
    --white: #1A1A1A;
    --gold-primary: #C9A962;
    --gold-light: #8B7340;
    --gold-dark: #A67C3A;
    --radius-xl: 16px;
    --radius-lg: 12px;
    --radius-md: 8px;
}

body {
    background-color: #FFFFFF !important;
    color: #1A1A1A !important;
}

/* ── Hero Section (shared across all product pages) ── */
.hero {
    background: linear-gradient(135deg, #f5f5f3 0%, #FAFAF8 100%) !important;
}
.hero-bg { background-image: none !important; }
.hero-content h1 { color: #1A1A1A !important; }
.hero-content h1 em { color: var(--gold-primary) !important; }
.hero-eyebrow { color: var(--gold-primary) !important; }
.hero-subtitle { color: #666 !important; }
.scroll-indicator span { color: #999 !important; }
.scroll-indicator .scroll-line { background: #C9A962 !important; }

/* ── Hero CTA Button (collection page) ── */
.hero-cta {
    background: #C9A962 !important;
    color: #fff !important;
    border-color: #C9A962 !important;
}
.hero-cta:hover {
    background: #A67C3A !important;
}

/* ── Hero Highlight Bar (collection page — .hero-highlight-bar) ── */
.hero-highlight-bar {
    background: transparent !important;
    border-bottom: none !important;
    margin-top: -60px !important;
}
.highlight-grid {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid #E8E0D0 !important;
}
.highlight-item { color: #1A1A1A !important; }
.merit-icon i { color: #C9A962 !important; }
.merit-title { color: #1A1A1A !important; }
.merit-subtitle { color: #666 !important; }
.merit-divider { background: #E8E0D0 !important; }

/* ── Hero Feature Bar (destination page — .hero-feature-bar) ── */
.hero-feature-bar {
    background: transparent !important;
    border-bottom: none !important;
    margin-top: -60px !important;
}
.feature-grid {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid #E8E0D0 !important;
}
.feature-item { color: #1A1A1A !important; }
.feature-icon i { color: #C9A962 !important; }
.feature-title { color: #1A1A1A !important; }
.feature-subtitle { color: #666 !important; }
.feature-divider { background: #E8E0D0 !important; }

/* ── Service Module (collection + destination pages) ── */
.container { background: transparent !important; }
.section-header .eyebrow { color: #C9A962 !important; }
.section-header h2 { color: #1A1A1A !important; }
.section-header p { color: #666 !important; }
.service-grid { gap: 24px !important; }
.service-card {
    background: #FFFFFF !important;
    border: 1px solid #E8E0D0 !important;
    border-radius: 12px !important;
}
.service-card:hover {
    border-color: #C9A962 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important;
}
.service-card .card-number { color: rgba(201,169,98,0.15) !important; }
.service-card .card-icon { color: #C9A962 !important; }
.service-card .card-title { color: #1A1A1A !important; }
.service-card .card-title-en { color: #888 !important; }
.service-card .card-desc { color: #666 !important; }
.service-card .tag {
    background: rgba(201,169,98,0.1) !important;
    border: 1px solid rgba(201,169,98,0.3) !important;
    color: #8B7340 !important;
}
.service-card .select-btn {
    color: #C9A962 !important;
    border-color: #C9A962 !important;
}

/* ── Intro / Showcase Block (collection + destination pages) ── */
.tateyama-intro {
    background: linear-gradient(145deg, #F5F5F3, #FAFAF8) !important;
    border: 1px solid #E8E0D0 !important;
}

/* ── Product Cards (.tour-card) — B2B color theme ── */
.tour-card {
    background: #FFFFFF !important;
    border: 1px solid #E8E0D0 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
    transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s cubic-bezier(.2,.8,.2,1) !important;
}
.tour-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.1), 0 2px 8px rgba(201,169,98,0.1) !important;
    border-color: #C9A962 !important;
}
.card-content { background: transparent !important; }

/* Tag colors — rounded background */
.card-tag {
    color: #5C4A3D !important;
    background: #F9F6F0 !important;
    border-radius: 20px !important;
}
.card-product-type {
    color: #C9A962 !important;
    border-color: #C9A962 !important;
}

/* Title & description */
.product-card-title,
.card-title { color: #1A1A1A !important; }
.card-desc { color: #555555 !important; }

/* Info bar */
.card-info-bar { border-color: rgba(201,169,98,0.3) !important; }
.card-info-left { color: #777777 !important; }
.card-info-item i { color: #C9A962 !important; }
.card-info-sep { color: #D4CFC5 !important; }

/* Price */
.card-price-nt  { color: #B8975D !important; }
.card-price-num { color: #B8975D !important; }
.card-price-suffix { color: #B8975D !important; }
.card-price-label { color: #888 !important; }

/* Badges */
.badge-recommend {
    background: linear-gradient(135deg, #C9A962, #A67C3A) !important;
    color: #fff !important;
    border: none !important;
}
.badge-days {
    background: #C9A962 !important;
    color: #FFFFFF !important;
    border: none !important;
}
/* Placeholder */
.no-image-placeholder {
    background: #F5F5F3 !important;
    color: #999 !important;
    border: 1px dashed #E8E0D0 !important;
}

/* ── Empty States ── */
.japan-container p { color: #999 !important; }
.dpl-empty { color: #999 !important; }

/* ══════════════════════════════════════════════
   Mobile (≤768px): same style as main site
   - image hidden
   - gold border card
   - stacked info with nearest departure date
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* ── Intro block hidden on mobile ── */
    .tateyama-intro { display: none !important; }

    /* ── Card grid ── */
    .card-grid {
        gap: 20px !important;
        padding: 0 !important;
    }

    /* ── Each card: remove image, show gold-border card ── */
    .tour-card {
        height: auto !important;
        border-radius: 8px !important;
        gap: 0 !important;
        background: #FFFFFF !important;
        border: 1px solid #C9A962 !important;
        box-shadow: none !important;
        transform: none !important;
    }
    .tour-card:hover {
        transform: none !important;
        box-shadow: none !important;
        border-color: #C9A962 !important;
    }

    /* ── Hide card image on mobile ── */
    .card-img-box {
        display: none !important;
    }

    /* ── Content: stacked column ── */
    .card-content {
        padding: 14px 16px !important;
        justify-content: flex-start !important;
        background: transparent !important;
    }

    .card-content-top {
        gap: 4px !important;
    }

    /* ── Top row: info left + product type ── */
    .card-top-row {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        margin-bottom: 2px !important;
    }

    /* ── Info left: location/days on mobile ── */
    .card-info-left {
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 500 !important;
        font-size: 12px !important;
        color: #777777 !important;
        gap: 4px !important;
    }
    .card-info-item {
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 500 !important;
        font-size: 12px !important;
        gap: 3px !important;
    }
    .card-info-item i {
        font-size: 12px !important;
        color: #C9A962 !important;
    }
    .card-info-sep { display: none !important; }

    /* ── Product type badge ── */
    .card-product-type {
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 400 !important;
        font-size: 11px !important;
        color: #8B7340 !important;
        background: rgba(201,169,98,0.1) !important;
        border-color: rgba(201,169,98,0.3) !important;
    }

    .product-card-title-wrap {
        max-width: 100% !important;
        overflow: visible !important;
        margin-bottom: 2px !important;
    }

    /* ── Title ── */
    .product-card-title,
    .card-title {
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 700 !important;
        font-size: 17px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        overflow: visible !important;
        text-overflow: unset !important;
        white-space: normal !important;
        color: #1A1A1A !important;
    }

    /* ── Description ── */
    .card-desc {
        display: block !important;
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 300 !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin-bottom: 4px !important;
        color: #555555 !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        -webkit-line-clamp: unset !important;
        flex: none !important;
    }

    /* ── Info bar (bottom): tags left / price right ── */
    .card-info-bar {
        border-top: none !important;
        padding-top: 8px !important;
        margin-top: 6px !important;
        justify-content: space-between !important;
        align-items: flex-end !important;
        gap: 8px !important;
    }

    /* ── Tag list (bottom-left on mobile) ── */
    .card-tag-list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    /* ── Tags: warm pill on mobile ── */
    .card-tag {
        display: inline-block !important;
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 400 !important;
        font-size: 11px !important;
        letter-spacing: 0.5px !important;
        white-space: normal !important;
        color: #5C4A3D !important;
        background: #F9F6F0 !important;
        border-radius: 20px !important;
        padding: 2px 8px !important;
        flex: none !important;
    }

    /* ── Nearest departure: visible on mobile ── */
    .card-nearest-departure {
        display: block !important;
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 300 !important;
        font-size: 12px !important;
        color: #666 !important;
        margin: 2px 0 0 !important;
        line-height: 1.4 !important;
        width: 100% !important;
    }

    /* ── Price section: column ── */
    .card-price-section {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0 !important;
        flex-shrink: 0 !important;
    }
    .card-price-label {
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 300 !important;
        font-size: 11px !important;
        color: #B8975D !important;
        letter-spacing: 0 !important;
        display: block !important;
        margin-bottom: -10px !important;
        line-height: 1 !important;
    }
    .card-price-row {
        display: flex !important;
        align-items: baseline !important;
        gap: 1px !important;
    }
    .card-price-nt {
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 500 !important;
        font-size: 12px !important;
        color: #B8975D !important;
        letter-spacing: normal !important;
    }
    .card-price-num {
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 700 !important;
        font-size: 20px !important;
        color: #B8975D !important;
        letter-spacing: normal !important;
    }
    .card-price-suffix {
        font-family: 'Noto Sans TC', sans-serif !important;
        font-weight: 300 !important;
        font-size: 12px !important;
        color: #B8975D !important;
    }

    /* ── Badges ── */
    .badge-recommend {
        top: 8px !important;
        left: 8px !important;
        font-size: 8px !important;
        padding: 3px 7px !important;
    }
    .badge-days {
        top: 8px !important;
        right: 8px !important;
        font-size: 8px !important;
        padding: 3px 7px !important;
    }
}
