:root {
    --primary: #333333;
    --secondary: #999999;
    --accent: #276493;
    --bg-gray: #f2f4f6;
    --indicator-thin: #f2f4f6;
    --border: #e5e5e5;
    --active-blue: #276493;
    --active-text: #ffffff;
    --header-height: 105px; /* JSが読み込まれる前のフォールバック用初期値 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: "Roboto", sans-serif;
    color: var(--primary);
    background: #fff;
    overflow-x: hidden;
    /* JSで計算された実際のヘッダー高さを適用 */
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
    -webkit-user-drag: none;
    user-select: none;
}
a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* --- Common Header & Nav --- */
.site-header {
    background: #fff;
    padding-top: 15px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9000;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 15px;
}
.header-logo img {
    height: 22px;
    display: block;
}

/* Header Actions (Search & Setting) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    height: 40px;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition:
        background-color 0.3s,
        color 0.3s;
}
.header-icon-btn:hover {
    color: #666;
}
.header-icon-btn.active {
    background-color: var(--active-blue);
    color: #fff;
}

/* Search Panel (Animated) */
.search-panel-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition:
        grid-template-rows 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
        opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    background: #fff;
    border-top: 0px solid transparent;
}
.search-panel-wrapper.open {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
    border-top: 1px solid var(--border);
}
.search-panel-wrapper.overflow-visible .search-panel-inner {
    overflow: visible;
}
.search-panel-inner {
    overflow: hidden;
    background: #fff;
}
.search-panel-inner-content {
    padding: 10px 20px;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}
.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.search-submit-icon {
    position: absolute;
    left: 15px;
    color: #ccc;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-clear-btn {
    position: absolute;
    right: 15px;
    width: 24px;
    height: 24px;
    background: #eee;
    color: #999;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    border: none;
    z-index: 1;
}
.search-clear-btn:hover {
    background: #ddd;
    color: #333;
}
.search-input {
    width: 100%;
    padding: 12px 45px;
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    background: #fff;
    transition: border-radius 0.1s;
}
.search-container.open .search-input {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: var(--border);
}

.global-nav {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    background: #fff;
}
.nav-inner {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar {
    display: none;
}
.nav-item {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}
.nav-item:hover {
    color: #000;
}

/* --- Setting Panel (Slide from Right) --- */
.setting-overlay {
    position: fixed;
    /* top, height will be set by JS */
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 8998; /* Behind header (9000) */
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
.setting-overlay.open {
    opacity: 1;
    visibility: visible;
}

.setting-panel {
    position: fixed;
    /* top, height will be set by JS */
    right: -100%;
    width: 100%;
    background: var(--active-blue);
    z-index: 8999; /* Behind header (9000) */
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    padding: 30px 20px;
}
@media (min-width: 769px) {
    .setting-panel {
        width: 50%;
        max-width: 600px;
    }
}
.setting-panel.open {
    right: 0;
}

.setting-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    font-weight: 300;
    line-height: 1;
}
.setting-content {
    margin-top: 50px;
}

.setting-accordion {
    background: #fff;
    border-radius: 20px;
    margin-bottom: 20px;
    overflow: hidden;
}
.setting-accordion-header {
    padding: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.setting-accordion-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #000;
}
.acc-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    transition: 0.3s;
}
.setting-accordion.open .acc-arrow {
    transform: translateY(-50%) rotate(180deg);
}
.setting-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    padding: 0 20px;
}
.setting-accordion.open .setting-accordion-body {
    max-height: 1000px;
    padding-bottom: 20px;
}

.vertical-btn-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cat-btn {
    display: block;
    text-align: center;
    padding: 15px;
    border: 1px solid var(--border);
    background: #fff;
    color: #000;
    font-weight: 700;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
}
.cat-btn.active {
    background: var(--active-blue);
    color: #fff;
    border-color: var(--active-blue);
}

.global-size-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.global-size-label input {
    display: none;
}
.global-size-btn {
    border: 1px solid var(--border);
    padding: 10px 5px;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    color: #333;
}
.global-size-label input:checked + .global-size-btn {
    background: var(--active-blue);
    color: #fff;
    border-color: var(--active-blue);
}

.global-size-actions {
    display: flex;
    gap: 10px;
}
.btn-clear-size,
.btn-apply-size {
    flex: 1;
    padding: 12px;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
}
.btn-clear-size {
    background: #eee;
    color: #333;
}
.btn-apply-size {
    background: #000;
    color: #fff;
}

