/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #00A3FF;
    --primary-red: #FF6B6B;
    --line-green: #06C755;
    --dark-bg: #2C2C2C;
    --gray-bg: #F8F9FA;
    --text-dark: #2C2C2C;
    --text-gray: #6C757D;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.8);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    height: 68px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

.header-container {
    width: 100%;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white);
}

.logo-image {
    height: 28px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 19px;
    padding: 0;
    max-width: 300px;
    width: 100%;
    height: 38px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 18px;
    font-size: 13px;
    color: var(--text-dark);
    min-width: 0;
    height: 100%;
}

.search-input::placeholder {
    color: #999;
}

.search-input:focus {
    outline: none;
}

.search-button {
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-button:hover {
    color: var(--primary-blue);
}

.search-button svg {
    width: 16px;
    height: 16px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 9px;
    background: var(--primary-blue);
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 0;
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
}

.hamburger:hover {
    background: #0088dd;
}

.hamburger span {
    height: 1px;
    background: var(--white);
    border-radius: 0;
    transition: all 0.3s ease;
    display: block;
    margin-right: 8px;
}

.hamburger .line-long {
    width: 30px;
}

.hamburger .line-short {
    width: 18px;
}

.hamburger.active {
    background: #0088dd;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    padding: 80px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 18px 20px;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
}

.mobile-nav a:hover {
    background: var(--gray-bg);
    padding-left: 25px;
}

/* Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    min-height: 500px;
    padding-top: 80px;
    margin-top: -80px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #1d1d1d;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: 100%;
    max-width: none;
    object-fit: contain;
    z-index: 0;
}

.hero-content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 80px 40px 80px 10%;
    color: var(--white);
}

.hero-badge-wrapper {
    margin-bottom: 20px;
    display: inline-block;
}

.hero-badge {
    display: block;
    background: var(--white);
    color: var(--primary-blue);
    padding: 12px 40px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
}

.hero-main-text {
    font-size: 80px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: 4px;
}

.hero-keywords {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    width: fit-content;
}

.keyword-box {
    display: inline-block;
    background: var(--primary-blue);
    color: var(--white);
    padding: 0 4px 4px 8px;
    font-size: 80px;
    font-weight: 900;
    border-radius: 4px;
    letter-spacing: 4px;
    line-height: 1.2;
}

.keyword-text {
    font-size: 80px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 4px;
}

.hero-english {
    font-size: 20px;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 1px;
    font-family: 'Arial', sans-serif;
}

/* LINE バナー */
.hero-line-banner {
    position: absolute;
    bottom: 160px;
    right: 0;
    z-index: 2;
    text-decoration: none;
    display: block;
}

.line-banner-content {
    background: var(--line-green);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 4px 0 0 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.hero-line-banner:hover .line-banner-content {
    transform: translateX(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.line-banner-text {
    color: var(--white);
}

.line-banner-small {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    line-height: 1;
}

.line-banner-large {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
}

.line-banner-icon {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.line-banner-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 34px;
}

.section-subtitle {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 8px;
    letter-spacing: 0.08em;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
    line-height: 1.2;
}

.section-description {
    font-size: 12px;
    color: #2ec6ff;
    font-style: italic;
}

/* Carousel Strip */
.carousel-section {
    position: relative;
    margin-top: 0;
    z-index: 15;
    padding: 12px 0;
    background: #2a2f3a;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 8px;
    transition: none;
    will-change: transform;
    padding: 0 8px;
}

.carousel-slide {
    width: 172px;
    height: 95px;
    flex-shrink: 0;
    overflow: hidden;
    background: #3a3f4a;
    border-radius: 2px;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.placeholder-slide img {
    opacity: 0.4;
}

/* Category + Pick Up */
.showcase-section {
    position: relative;
    padding: 48px 20px 56px;
    background-color: #3d4654;
    background-image: url("https://placehold.jp/1600x1200.png?text=Category+Pick+UP+Background");
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    overflow: hidden;
}

.showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(45, 52, 64, 0.65) 0%, rgba(50, 57, 70, 0.72) 100%);
}

.showcase-content {
    position: relative;
    z-index: 1;
}

.showcase-header .section-title {
    font-size: 40px;
}

.category-title {
    margin-bottom: 18px;
    text-align: left;
}

.category-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 42px;
}

.category-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 6px;
    min-height: 140px;
    padding: 18px 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-icon {
    width: 52px;
    height: 72px;
    flex-shrink: 0;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    text-align: center;
}

.category-corner {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 14px;
    height: 14px;
    background: #00a8e8;
    border-radius: 3px 0 6px 0;
}

.pickup-title {
    margin-bottom: 18px;
    text-align: left;
}

.pickup-title h3 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.pickup-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.pickup-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pickup-card:hover {
    transform: translateY(-4px);
}

.pickup-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #00b8ff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    z-index: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.pickup-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e5e7eb;
}

.pickup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pickup-info {
    padding: 12px 12px 14px;
}

.pickup-info h4 {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 3px;
    color: #111827;
    line-height: 1.5;
}

.card-number {
    font-size: 9px;
    color: #64748b;
    margin-bottom: 9px;
    line-height: 1.4;
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.price-label {
    font-size: 9px;
    color: #dc2626;
    font-weight: 700;
}

.price-value {
    font-size: 32px;
    font-weight: 900;
    color: #dc2626;
    letter-spacing: -0.03em;
    line-height: 0.95;
}

.view-all-button-container {
    text-align: center;
}

.view-all-button {
    display: inline-block;
    min-width: 280px;
    padding: 13px 40px;
    border-radius: 999px;
    text-decoration: none;
    background: linear-gradient(90deg, #00b4ff 0%, #0095e0 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 160, 230, 0.4);
    transition: transform 0.2s ease;
}

.view-all-button:hover {
    transform: translateY(-2px);
}

/* Flow Section */
.flow-section {
    padding: 64px 20px 76px;
    background: #f5f6f7;
}

.flow-section .section-header {
    margin-bottom: 32px;
}

.flow-section .section-subtitle {
    color: #94a3b8;
}

.flow-section .section-title {
    color: #111827;
    font-size: 42px;
}

.flow-section .section-description {
    color: #3b9ed1;
}

.flow-steps {
    max-width: 980px;
    margin: 0 auto;
    position: relative;
    padding-left: 52px;
}

.flow-steps::before {
    content: '';
    position: absolute;
    left: 64px;
    top: 72px;
    bottom: 72px;
    width: 3px;
    background: #111827;
    z-index: 2;
    display: none;
}

.flow-step {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 0;
    margin-bottom: 14px;
    width: 800px;
    max-width: 100%;
    position: relative;
    background: #fff;
    border-radius: 4px;
    box-shadow: 12px 14px 26px rgba(15, 23, 42, 0.2);
    overflow: visible;
    align-items: stretch;
}

.flow-step::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 48px;
    bottom: -14px;
    width: 3px;
    background: #111827;
    z-index: 2;
}

.flow-step:last-child::before {
    display: none;
}

.flow-step-number {
    position: absolute;
    left: -14px;
    top: -10px;
    width: 58px;
    height: 58px;
    border-radius: 4px;
    background: #1a1f2b;
    color: #fff;
    font-size: 36px;
    font-weight: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3;
    line-height: 1;
}

.flow-step-number::before {
    content: 'Flow';
    font-size: 9px;
    font-weight: 700;
    margin-bottom: 1px;
    letter-spacing: 0.02em;
}

.flow-step-content {
    position: relative;
    z-index: 1;
    padding: 24px 28px 24px 64px;
}

.flow-step-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #0f77b5;
    margin-bottom: 14px;
    line-height: 1.35;
}

.flow-step-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #1f2937;
    margin-bottom: 10px;
}

