/* =========================================================
   PRODUCT DETAIL PAGE
========================================================= */

.product-detail-page {
    width: 100%;
}


/* =========================================================
   MAIN SECTION
========================================================= */

.product-detail-section {
    padding: 80px 24px 110px;
}


.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);

    gap: 80px;

    align-items: start;
}


/* =========================================================
   PRODUCT GALLERY
========================================================= */

.product-gallery {
    width: 100%;
}


.product-main-image {
    width: 100%;
    overflow: hidden;
}


.product-main-image img {
    display: block;

    width: 100%;
    aspect-ratio: 1 / 1;

    object-fit: cover;
}


.image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f1f3ed;

    color: #687263;

    font-size: 15px;
}


/* =========================================================
   THUMBNAILS
========================================================= */

.product-thumbnails {
    display: flex;

    gap: 12px;

    margin-top: 14px;

    overflow-x: auto;

    padding-bottom: 5px;
}


.product-thumbnail {
    flex: 0 0 82px;

    width: 82px;
    height: 82px;

    padding: 0;

    border: 1px solid transparent;

    background: transparent;

    cursor: pointer;

    overflow: hidden;
}


.product-thumbnail.active {
    border-color: #243b2a;
}


.product-thumbnail img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   PRODUCT INFORMATION
========================================================= */

.product-information {
    padding-top: 5px;
}


.product-eyebrow {
    display: inline-block;

    margin-bottom: 15px;

    font-size: 12px;

    letter-spacing: 0.16em;

    font-weight: 600;
}


.product-information h1 {
    margin: 0;

    font-size: clamp(38px, 5vw, 62px);

    line-height: 1.05;

    font-weight: 500;
}


.product-description {
    max-width: 600px;

    margin: 25px 0 35px;

    font-size: 17px;

    line-height: 1.75;
}


/* =========================================================
   VARIANTS
========================================================= */

.variant-heading {
    margin-bottom: 14px;

    font-size: 14px;

    font-weight: 600;
}


.variant-list {
    display: flex;

    flex-direction: column;

    gap: 10px;

    margin-bottom: 28px;
}


.variant-option {
    display: block;

    cursor: pointer;
}


.variant-option input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.variant-option-content {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 17px 18px;

    border: 1px solid #d7ddd2;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}


.variant-option:hover .variant-option-content {
    border-color: #6f8b6c;
}


.variant-option.selected .variant-option-content {
    border-color: #243b2a;

    background: #f3f6f0;
}


.variant-mass {
    font-weight: 600;
}


.variant-price {
    white-space: nowrap;

    font-weight: 600;
}


/* =========================================================
   QUANTITY
========================================================= */

.quantity-section {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}


.quantity-label {
    font-size: 14px;

    font-weight: 600;
}


.quantity-control {
    display: flex;

    align-items: center;

    border: 1px solid #d7ddd2;
}


.quantity-button {
    width: 42px;
    height: 42px;

    border: 0;

    background: transparent;

    cursor: pointer;

    font-size: 20px;
}


.quantity-button:hover {
    background: #f3f6f0;
}


.quantity-control input {
    width: 50px;
    height: 42px;

    padding: 0;

    border: 0;

    border-left: 1px solid #d7ddd2;
    border-right: 1px solid #d7ddd2;

    background: transparent;

    text-align: center;

    font-size: 15px;

    outline: none;
}


/* Remove browser number arrows */

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;

    margin: 0;
}


.quantity-control input[type="number"] {
    appearance: textfield;
}


/* =========================================================
   ADD TO CART
========================================================= */

.add-to-cart-button {
    width: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    padding: 17px 22px;

    border: 0;

    background: #243b2a;

    color: white;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}


.add-to-cart-button:hover {
    background: #1d3022;

    transform: translateY(-1px);
}


.add-to-cart-button span {
    font-size: 19px;
}


/* =========================================================
   UNAVAILABLE
========================================================= */

.unavailable-message {
    padding: 22px;

    margin-bottom: 30px;

    background: #f3f4f0;

    border-left: 3px solid #6f8b6c;
}


.unavailable-message strong {
    display: block;

    margin-bottom: 8px;
}


.unavailable-message p {
    margin: 0;

    line-height: 1.6;
}


/* =========================================================
   PRODUCT DETAILS
========================================================= */

.product-details-list {
    margin-top: 35px;

    border-top: 1px solid #dfe3dc;
}


.detail-row {
    display: flex;

    justify-content: space-between;

    gap: 25px;

    padding: 17px 0;

    border-bottom: 1px solid #dfe3dc;

    font-size: 14px;
}


.detail-row span {
    color: #687263;
}


.detail-row strong {
    text-align: right;
}


/* =========================================================
   BACK LINK
========================================================= */

.back-to-products {
    display: inline-block;

    margin-top: 28px;

    color: inherit;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;
}


.back-to-products:hover {
    text-decoration: underline;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .product-detail-container {
        grid-template-columns: 1fr;

        gap: 50px;

        max-width: 760px;
    }


    .product-information h1 {
        font-size: 48px;
    }

}


@media (max-width: 600px) {

    .product-detail-section {
        padding: 50px 18px 80px;
    }


    .product-information h1 {
        font-size: 40px;
    }


    .product-description {
        font-size: 16px;
    }


    .quantity-section {
        align-items: flex-start;

        flex-direction: column;
    }


    .quantity-control {
        width: 100%;
    }


    .quantity-button {
        flex: 1;
    }


    .quantity-control input {
        flex: 1;
    }


    .detail-row {
        flex-direction: column;

        gap: 6px;
    }


    .detail-row strong {
        text-align: left;
    }

}