/* --- TOP: Pickup Section --- */
.pickup-section {
    width: 100%;
    position: relative;
    min-height: 520px;
}
.pickup-pagination {
    position: absolute;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    display: flex;
    gap: 0;
    z-index: 20;
    pointer-events: none;
}
.pickup-pagination .swiper-pagination-bullet {
    flex: 1;
    height: 4px;
    border-radius: 0;
    background: var(--indicator-thin);
    opacity: 1;
    margin: 0 !important;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.4s ease;
}
.pickup-pagination .swiper-pagination-bullet-active {
    background: var(--accent);
}

.pickup-container-split {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 520px;
}

.pickup-left-col {
    flex: 0 0 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}
.pickup-swiper-img {
    width: 100%;
    height: 100%;
}
.pickup-img-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 40px;
}
.pickup-img {
    max-width: 70%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.pickup-right-col {
    flex: 0 0 50%;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}
.pickup-swiper-text {
    width: 100%;
    height: 100%;
}
.pickup-info {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px;
    max-width: 70%;
}

.pickup-label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}
.pickup-info .primary-title {
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 5px;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pickup-info .secondary-title {
    font-size: 20px;
    color: var(--secondary);
    font-style: italic;
    margin-bottom: 25px;
}
.pickup-meta {
    font-size: 13px;
    color: #333;
    margin-bottom: 22px;
    font-weight: 500;
}
.btn-check-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 44px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-weight: 700;
    font-size: 14px;
    color: #111;
    position: relative;
    z-index: 20;
    pointer-events: auto;
}
.btn-check-price:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

/* --- Common Section & Tabs --- */
.container-fluid {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 0;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.section-title {
    font-size: 24px;
    font-weight: 700;
}
.section-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Tabs */
.section-header-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.section-title-tabs {
    display: flex;
    align-items: center;
    gap: 20px;
}
.tab-container {
    display: flex;
    gap: 10px;
}
.tab-btn {
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
    color: #333;
    transition: 0.2s;
}
.tab-btn:hover {
    border-color: #999;
}
.tab-btn.active {
    background: var(--active-blue);
    color: #fff;
    border-color: var(--active-blue);
}
.price-change-content {
    display: none;
}
.price-change-content.active {
    display: block;
}

.view-all {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    text-decoration: underline;
}
.nav-arrows {
    display: flex;
    gap: 15px;
    align-items: center;
}
.nav-arrow {
    cursor: pointer;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.nav-arrow img {
    width: 12px;
    height: auto;
}
.nav-arrow.prev img {
    transform: rotate(90deg);
}
.nav-arrow.next img {
    transform: rotate(-90deg);
}
.slim-pagination {
    width: 100%;
    height: 2px;
    background: var(--indicator-thin);
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}
.slim-pagination-fill {
    position: absolute;
    height: 100%;
    background: var(--accent);
    left: 0;
    transition: 0.3s;
}

/* Product Card */
.product-card {
    display: block;
    background: #fff;
    border: none;
    height: 100%;
}
.pc-img-wrap {
    width: 100%;
    aspect-ratio: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: #ffffff;
}
.pc-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.pc-title {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
    min-height: 2.8em;
    overflow: hidden;
    font-weight: 500;
    color: #333;
}
.primary-title-sm {
    display: block;
}
.secondary-title-sm {
    display: block;
    color: var(--secondary);
    font-style: italic;
    font-size: 11px;
    font-weight: 400;
}
.pc-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}
.pc-price {
    font-size: 20px;
    font-weight: 900;
    color: #000;
}
.price-decimal {
    font-size: 0.7em;
    vertical-align: top;
}
.lbl-cheapest-sm {
    display: block;
    font-size: 10px;
    color: #999;
    margin-bottom: 0px;
}
.badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    text-transform: capitalize;
    line-height: 1.2;
}