.note {
    font-size: 14px;
    color: #1f2937;
}

.line-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 34px;
    border-radius: 999px;
    background: #06c755;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    margin-top: 14px;
    box-shadow: 0 8px 16px rgba(6, 199, 85, 0.36);
    transition: transform 0.2s ease;
}

.line-button:hover {
    transform: translateY(-2px);
}

.line-icon {
    width: 20px;
    height: 20px;
}

.requirements {
    margin-top: 10px;
}

.requirement-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.requirement-number {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3ba9df;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flow-step-image {
    width: 320px;
    height: auto;
    min-height: 160px;
    background: #e5e7eb;
    flex-shrink: 0;
}

.flow-step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flow-step[data-step="04"] .flow-step-image img {
    object-position: center 22%;
}

/* Footer */
.footer {
    background: #0f141d;
    color: #fff;
    padding: 18px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 7px;
}

.footer-logo .logo-text {
    font-size: 13px;
    font-weight: 500;
}

.footer-logo .logo-subtitle {
    font-size: 10px;
    opacity: 0.75;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.footer-nav a {
    color: #fff;
    opacity: 0.8;
    text-decoration: none;
    font-size: 10px;
    transition: opacity 0.2s ease;
}

.footer-nav a:hover {
    opacity: 1;
}

/* LINE Fixed Button (Mobile) */
.line-fixed-button {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
}

.line-button-fixed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px;
    background: #06c755;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1240px) {
    .header-container {
        width: 100%;
        max-width: 1200px;
    }

    .container {
        width: 100%;
        max-width: 1200px;
    }
}

@media (max-width: 900px) {
    .hero-content-wrapper {
        padding: 72px 24px 64px 7%;
    }

    .carousel-slide {
        width: 152px;
        height: 85px;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pickup-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .showcase-header .section-title,
    .flow-section .section-title {
        font-size: 34px;
    }

    .flow-steps {
        padding-left: 70px;
    }

    .flow-steps::before {
        left: 28px;
    }

    .flow-step {
        grid-template-columns: 1fr 240px;
    }

    .flow-step-number {
        width: 56px;
        height: 56px;
        font-size: 18px;
    }

    .price-value {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .header-container {
        gap: 12px;
        padding: 0 14px;
    }

    .header-search {
        max-width: 220px;
    }

    .hero {
        min-height: 420px;
    }

    .hero-content-wrapper {
        padding: 56px 14px 42px 14px;
    }

    .hero-badge {
        font-size: 12px;
        padding: 9px 16px;
    }

    .hero-main-text,
    .keyword-box,
    .keyword-text {
        font-size: 44px;
        letter-spacing: 2px;
    }

    .hero-english {
        font-size: 13px;
    }

    .hero-line-banner {
        bottom: 22px;
        right: 10px;
    }

    .line-banner-content {
        padding: 12px;
        gap: 10px;
    }

    .line-banner-small {
        font-size: 10px;
    }

    .line-banner-large {
        font-size: 14px;
    }

    .line-banner-icon {
        width: 42px;
        height: 42px;
    }

    .carousel-slide {
        width: 120px;
        height: 68px;
    }

    .showcase-section {
        padding: 42px 14px 48px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .pickup-info h4 {
        font-size: 12px;
    }

    .card-number {
        font-size: 10px;
    }

    .price-value {
        font-size: 28px;
    }

    .flow-section {
        padding: 48px 14px 72px;
    }

    .flow-steps {
        padding-left: 0;
    }

    .flow-steps::before {
        display: none;
    }

    .flow-step {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .flow-step::before {
        display: none;
    }

    .flow-step-number {
        position: static;
        width: 100%;
        height: 48px;
        border-radius: 4px 4px 0 0;
        font-size: 16px;
    }

    .flow-step-content {
        border-radius: 0;
    }

    .flow-step-image {
        width: 100%;
        min-height: 180px;
        border-radius: 0 0 4px 4px;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .footer-nav {
        flex-wrap: wrap;
        gap: 10px 14px;
    }

    .line-fixed-button {
        display: block;
    }
}

@media (max-width: 480px) {
    .header-search {
        max-width: 160px;
        height: 34px;
    }

    .search-input {
        font-size: 11px;
    }

    .search-button {
        width: 34px;
        height: 34px;
    }

    .hamburger {
        width: 42px;
        height: 42px;
    }

    .hero-main-text,
    .keyword-box,
    .keyword-text {
        font-size: 35px;
    }

    .section-title {
        font-size: 30px;
    }

    .showcase-header .section-title,
    .flow-section .section-title {
        font-size: 30px;
    }
}

/* Buylist Search Page */
.buylist-page {
    background: #f4f7fb;
    min-height: calc(100vh - 68px);
    padding: 32px 0 56px;
}

/* 詳細ページ: 下に「買取の流れ」が続くので、ページ下余白の代わりに流れの上にグレー背景の余白を置く */
.buylist-page--with-flow {
    padding-bottom: 0;
}

.buylist-page--with-flow .gc-flow {
    margin-top: 56px;
}

.buylist-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}

.buylist-sidebar,
.buylist-results {
    min-width: 0; /* grid 子要素が中身 (表の min-width) に引きずられて広がらないようにする */
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.buylist-title {
    font-size: 24px;
    margin-bottom: 16px;
}

.buylist-filter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buylist-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.buylist-input,
.buylist-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
}

.buylist-category-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    color: #0f172a;
}

.buylist-category-trigger:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.buylist-category-trigger-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.buylist-category-trigger-hint {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: #00A0EA;
}

body.buylist-cat-modal-open {
    overflow: hidden;
}

.buylist-cat-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.buylist-cat-modal.is-open {
    display: flex;
}

.buylist-cat-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
}

.buylist-cat-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    max-height: min(85vh, 640px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.buylist-cat-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.buylist-cat-modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.buylist-cat-modal-close {
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0 4px;
}

.buylist-cat-modal-close:hover {
    color: #0f172a;
}

.buylist-cat-modal-body {
    overflow-y: auto;
    padding: 12px 14px 16px;
    -webkit-overflow-scrolling: touch;
}

.buylist-cat-modal-empty {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.buylist-cat-tree {
    margin-bottom: 0;
}

.buylist-cat-branch {
    margin-bottom: 6px;
}

.buylist-cat-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding-left: calc(var(--buylist-cat-depth, 0) * 14px);
}

.buylist-cat-toggle {
    flex-shrink: 0;
    width: 36px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    box-sizing: border-box;
}

.buylist-cat-toggle:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
    color: #0f172a;
}

.buylist-cat-toggle-icon {
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent currentColor;
    transform-origin: 35% 50%;
    transition: transform 0.15s ease;
}

.buylist-cat-toggle[aria-expanded="true"] .buylist-cat-toggle-icon {
    transform: rotate(90deg);
}

.buylist-cat-toggle-spacer {
    flex-shrink: 0;
    width: 36px;
    min-height: 40px;
}

.buylist-cat-pick-label {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.buylist-cat-pick-hint {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.buylist-cat-children {
    margin-top: 2px;
}

.buylist-cat-children:not(.is-expanded) {
    display: none;
}

.buylist-cat-children.is-expanded {
    display: block;
}

.buylist-cat-pick-all {
    width: 100%;
    margin-bottom: 0;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 400;
    color: #0f172a;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
}

.buylist-cat-modal-body > .buylist-cat-pick-all {
    margin-top: 10px;
}

.buylist-cat-pick-all:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.buylist-cat-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
}

.buylist-cat-pick:hover {
    border-color: #00A0EA;
    color: #00A0EA;
    background: #EAF6FD;
}

.buylist-cat-pick-all.buylist-cat-pick {
    display: block;
    width: 100%;
    flex: none;
}

.buylist-cat-pick-all.buylist-cat-pick:hover {
    color: #0f172a;
}

.buylist-price-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.buylist-submit {
    margin-top: 8px;
    border: none;
    background: #00A0EA;
    color: #fff;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.buylist-submit:hover {
    background: #0088dd;
}

.buylist-results-head {
    margin-bottom: 14px;
    font-size: 14px;
    color: #64748b;
}

.buylist-card-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.buylist-section-heading.buylist-card-grid-fullrow {
    grid-column: 1 / -1;
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.35rem;
}

.buylist-card-grid > .buylist-section-heading:first-child {
    margin-top: 0;
}

.buylist-table-section td {
    font-weight: 700;
    background: #f8fafc;
    font-size: 0.875rem;
    color: #334155;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.buylist-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

/* 枠内に全体を収め、横方向の欠けを出さない（contain + 明示的な高さ） */
.buylist-card-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 88px;
    height: clamp(96px, 16vw, 172px);
    max-height: 172px;
    background: #e8eef5;
    padding: 5px 6px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.buylist-card-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.buylist-card-body {
    padding: 6px 8px 8px;
}

.buylist-product-link {
    display: inline-block;
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.45;
}

/* カード形式（6列）用：タイトル・価格をコンパクトに */
.buylist-card .buylist-product-link {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.buylist-product-link:hover {
    text-decoration: underline;
}

.buylist-code {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.buylist-price {
    margin-top: 8px;
    color: #dc2626;
    font-weight: 900;
    font-size: 27px;
    line-height: 1.1;
}

.buylist-card .buylist-price {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    word-break: break-all;
}

.buylist-grade-b-reference--list {
    margin-top: 4px;
    margin-bottom: 0;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.buylist-card .buylist-grade-b-reference--list {
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
}

.buylist-price-cell .buylist-price {
    margin-top: 0;
}

.buylist-table-wrap {
    overflow-x: auto;
}

.buylist-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.buylist-table th,
.buylist-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 8px;
    text-align: left;
    vertical-align: middle;
}

.buylist-table td.buylist-table-cell-image {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
    padding: 10px 12px;
}

.buylist-table-cell-image a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 104px;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 4px;
    box-sizing: border-box;
}

.buylist-table th {
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
}

.buylist-table thead th:first-child {
    text-align: center;
    width: 104px;
}

/* SP 用のカテゴリ表示 (商品名の下)。PC では列があるので隠す */
.buylist-table-category-sp {
    display: none;
}

.buylist-table-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 4px;
    display: block;
}

.buylist-empty {
    padding: 24px 0;
    color: #64748b;
    text-align: center;
    word-break: normal;
    overflow-wrap: break-word;
}

/* カードグリッド内の空表示は1列目に乗らないよう全幅（狭いセルで「商」「品」に分断されない） */
.buylist-card-grid > .buylist-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 32px 16px;
    font-size: 15px;
    line-height: 1.6;
}

.buylist-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.buylist-page-btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #0f172a;
    text-decoration: none;
    font-size: 13px;
}

.buylist-page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.buylist-page-current {
    font-size: 13px;
    color: #334155;
}

.buylist-detail-wrap {
    max-width: 1000px;
}

.buylist-back-link {
    display: inline-block;
    margin-bottom: 14px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
}

.buylist-detail-card {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.buylist-detail-image-wrap {
    /* 商品画像は縦横比がまちまちなので、切り抜かずに全体を収める (背景は Amazon 画像の白地に合わせる) */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.buylist-detail-image {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    display: block;
}

.buylist-detail-category {
    color: #64748b;
    font-size: 13px;
}

.buylist-detail-title {
    margin-top: 6px;
    font-size: 28px;
    line-height: 1.4;
}

.buylist-detail-price-label {
    margin-top: 22px;
    font-size: 13px;
    color: #dc2626;
    font-weight: 700;
}

.buylist-detail-price {
    color: #dc2626;
    font-size: 44px;
    font-weight: 900;
    line-height: 1.1;
}

.buylist-detail-grade-b-reference {
    margin-top: 10px;
    margin-bottom: 0;
    color: #2563eb;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.buylist-detail-line-btn {
    margin-top: 24px;
}

.buylist-page .p-index-flow-buylist {
    background: #f4f7fb;
}

/* 結果エリアが狭いときは列数を段階的に減らす */
@media (max-width: 1400px) {
    .buylist-card-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .buylist-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 1100px) {
    .buylist-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .buylist-layout {
        grid-template-columns: 1fr;
    }

    /* 1カラム時は検索ブロックを一覧・詳細の下 (買取の流れの上) に回す */
    .buylist-results {
        order: 1;
    }

    .buylist-sidebar {
        order: 2;
    }

    /* 1カラム化で結果エリアが広いので 4 列 */
    .buylist-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .buylist-detail-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .buylist-page {
        padding: 18px 0 32px;
    }

    .buylist-page--with-flow {
        padding-bottom: 0;
    }

    .buylist-page--with-flow .gc-flow {
        margin-top: 32px;
    }

    .buylist-sidebar,
    .buylist-results {
        padding: 14px;
    }

    .buylist-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .buylist-card .buylist-product-link {
        font-size: 12px;
        -webkit-line-clamp: 4;
    }

    .buylist-card .buylist-price {
        font-size: 16px;
    }

    /* 表形式: 横スクロールさせず画面幅に収める。カテゴリ列は畳んで商品名の下に出す */
    .buylist-table {
        min-width: 0;
        table-layout: fixed;
    }

    .buylist-table th,
    .buylist-table td {
        padding: 8px 4px;
    }

    .buylist-table td.buylist-table-cell-image {
        padding: 8px 6px 8px 0;
    }

    .buylist-table thead th:first-child {
        width: 60px;
    }

    .buylist-table-cell-image a {
        width: 54px;
        height: 74px;
        padding: 3px;
    }

    .buylist-table-cell-category {
        display: none;
    }

    .buylist-table-category-sp {
        display: block;
        margin-top: 4px;
        font-size: 11px;
        color: #64748b;
    }

    .buylist-table .buylist-product-link {
        font-size: 13px;
        line-height: 1.4;
    }

    .buylist-table thead th:last-child {
        width: 88px;
    }

    .buylist-price-cell .buylist-price {
        font-size: 16px;
    }

    .buylist-price-cell .buylist-grade-b-reference--list {
        font-size: 10px;
    }

    .buylist-detail-title {
        font-size: 22px;
    }

    .buylist-detail-price {
        font-size: 34px;
    }

    .buylist-detail-grade-b-reference {
        font-size: 16px;
    }
}

.buylist-detail-line-btn .c-service-preparing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    min-height: 48px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    color: #5a6473;
    text-align: center;
    background: #eef2f7;
    border-radius: 24px;
}

/* 買取詳細: 商品属性 (メーカー・型番・JAN など、値があるものだけ表示) */
.buylist-detail-attrs {
    margin: 14px 0 0;
    padding: 12px 0 2px;
    border-top: 1px solid #e5e7eb;
}

.buylist-detail-attr {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.5;
}

.buylist-detail-attr__label {
    flex-shrink: 0;
    min-width: 6em;
    color: #64748b;
    font-weight: 600;
}

.buylist-detail-attr__value {
    margin: 0;
    color: #0f172a;
    word-break: break-all;
}

/* 買取詳細: 価格未設定の商品は価格の代わりに LINE 仮査定ボタン */
.buylist-detail-estimate {
    margin-top: 6px;
}

.buylist-detail-estimate__note {
    margin: 0 0 12px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.buylist-detail-estimate__btn {
    font-size: 16px;
    height: 54px;
    padding: 0 36px 0 60px;
}

/* 買取詳細: グレード群ごとの買取価格レンジ */
.buylist-detail-grades {
    margin: 4px 0 0;
}

.buylist-detail-grade {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-top: 6px;
}

.buylist-detail-grade__label {
    flex-shrink: 0;
    min-width: 6.5em;
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.buylist-detail-grade__price {
    margin: 0;
    color: #dc2626;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
}

@media (max-width: 767px) {
    .buylist-detail-grade {
        flex-direction: column;
        gap: 0;
        margin-top: 10px;
    }

    .buylist-detail-grade__price {
        font-size: 26px;
    }
}
