/* ========================================
   商品一覧（archive-product）クラシックスタイル
   ======================================== */

.jof-archive-product {
    --jof-archive-text: #333;
    --jof-archive-muted: #666;
    --jof-archive-border: #bbb;
    --jof-archive-bg: #f8f8f8;
}

/* ----- ヒーロースライダー（横幅いっぱい） ----- */
.jof-archive-product .hero-slider {
    position: relative;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 2.5rem;
    overflow: hidden;
    border-top: 1px solid var(--jof-archive-border);
    border-bottom: 1px solid var(--jof-archive-border);
}

.jof-archive-product .hero-track {
    display: flex;
    transition: transform 0.5s ease-out;
}

.jof-archive-product .hero-slide {
    flex: 0 0 100%;
    min-width: 0;
}

.jof-archive-product .hero-visual {
    width: 100%;
    min-height: 280px;
    aspect-ratio: 16 / 6;
    background-size: cover;
    background-position: center;
}

.jof-archive-product .hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border: 1px solid var(--jof-archive-border);
    background: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.jof-archive-product .hero-arrow:hover {
    background: var(--jof-archive-bg);
}

.jof-archive-product .hero-arrow--prev {
    left: 0.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");
    background-size: 20px;
    background-position: center;
    background-repeat: no-repeat;
}

.jof-archive-product .hero-arrow--next {
    right: 0.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
    background-size: 20px;
    background-position: center;
    background-repeat: no-repeat;
}

.jof-archive-product .hero-dots {
    position: absolute;
    bottom: 1.25rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 10;
}

.jof-archive-product .hero-dot {
    width: 8px;
    height: 8px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
}

.jof-archive-product .hero-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.jof-archive-product .hero-dot--active {
    background: #fff;
}

/* ----- セクション ----- */
.jof-archive-product .section {
    max-width: 1200px;
    padding-bottom: 5rem;
}

.jof-archive-product .section-title {
    margin: 0 0 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    color: var(--jof-archive-text);
    border-bottom: 1px solid var(--jof-archive-border);
    padding-bottom: 0.5rem;
}

/* ----- フィルター＋商品レイアウト ----- */
.jof-archive-product .product-filter-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

.jof-archive-product .filter-sidebar {
    position: sticky;
    top: 6rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--jof-archive-border);
}

.jof-archive-product .filter-block {
    margin-bottom: 1.5rem;
}

.jof-archive-product .filter-block:last-of-type {
    margin-bottom: 1.25rem;
}

.jof-archive-product .filter-title {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--jof-archive-text);
    border-bottom: 1px solid var(--jof-archive-border);
    padding-bottom: 0.35rem;
}

.jof-archive-product .filter-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.jof-archive-product .filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--jof-archive-text);
}

.jof-archive-product .filter-option input {
    margin: 0;
    cursor: pointer;
}

/* common.css の appearance: none で消えるため、ラジオを表示 */
.jof-archive-product .filter-option input[type="radio"] {
    -webkit-appearance: radio;
    appearance: radio;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.jof-archive-product .filter-option:hover {
    color: #000;
}

.jof-archive-product .filter-reset {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 0;
    border: 1px solid var(--jof-archive-border);
    background: #fff;
    color: var(--jof-archive-text);
    cursor: pointer;
    transition: background 0.2s;
}

.jof-archive-product .filter-reset:hover {
    background: var(--jof-archive-bg);
}

.jof-archive-product .btn-outline {
    background: #fff;
    color: var(--jof-archive-text);
    border: 1px solid var(--jof-archive-border);
}

.jof-archive-product .btn-outline:hover {
    background: var(--jof-archive-bg);
    color: var(--jof-archive-text);
}

.jof-archive-product .filter-main {
    min-width: 0;
}

.jof-archive-product .filter-result-count {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--jof-archive-muted);
}

.jof-archive-product .filter-no-result {
    margin: 2rem 0;
    padding: 1rem;
    text-align: center;
    color: var(--jof-archive-muted);
    border: 1px solid var(--jof-archive-border);
    background: var(--jof-archive-bg);
}

/* ----- 商品グリッド ----- */
.jof-archive-product .product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.jof-archive-product .product-card {
    transition: opacity 0.25s, visibility 0.25s;
}

.price {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 20px !important;
    text-align: left !important;
}

.price .amount,
.price .woocommerce-Price-amount,
.woocommerce-Price-amount {
    font-weight: 600 !important;
    color: #333 !important;
}

.price .woocommerce-Price-currencySymbol,
.woocommerce-Price-currencySymbol {
    font-weight: 600 !important;
    color: #333 !important;
}

.price bdi {
    color: #333 !important;
    font-weight: 600 !important;
}

.price:not(:has(ins)) .amount,
.price:not(:has(ins)) .woocommerce-Price-amount {
    color: #333 !important;
}

.jof-archive-product .product-card a {
    /* max-width: 300px; */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.jof-archive-product .product-card a:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.jof-archive-product .product-card a .woocommerce-loop-product__link {
    display: block;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

.jof-archive-product .product-card a .woocommerce-loop-product__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.jof-archive-product .product-card a .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: 600;
    margin: 10px 0;
    color: #333;
    line-height: 1.4;
}

.jof-archive-product .product-card a .price {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 10px 0;
}

.jof-archive-product .product-card a .price:not(:has(ins)) {
    color: #333;
}

.jof-archive-product .product-card a .button {
    background: #009fb5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: auto;
    width: 100%;
}

.jof-archive-product .product-card a .button:hover {
    background: #005081;
}

.jof-archive-product .product-card a {
    position: relative;
}

.jof-archive-product .related.products h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-align: left;
}

.jof-archive-product .product-card--hidden {
    display: none;
}

.jof-archive-product .product-card a {
    display: block;
    background: #fff;
    border: 1px solid var(--jof-archive-border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}

.jof-archive-product .product-card a:hover {
    border-color: #888;
}

.jof-archive-product .product-image {
    aspect-ratio: 1;
    background: var(--jof-archive-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.jof-archive-product .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jof-archive-product .product-name {
    margin: 0;
    padding: 0.75rem 0.75rem 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    color: #009fb5;
}

.jof-archive-product .product-price {
    margin: 0;
    padding: 0 0.75rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--jof-archive-text);
}

.jof-archive-product .product-price .tax {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--jof-archive-muted);
}

/* ----- レスポンシブ ----- */
@media (max-width: 900px) {
    .jof-archive-product .hero-visual {
        min-height: 220px;
        aspect-ratio: 16 / 7;
    }

    .jof-archive-product .hero-arrow--prev {
        left: 0.5rem;
    }

    .jof-archive-product .hero-arrow--next {
        right: 0.5rem;
    }

    .jof-archive-product .product-filter-layout {
        grid-template-columns: 1fr;
    }

    .jof-archive-product .filter-sidebar {
        position: static;
    }

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

@media (max-width: 640px) {
    .jof-archive-product .product-grid {
        grid-template-columns: 1fr;
    }
}