/*======================================
  Products
======================================*/

.products-page {
    padding: var(--space-xl) 0;
}

.products-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}


/*--------------------------------------
  Header
--------------------------------------*/

.products-header {
    margin-bottom: var(--space-xl);
}

.products-header h1 {
    margin: 0;
    color: var(--primary);
}

/*--------------------------------------
  Product Categories
--------------------------------------*/

.products-categories {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 36px;
}

.products-categories a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 8px 18px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--primary);
    background: transparent;

    text-decoration: none;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.products-categories a:hover {
    border-color: var(--primary);
}

.products-categories a.is-active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}


/*--------------------------------------
  Product List
--------------------------------------*/

.products-list {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 40px 28px;
}


/*--------------------------------------
  Product Card
--------------------------------------*/

.product-card {
    min-width: 0;
}

.product-card h2 {
    margin: 14px 0 6px;

    font-size: 1rem;
    line-height: 1.5;

    color: var(--primary);
}

.product-card p {
    margin: 4px 0;
}


/*--------------------------------------
  Product Image
--------------------------------------*/

.product-card-image {
    position: relative;

    width: 100%;
    aspect-ratio: 3 / 4;

    overflow: hidden;

    background: #f3f3f3;
    background: #e0e0e0;

}

.product-card-image img {
    display: block;

    width: 90%;
    height: 90%;

    margin: 5% auto;

    object-fit: contain;

    transition:
        transform 0.25s ease;
}

.product-card:hover
.product-card-image img {
    transform: scale(1.03);
}


/*--------------------------------------
  Responsive
--------------------------------------*/

@media (max-width: 960px) {

    .products-list {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 720px) {

    .products-container {
        width: min(100% - 32px, 1200px);
    }

    .products-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 32px 18px;
    }

}


@media (max-width: 420px) {

    .products-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 28px 12px;
    }

}
/* =========================================================
   Product Detail Page
   ========================================================= */

.product-detail-page {
    width: 100%;
    padding: 56px 24px 80px;
    background: #fff;
}

.product-detail-page .products-container {
    width: min(1180px, 100%);
    margin: 0 auto;
}


/* =========================================================
   Product Detail Layout
   ========================================================= */

.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}


/* =========================================================
   Product Image
   ========================================================= */

.product-detail-image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 500px;
    padding: 32px;

    background: #fafafa;

    border: 1px solid #e3e3e3;
    border-radius: 12px;
}

.product-detail-image img {
    display: block;

    /*
     * 画像を表示領域いっぱいにはせず、
     * 約80%程度に抑える。
     */
    width: auto;
    max-width: 80%;

    height: auto;
    max-height: 520px;

    object-fit: contain;

    background: #fff;

    border-radius: 3px;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.10);
}


/* =========================================================
   Product Content
   ========================================================= */

.product-detail-content {
    min-width: 0;
    padding-top: 6px;
}


/* =========================================================
   Product Type
   ========================================================= */

.product-detail-type {
    display: inline-flex;
    align-items: center;

    margin: 0 0 14px;
    padding: 6px 11px;

    color: #5e6f7c;

    background: #f0f3f5;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}


/* =========================================================
   Product Title
   ========================================================= */

.product-detail-content > h1 {
    margin: 0 0 28px;
    padding-bottom: 22px;

    color: #0b5488;

    border-bottom: 1px solid #e4e4e4;

    font-size: clamp(28px, 3vw, 38px);
    font-weight: 700;
    line-height: 1.4;

    letter-spacing: 0.01em;
}


/* =========================================================
   Purchase Cards
   ========================================================= */

.product-detail-purchase,
.product-detail-subscription {
    margin: 0 0 18px;
    padding: 24px 26px;

    background: #fff;

    border: 1px solid #dedede;
    border-radius: 10px;
}

.product-detail-purchase h2,
.product-detail-subscription h2 {
    margin: 0 0 18px;

    color: #0b5488;

    font-size: 19px;
    font-weight: 700;
    line-height: 1.5;
}


/* =========================================================
   Price
   ========================================================= */

.product-detail-price {
    margin: 0 0 20px;

    color: #111;

    font-size: 27px;
    font-weight: 700;
    line-height: 1.3;
}

.product-detail-subscription > p:first-of-type {
    margin: 0 0 14px;

    color: #111;

    font-size: 27px;
    font-weight: 700;
    line-height: 1.3;
}

.product-detail-subscription > p:not(:first-of-type) {
    margin: 6px 0;

    color: #444;

    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   Purchase Forms
   ========================================================= */

.product-purchase-form,
.product-subscription-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;

    margin-top: 20px;
}


/* =========================================================
   Buttons
   ========================================================= */

.product-purchase-form .button,
.product-subscription-form .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 190px;
    min-height: 48px;

    padding: 12px 22px;

    border: 0;
    border-radius: 7px;

    background: #171717;

    color: #fff;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.15s ease;
}

.product-purchase-form .button:hover,
.product-subscription-form .button:hover {
    background: #333;
}

.product-purchase-form .button:active,
.product-subscription-form .button:active {
    transform: translateY(1px);
}


/* =========================================================
   Product Description
   ========================================================= */

.product-detail-description {
    margin-top: 34px;
    padding-top: 26px;

    border-top: 1px solid #ddd;
}

.product-detail-description h2 {
    position: relative;

    margin: 0 0 22px;
    padding-bottom: 12px;

    color: #0b5488;

    font-size: 20px;
    font-weight: 700;
}

.product-detail-description h2::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 70px;
    height: 2px;

    background: #0b5488;
}

.product-detail-description p {
    margin: 0;

    color: #444;

    font-size: 14px;
    line-height: 2;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 960px) {

    .product-detail {
        grid-template-columns:
            minmax(240px, 320px)
            minmax(0, 1fr);

        gap: 36px;
    }

    .product-detail-image {
        min-height: 420px;
        padding: 24px;
    }

    .product-detail-image img {
        max-width: 82%;
        max-height: 460px;
    }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 720px) {

    .product-detail-page {
        padding: 36px 18px 60px;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-detail-image {
        width: 100%;
        min-height: 0;
        padding: 28px;
    }

    .product-detail-image img {
        max-width: 72%;
        max-height: 460px;
    }

    .product-detail-content {
        padding-top: 0;
    }

    .product-detail-content > h1 {
        margin-bottom: 22px;

        font-size: 28px;
    }

    .product-purchase-form,
    .product-subscription-form {
        justify-content: flex-start;
    }
}


/* =========================================================
   Small Mobile
   ========================================================= */

@media (max-width: 480px) {

    .product-detail-page {
        padding: 28px 14px 48px;
    }

    .product-detail-image {
        padding: 22px;
    }

    .product-detail-image img {
        max-width: 80%;
        max-height: 400px;
    }

    .product-detail-purchase,
    .product-detail-subscription {
        padding: 20px;
    }

    .product-detail-content > h1 {
        font-size: 25px;
    }

    .product-purchase-form,
    .product-subscription-form {
        display: block;
    }

    .product-purchase-form .button,
    .product-subscription-form .button {
        width: 100%;
    }
}