/* --- Result Page Styling --- */
.section-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.back-home {
    font-size: 12px;
    color: #333;
    text-decoration: underline;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    align-items: center;
}
.filter-group {
    position: relative;
}
.filter-btn {
    appearance: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: 0.2s;
    min-width: 100px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.filter-btn::after {
    content: "";
    display: inline-block;
    width: 15px;
    height: 9px;
    background: url("../images/arrow.svg") no-repeat center;
    background-size: contain;
    opacity: 0.9;
    transition: transform 0.2s;
}
.filter-btn.active {
    background-color: var(--active-blue);
    color: var(--active-text);
    border-color: var(--active-blue);
}
.filter-btn.active::after {
    filter: brightness(0) invert(1);
}
.filter-group.open .filter-btn::after {
    transform: rotate(180deg);
}

.filter-modal {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 100;
    min-width: 320px;
    width: max-content;
    max-width: 90vw;
}
.filter-group.open .filter-modal {
    display: block;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.modal-title {
    font-size: 18px;
    font-weight: 700;
}
.modal-reset {
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
    color: #000;
}
.modal-desc {
    font-size: 14px;
    margin-bottom: 20px;
    color: #333;
}
.modal-apply-btn {
    margin-top: 20px;
    width: 100%;
    background: #000;
    color: #fff;
    font-weight: 700;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}
.modal-apply-btn:hover {
    opacity: 0.9;
}

.price-slider-wrapper {
    position: relative;
    width: 100%;
    height: 50px;
    margin: 20px 0;
}
.price-slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}
.price-slider-fill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: var(--active-blue);
    border-radius: 2px;
    z-index: 1;
}
.range-input {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    z-index: 2;
    margin: 0;
}
.range-input::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--active-blue);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.range-input::-moz-range-thumb {
    pointer-events: auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--active-blue);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.price-values {
    display: flex;
    justify-content: space-between;
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.price-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
}
.price-field {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 8px 15px;
}
.price-field span {
    color: #ccc;
    margin-right: 5px;
}
.price-field input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 500;
}

.multi-select-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}
.multi-select-grid::-webkit-scrollbar,
.vertical-list::-webkit-scrollbar {
    width: 6px;
}
.multi-select-grid::-webkit-scrollbar-thumb,
.vertical-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}
.vertical-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.check-btn-label {
    position: relative;
    cursor: pointer;
}
.check-btn-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.check-btn-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s;
    background: #fff;
    color: var(--primary);
    text-align: center;
}
.check-btn-label input:checked + .check-btn-display {
    background-color: var(--active-blue);
    color: #fff;
    border-color: var(--active-blue);
}
.check-btn-label:hover .check-btn-display {
    border-color: #999;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: 0.2s;
}
.color-option input {
    display: none;
}
.color-option:hover {
    border-color: #999;
}
.color-option.selected {
    background-color: var(--active-blue);
    border-color: var(--active-blue);
}
.color-option.selected span {
    color: #fff;
}

.color-icon-box {
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
    position: relative;
}
.c-icon {
    width: 100%;
    height: 100%;
    display: block;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}
.c-icon.multi {
    background: url("../images/icon_color_multi.svg") no-repeat center/contain;
}
.c-icon.base {
    -webkit-mask-image: url("../images/icon_color_base.svg");
    mask-image: url("../images/icon_color_base.svg");
}
.color-name {
    font-size: 12px;
    font-weight: 700;
    color: #333;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 50px 30px;
    width: 100%;
}
.clear-all {
    font-size: 12px;
    text-decoration: underline;
    color: #999;
    margin-left: 5px;
}

.btn-load-api {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 40px;
    border: 2px solid #000;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    transition: 0.3s;
    cursor: pointer;
}
.btn-load-api:hover {
    background: #333;
    border-color: #333;
}
.btn-load-api .icon-down {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
    transform: rotate(0deg);
}
.btn-load-api.loading {
    cursor: not-allowed;
    opacity: 0.7;
}
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* --- Product Detail Layout --- */
.detail-layout {
    display: flex;
    gap: 80px;
    max-width: 1400px;
    margin: 40px auto 80px;
    padding: 0 20px;
    align-items: flex-start;
    width: 100%;
}
.detail-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}
.product-hero-swiper {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 4 / 3;
}
.product-hero-swiper .swiper-slide {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.hero-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 50px;
    transition: opacity 0.3s;
}
.hero-controls.hidden {
    display: none;
}
.hero-controls .hero-line {
    flex: 1;
    max-width: 520px;
    height: 2px;
    background: var(--bg-gray);
    position: relative;
    overflow: hidden;
}
.hero-line-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--accent);
    width: 0%;
    transition: 0.3s;
}
.hero-controls .hero-arrow {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #d7dde2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.hero-controls .hero-arrow img {
    width: 14px;
}
.hero-controls .hero-arrow.prev img {
    transform: rotate(90deg);
}
.hero-controls .hero-arrow.next img {
    transform: rotate(-90deg);
}
.detail-right {
    flex: 0 450px;
}
.breadcrumb {
    font-size: 12px;
    color: var(--secondary);
    margin-bottom: 30px;
    font-weight: 500;
}
.breadcrumb a:hover {
    text-decoration: underline;
    color: var(--accent);
}

