/* =========================================
   WOOOLY ANJO
   商品紹介ページ
========================================= */


/* 商品ページ全体 */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 120px;
}


/* ページヘッダー */

.page-header {
    max-width: 850px;
    margin: 0 auto 50px;
    text-align: center;
}


.page-kicker {
    margin: 0 0 12px;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: #a99582;
}


.page-header h1 {
    margin: 0 0 28px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.08em;
}


.page-lead {
    margin: 0 auto 12px;
    line-height: 2;
    color: #666;
    font-size: 0.95rem;
}


/* 委託販売リンク */

.business-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    margin-top: 25px;
    padding: 12px 22px;

    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(190,170,150,0.5);
    border-radius: 30px;

    color: #75695f;
    text-decoration: none;

    font-size: 0.85rem;

    box-shadow: 0 4px 15px rgba(0,0,0,0.04);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}


.business-link:hover {
    transform: translateY(-2px);
    background: #fff;
    box-shadow: 0 7px 20px rgba(0,0,0,0.08);
}


.business-link span {
    font-size: 1.1rem;
}


/* =========================================
   商品グリッド
========================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}


/* 商品カード */

.product-card {
    position: relative;

    overflow: hidden;

    background: rgba(255,255,255,0.95);

    border-radius: 18px;

    box-shadow:
        0 5px 20px rgba(70,55,40,0.07);

    cursor: pointer;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}


.product-card:hover {
    transform: translateY(-6px);

    box-shadow:
        0 12px 30px rgba(70,55,40,0.13);
}


/* 商品画像 */

.img-container {
    width: 100%;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #f4f1ed;
}


.img-container img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}


.product-card:hover .img-container img {
    transform: scale(1.08);
}


/* 商品情報 */

.info {
    padding: 17px 12px 18px;

    text-align: center;
}


.info h2 {
    margin: 0;

    font-size: 0.35rem;
    font-weight: 600;
    line-height: 1.45;

    letter-spacing: 0.01em;

    overflow-wrap: anywhere;
}


.info p {
    margin: 6px 0 0;

    color: #999;

    font-size: 0.75rem;
}


/* =========================================
   ページネーション
========================================= */

.pagination {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 8px;

    margin-top: 45px;
}


.pagination button {
    min-width: 40px;
    height: 40px;

    padding: 0 12px;

    border: 1px solid #d8c8b8;
    border-radius: 20px;

    background: rgba(255,255,255,0.9);

    color: #75695f;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


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


.pagination button.active {
    background: #cdb69f;
    color: #fff;
}


/* =========================================
   お問い合わせボタン
========================================= */

.contact-button {
    position: fixed;

    right: 24px;
    bottom: 24px;

    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 14px 22px;

    border-radius: 30px;

    background: #cdb69f;
    color: #fff;

    text-decoration: none;

    font-size: 0.85rem;

    box-shadow:
        0 5px 18px rgba(80,60,40,0.18);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.contact-button:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 24px rgba(80,60,40,0.24);
}


/* =========================================
   モーダル
========================================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(250,247,243,0.72);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}


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


.modal-content {
    position: relative;

    width: min(620px, 100%);

    max-height: 90vh;

    overflow-y: auto;

    transform: translateY(20px);

    transition:
        transform 0.35s ease;
}


.modal-overlay.active .modal-content {
    transform: translateY(0);
}


.modal-image {
    display: block;

    width: 100%;
    max-height: 58vh;

    object-fit: contain;

    background: #fff;

    border-radius: 18px;

    box-shadow:
        0 12px 40px rgba(50,40,30,0.15);
}


.modal-description {
    margin-top: 18px;

    padding: 22px;

    background: rgba(255,255,255,0.94);

    border-radius: 18px;

    text-align: center;

    box-shadow:
        0 8px 25px rgba(50,40,30,0.08);
}


.modal-category {
    margin: 0 0 7px;

    color: #a99582;

    font-size: 0.75rem;
    letter-spacing: 0.1em;
}


.modal-description h2 {
    margin: 0 0 10px;

    font-size: 1.25rem;
}


.modal-price {
    margin: 0 0 15px;

    color: #b08f70;

    font-weight: bold;
}


.modal-text {
    color: #666;

    font-size: 0.9rem;

    line-height: 1.8;
}


/* =========================================
   ローディング
========================================= */

.loading-overlay {
    position: fixed;

    inset: 0;

    z-index: 2000;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255,255,255,0.72);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


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


.spinner {
    width: 48px;
    height: 48px;

    border: 4px solid #eee;
    border-top-color: #cdb69f;

    border-radius: 50%;

    animation: product-spin 0.9s linear infinite;
}


@keyframes product-spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================
   スマートフォン
========================================= */

.mobile-only {
    display: none;
}


@media (max-width: 1024px) {

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

}


@media (max-width: 600px) {

    .page-container {
        padding:
            30px 14px
            100px;
    }


    .page-header {
        margin-bottom: 35px;
    }


    .page-lead {
        font-size: 0.88rem;
        line-height: 1.9;
    }


    .mobile-only {
        display: block;
    }


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


    .product-card {
        border-radius: 14px;
    }


    .info {
        padding: 12px 7px 14px;
    }


    .info h2 {
        font-size: 0.68rem;
        line-height: 1.4;
    }


    .info p {
        font-size: 0.68rem;
    }


    .contact-button {
        right: 14px;
        bottom: 14px;

        padding: 12px 17px;

        font-size: 0.78rem;
    }


    .modal-overlay {
        padding: 12px;
    }


    .modal-description {
        padding: 18px;
    }

}
/* ========================================
   モーダル閉じるボタン
   右上・丸型に固定
======================================== */

#modal .modal-content {
    position: relative;
}