.detail-header {
    margin-bottom: 20px;
}
.detail-header .primary-title {
    display: block;
    margin-bottom: 10px;
    color: #000;
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
}
.detail-header .secondary-title {
    display: block;
    margin-bottom: 30px;
    color: var(--secondary);
    font-size: 24px;
    font-weight: 700;
    font-style: italic;
}
.detail-note {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 500;
}

.price-block {
    padding-top: 35px;
    border-top: 1px solid var(--border);
}
.lbl-cheapest {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
}
.price-row-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}
.price-left-box {
    display: flex;
    align-items: center;
    gap: 15px;
}
.price-large {
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    color: var(--primary);
}
.price-row-sub {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 12px;
}
.ranking-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    text-decoration: underline;
    color: var(--primary);
}
.ranking-toggle img {
    width: 10px;
    transition: 0.3s;
    transform: rotate(0deg);
}
.ranking-toggle.active img {
    transform: rotate(180deg);
}
.accordion-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.6s ease;
}
.accordion-content.open {
    max-height: 500px;
}
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.ranking-table td {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
}
.btn-shop {
    text-decoration: underline;
    font-weight: 700;
    color: #333;
}

.size-selector-container {
    margin: 15px 0;
    border: 1px solid var(--border);
    border-radius: 36px;
    background: #fff;
    overflow: hidden;
    text-align: center;
    transition:
        border-color 0.2s,
        max-height 0.3s ease;
}
.size-selector-header {
    padding: 12px 22px;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    font-size: 18px;
    gap: 10px;
    z-index: 2;
}
.size-selector-ttl {
    font-weight: 900;
    margin-bottom: 5px;
}
.size-selector-desc {
    font-size: 12px;
    color: var(--secondary);
}
.size-selector-header img {
    top: 30px;
    width: 12px;
    transition: 0.3s;
    transform: rotate(0deg);
    position: absolute;
    right: 22px;
}
.size-selector-container.open .size-selector-header img {
    transform: rotate(180deg);
}
.size-accordion-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.size-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px;
    background: #fff;
    border-top: 1px solid var(--border);
    max-height: 320px;
    overflow-y: auto;
}
.size-dropdown-grid::-webkit-scrollbar {
    width: 6px;
}
.size-dropdown-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.size-selector-container.open {
    border: 2px solid var(--accent);
}
.size-selector-container.open .size-accordion-wrapper {
    max-height: 600px;
}

.size-btn {
    border: 1px solid var(--border);
    padding: 12px 5px;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 900;
    cursor: pointer;
}
.size-btn .s-p {
    font-size: 12px;
    color: var(--accent);
    margin-top: 2px;
}
.size-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.size-btn.active .s-p {
    color: #fff;
}

.btn-go-shop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--accent);
    color: #fff;
    text-align: center;
    padding: 22px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 18px;
    margin-top: 10px;
}
.btn-go-shop img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

/* --- Price Chart Section --- */
.price-chart-section {
    display: flex;
    gap: 40px;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 60px;
}
.chart-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.chart-container-inner {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 300px;
}
.chart-stats {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}
.stat-box {
    background: var(--bg-gray);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}
.stat-label {
    display: block;
    font-size: 14px;
    color: var(--secondary);
    margin-bottom: 10px;
    font-weight: 700;
}
.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
}

@media (max-width: 1024px) {
    .detail-layout,
    .pickup-container-split {
        flex-direction: column;
        align-items: center;
    }
    .detail-right,
    .detail-left,
    .pickup-left-col,
    .pickup-right-col {
        flex: 1;
        width: 100%;
        justify-content: center;
    }
    .header-inner {
        gap: 14px;
    }
    .detail-layout {
        gap: 30px;
        margin: 20px auto 60px;
    }
    .detail-right {
        flex: 1;
        width: 100%;
        max-width: 720px;
    }
    .detail-header .primary-title {
        font-size: 40px;
    }
    .price-large {
        font-size: 52px;
    }
    .search-results-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px 20px;
    }
}
@media (max-width: 768px) {
    /* JSでパディングを制御するため固定値は削除 */
    .header-inner {
        flex-wrap: nowrap;
        padding-bottom: 15px;
    }
    .header-logo {
        flex: 0 0 auto;
    }
    .nav-inner {
        justify-content: flex-start;
        gap: 22px;
        padding: 0 16px;
    }
    .pickup-container-split {
        flex-direction: column;
    }
    .pickup-left-col,
    .pickup-right-col {
        width: 100%;
        height: 50%;
        padding: 0;
    }
    .pickup-img-container {
        padding: 26px 16px;
        justify-content: center;
    }
    .pickup-info {
        padding: 26px 16px;
        max-width: 100%;
        align-items: center;
        text-align: center;
    }
    .pickup-info .primary-title {
        font-size: clamp(20px, 6vw, 34px);
    }
    .pickup-pagination .swiper-pagination-bullet {
        height: 6px;
    }
    .btn-check-price {
        width: 100%;
    }
    .container-fluid {
        width: 92%;
        padding: 40px 0;
    }
    .section-title {
        font-size: 20px;
    }
    .detail-header .primary-title {
        font-size: 34px;
    }
    .detail-header .secondary-title {
        font-size: 18px;
    }
    .price-large {
        font-size: 44px;
    }
    .size-dropdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 15px;
    }
    .filter-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw !important;
        max-width: 380px;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 9999;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        border-radius: 12px;
    }
    .section-header-tabs {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .section-title-tabs {
        width: 100%;
        justify-content: space-between;
    }
    .price-chart-section {
        flex-direction: column;
        padding: 20px;
    }
    .chart-stats {
        flex: auto;
        flex-direction: row;
    }
    .stat-box {
        flex: 1;
        padding: 15px 10px;
    }
    .stat-value {
        font-size: 24px;
    }
}

/* Suggest Box */
.suggest-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-top: none;
    z-index: 2000;
    display: none;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
    border-radius: 0 0 30px 30px;
}
.search-container.open .suggest-box {
    border-top: none;
}
.suggest-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #f2f4f6;
    cursor: pointer;
}
.suggest-item:last-child {
    border-bottom: none;
}
.suggest-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 15px;
    mix-blend-mode: multiply;
}
.suggest-info {
    display: flex;
    flex-direction: column;
}
.suggest-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}
.suggest-price {
    font-size: 11px;
    color: var(--secondary);
}
.suggest-api-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    border-top: 1px solid var(--border);
    background: var(--bg-gray);
    cursor: pointer;
    border-radius: 0 0 30px 30px;
}
.suggest-api-btn:hover {
    color: #fff;
    background: var(--accent);
}
.suggest-api-btn img {
    width: 10px;
    margin-left: 5px;
    transform: rotate(0deg);
    vertical-align: middle;
}

/* --- FOOTER STYLES --- */
.site-footer {
    background-color: var(--bg-gray);
    padding: 60px 0 30px;
    margin-top: auto;
    color: #333;
    width: 100%;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-top {
    margin-bottom: 40px;
}
.footer-logo img {
    height: 24px;
    display: block;
}
.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}
.footer-col {
    display: flex;
    flex-direction: column;
}
.footer-heading {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000;
}
.footer-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-ul li {
    margin-bottom: 10px;
}
.footer-ul li a {
    font-size: 13px;
    color: #333;
    font-weight: 400;
    display: block;
}
.footer-ul li a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.footer-bottom {
    border-top: 1px solid #d7dde2;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #333;
}
.footer-legal {
    display: flex;
    gap: 40px;
}
.footer-legal a {
    color: #333;
}
.footer-legal a:hover {
    text-decoration: underline;
}
.footer-copyright {
    color: #666;
}
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0 20px;
    }
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 20px;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .footer-legal {
        gap: 30px;
        order: 1;
    }
    .footer-copyright {
        order: 2;
        font-size: 11px;
        line-height: 1.4;
    }
}

/* --- Static Pages --- */
.static-page-layout {
    max-width: 900px;
    margin: 60px auto 100px;
    padding: 0 20px;
    width: 100%;
}
.static-hero {
    text-align: center;
    margin-bottom: 50px;
}
.static-hero h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    color: #000;
}
.static-hero p {
    font-size: 18px;
    color: var(--secondary);
    font-style: italic;
}
.static-content {
    line-height: 1.8;
    font-size: 16px;
    color: #444;
}
.static-content h2 {
    font-size: 28px;
    font-weight: 900;
    margin: 50px 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
    color: #000;
}
.static-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 30px 0 15px;
    color: #000;
}
.static-content p {
    margin-bottom: 20px;
}
.static-content ul {
    margin-bottom: 20px;
    padding-left: 25px;
}
.static-content li {
    margin-bottom: 10px;
}
.static-content a {
    color: var(--accent);
    text-decoration: underline;
}
.static-content a:hover {
    text-decoration: none;
}
@media (max-width: 768px) {
    .static-page-layout {
        margin: 40px auto 80px;
    }
    .static-hero h1 {
        font-size: 32px;
    }
    .static-hero p {
        font-size: 16px;
    }
    .static-content h2 {
        font-size: 24px;
        margin: 40px 0 15px;
    }
}