#modal #close-modal.close-btn {
    position: absolute !important;

    /* モーダルの右上 */
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;

    /* 丸型 */
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    /* デザイン */
    border: none !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #4a4541 !important;

    /* × */
    font-size: 30px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    /* 最前面 */
    z-index: 9999 !important;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22) !important;

    cursor: pointer;
}

#modal #close-modal.close-btn:hover {
    background: #d67f91 !important;
    color: #fff !important;
    transform: scale(1.08);
}

/* スマホ */
@media (max-width: 767px) {

    #modal #close-modal.close-btn {
        top: 8px !important;
        right: 8px !important;

        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;

        font-size: 28px !important;
    }
}

/* =========================================
   商品モーダル → お問い合わせ導線
========================================= */

.modal-contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    margin-top: 20px;
    padding: 13px 22px;

    color: #ffffff;
    background: #cdb69f;

    border-radius: 999px;

    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;

    box-shadow: 0 5px 16px rgba(80, 60, 40, 0.16);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.modal-contact-link:hover {
    transform: translateY(-2px);
    background: #bda388;
    box-shadow: 0 8px 20px rgba(80, 60, 40, 0.22);
}

.modal-contact-link:focus-visible {
    outline: 3px solid #d67f91;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .modal-contact-link {
        width: 100%;
        padding: 13px 16px;
        font-size: 0.84rem;
    }
}

/* =========================================
   商品カード 高さ・ホバー調整
========================================= */

/* buttonの標準スタイルを解除 */
.product-card-button {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;

    border: 0;
    background: transparent;
    color: inherit;
    text-align: inherit;

    cursor: pointer;
}

/* 画像部分を少し低くする */
.product-image-wrap,
.img-container {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f1ed;
}

/* 商品画像 */
.product-image,
.img-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition:
        transform 0.45s ease,
        filter 0.45s ease;
}

/* 商品情報部分をコンパクトに */
.product-info,
.info {
    padding: 11px 9px 13px;
    text-align: center;
}

/* 商品名 */
.product-title,
.info h2 {
    margin: 0;

    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;

    overflow-wrap: anywhere;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

/* カード */
.product-card {
    position: relative;
    overflow: hidden;

    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);

    box-shadow:
        0 5px 18px rgba(70, 55, 40, 0.08);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* マウスが乗った時 */
.product-card:hover {
    transform: translateY(-8px) scale(1.015);

    box-shadow:
        0 16px 36px rgba(70, 55, 40, 0.18);
}

/* 画像を少し拡大 */
.product-card:hover .product-image,
.product-card:hover .img-container img {
    transform: scale(1.1);
    filter: brightness(1.03);
}

/* 商品名も少し変化 */
.product-card:hover .product-title,
.product-card:hover .info h2 {
    color: #b86f80;
    transform: translateY(-1px);
}


/* =========================================
   ページネーション
========================================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;
    margin-top: 40px;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    padding: 0 13px;

    border: 1px solid #d8c8b8;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.92);
    color: #75695f;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    transform: translateY(-2px);

    background: #fff;

    box-shadow:
        0 5px 13px rgba(70, 55, 40, 0.12);
}

.pagination button.active {
    background: #cdb69f;
    color: #fff;
    border-color: #cdb69f;
}

/* 前へ・次へ */
.pagination .pagination-nav {
    min-width: 72px;
    padding: 0 16px;
}

/* 押せない状態 */
.pagination button:disabled {
    opacity: 0.35;
    cursor: default;
    transform: none;
}


/* スマートフォン */
@media (max-width: 600px) {

    .product-image-wrap,
    .img-container {
        aspect-ratio: 4 / 3;
    }

    .product-info,
    .info {
        padding: 9px 6px 11px;
    }

    .product-title,
    .info h2 {
        font-size: 0.68rem;
        line-height: 1.4;
    }

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

    .pagination {
        gap: 6px;
    }

    .pagination button {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.76rem;
    }

    .pagination .pagination-nav {
        min-width: 62px;
        padding: 0 10px;
    }
}
/* ========================================
   モーダル表示中はサイトメニューを隠す
======================================== */

body.modal-open .menu-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.modal-open .side-menu,
body.modal-open .menu-overlay {
    pointer-events: none;
}
.close-btn {
    z-index: 20;
}