.catalog-page,
.product-page {
    max-width: 1700px;
    margin: 0 auto;
    padding: 34px 3.8% 85px;
}
.breadcrumbs {
    display: flex;
    gap: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #888;
    margin-bottom: 42px;
    flex-wrap: wrap;
}
.breadcrumbs a:hover {
    color: #111;
}
.catalog-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 35px;
}
.catalog-heading h1 {
    font-size: 40px;
    font-weight: 700;
    margin: 10px 0 0;
    letter-spacing: -1px;
}
.catalog-heading p {
    font-size: 15px;
    color: #888;
    margin: 0;
}
.catalog-controls {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 22px;
    margin-bottom: 30px;
}
.catalog-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.catalog-tabs button {
    padding: 11px 19px;
    font-size: 15px;
    border-radius: 22px;
}
.catalog-tabs .chosen {
    background: #171717;
    color: #fff;
}
.catalog-controls select {
    border: 1px solid #ddd;
    padding: 11px 15px;
    font-family: inherit;
    font-size: 15px;
    background: white;
    flex-shrink: 0;
}
.catalog-page .product-grid {
    gap: 40px 20px;
}
.catalog-page .product-image,
.related-section .product-image {
    display: block;
}
.catalog-page .product-name,
.related-section .product-name {
    display: block;
}
.product-layout {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 7%;
    align-items: start;
}
.product-gallery > button {
    padding: 0;
    display: block;
    width: 100%;
    background: #f4f4f4;
}
.product-gallery img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 900px;
}
.product-gallery p {
    font-size: 13px;
    color: #999;
    text-align: center;
    margin: 15px 0;
}
.product-summary {
    position: sticky;
    top: 110px;
}
.product-summary h1 {
    font-weight: 700;
    letter-spacing: -0.7px;
}
.detail-price {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 22px;
    margin-bottom: 24px;
}
.detail-price b {
    color: #b34635;
    font-weight: 600;
}
.detail-price strong {
    font-weight: 650;
}
.detail-price del {
    font-size: 15px;
    color: #999;
}
#product-intro {
    font-size: 15px;
    line-height: 1.9;
    color: #777;
    margin: 0 0 30px;
}
.option-row {
    padding: 22px 0;
    border-top: 1px solid #e8e8e8;
}
.option-row h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 15px;
}
.option-row .sizes {
    margin: 0;
}
.option-row .sizes button {
    min-width: 48px;
    font-size: 15px;
}
.quantity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-top: 1px solid #eee;
    font-size: 15px;
}
.quantity-control {
    display: flex;
    border: 1px solid #ddd;
    height: 40px;
}
.quantity-control button {
    width: 38px;
    font-size: 20px;
}
.quantity-control input {
    width: 45px;
    border: 0;
    text-align: center;
    font-family: inherit;
    font-size: 15px;
    appearance: textfield;
}
.quantity-control input::-webkit-inner-spin-button {
    appearance: none;
}
.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid #eee;
}
.order-total strong {
    font-size: 24px;
    font-weight: 650;
}
.product-summary > .dark-button {
    width: 100%;
    font-size: 15px;
}
.purchase-note {
    color: #999;
    font-size: 13px;
    line-height: 1.6;
    margin: 14px 0 25px;
}
.delivery-info {
    border-top: 1px solid #eee;
    padding-top: 16px;
}
.delivery-info p {
    display: flex;
    gap: 18px;
    font-size: 15px;
    line-height: 1.7;
    margin: 10px 0;
    color: #777;
}
.delivery-info b {
    font-weight: 500;
    min-width: 70px;
    color: #222;
}
.product-information {
    margin-top: 65px;
}
.detail-tabs {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 17px;
    font-size: 15px;
}
.product-information > div:not(.detail-tabs) {
    padding: 35px 0;
    border-bottom: 1px solid #eee;
    scroll-margin-top: 110px;
}
.product-information h2,
.related-section h2 {
    font-size: 23px;
    font-weight: 650;
    letter-spacing: -0.4px;
}
.product-information p {
    font-size: 15px;
    line-height: 2;
    color: #666;
    white-space: pre-line;
}
.related-section {
    padding-top: 55px;
}
.image-viewer {
    margin: auto;
    max-width: 90vw;
    max-height: 92svh;
    position: relative;
    background: white;
}
.image-viewer > button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    padding: 10px;
    z-index: 1;
}
.image-viewer > img {
    max-height: 90svh;
    width: auto;
    max-width: 90vw;
    object-fit: contain;
}
.search-results > a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}
.search-results > a > img {
    width: 75px;
    height: 95px;
}
.search-results > a b {
    display: block;
    margin-top: 10px;
}
@media (max-width: 767px) {
    .catalog-page,
    .product-page {
        padding: 25px 18px 50px;
    }
    .breadcrumbs {
        margin-bottom: 28px;
        font-size: 13px;
    }
    .catalog-heading h1 {
        font-size: 32px;
    }
    .catalog-controls {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }
    .catalog-tabs {
        gap: 3px;
    }
    .catalog-tabs button {
        padding: 9px 12px;
    }
    .catalog-page .product-grid {
        gap: 30px 12px;
    }
    .product-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .product-summary {
        position: static;
        padding-top: 0;
    }
    .product-gallery img {
        max-height: 650px;
    }
    .product-information {
        margin-top: 40px;
    }
    .detail-tabs {
        gap: 22px;
    }
    .delivery-info p {
        font-size: 15px;
    }
    .related-section {
        padding-top: 35px;
    }
    .purchase-note {
        font-size: 13px;
    }
    .product-summary .dark-button {
        padding: 18px 22px;
    }
}

/* Tall product photography and direct add-on selection */
.catalog-page .product-image,
.related-section .product-image {
    aspect-ratio: 3 / 4;
}
.product-gallery > button {
    aspect-ratio: 3 / 4;
    overflow: hidden;
}
.product-gallery #main-product-image {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
}
/* Compact collection styling, with size selection aligned right. */
.product-addons {
    margin: 24px 0 20px;
    border: 0;
    border-top: 2px solid #171717;
    border-radius: 0;
    overflow: visible;
}
.product-addons h2 {
    display: block;
    font-size: 16px;
    font-weight: 600;
    padding: 17px 0 15px;
    margin: 0;
    background: none;
    border-bottom: 1px solid #ddd;
    line-height: 1.5;
    letter-spacing: -0.3px;
}
.product-addons h2 span {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #888;
    font-weight: 400;
    letter-spacing: -0.2px;
}
.addon-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid #e8e8e8;
}
.addon-photo {
    display: block;
    background: #f7f7f7;
}
.addon-photo img {
    width: 58px;
    height: 72px;
    object-fit: contain;
}
.addon-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 15px;
    row-gap: 6px;
}
.addon-name {
    grid-column: 1;
    grid-row: 1;
    display: block;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.addon-info > strong {
    grid-column: 1;
    grid-row: 2;
    display: block;
    font-size: 15px;
    margin: 0;
    font-weight: 600;
}
.addon-label {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    text-align: right;
    display: block;
    font-size: 12px;
    color: #999;
    margin: 0;
}
.addon-sizes {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    justify-content: flex-end;
    align-self: start;
    gap: 5px;
}
.addon-sizes button {
    width: 32px;
    height: 32px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.addon-sizes button:hover,
.addon-sizes button.added {
    background: #171717;
    color: white;
    border-color: #171717;
}
.addon-status {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
}
.addon-status:not(:empty) {
    padding: 12px 0 0;
}
.bundle-discount {
    color: #d3432f;
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
}
@media (max-width: 767px) {
    .addon-item {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 12px;
        padding: 12px 0;
    }
    .addon-photo img {
        width: 50px;
        height: 66px;
    }
    .addon-info {
        column-gap: 10px;
    }
    .addon-sizes {
        gap: 4px;
    }
    .addon-sizes button {
        width: 29px;
        height: 32px;
    }
    .product-addons h2 span {
        font-size: 12px;
    }
}

/* Keep the purchase column close to the main image height. */
.product-summary {
    padding-top: 4px;
}
.product-summary h1 {
    font-size: 27px;
    line-height: 1.35;
    margin: 10px 0 15px;
}
.product-summary .detail-price {
    margin-bottom: 16px;
}
.product-summary #product-intro {
    margin-bottom: 16px;
}
.product-summary .option-row {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 14px 0;
}
.product-summary .option-row h2 {
    margin: 0;
    flex-shrink: 0;
}
.product-summary .option-row .sizes {
    gap: 7px;
}
.product-summary .option-row .sizes button {
    min-width: 36px;
    width: 36px;
    height: 36px;
}
.product-summary .quantity-row {
    padding: 10px 0;
}
.product-summary .order-total {
    padding: 17px 0;
}
.product-summary .purchase-note {
    margin: 10px 0 16px;
}
.product-summary .product-addons {
    margin: 18px 0 16px;
}
.product-summary .product-addons h2 {
    padding: 12px 0;
}
.product-summary .addon-item {
    padding: 10px 0;
}
.product-summary .addon-photo img {
    height: 60px;
}
.product-summary .delivery-info {
    padding-top: 10px;
}
.product-summary .delivery-info p {
    margin: 6px 0;
}
@media (max-width: 767px) {
    .product-summary h1 {
        font-size: 25px;
    }
    .product-summary .addon-photo img {
        height: 62px;
    }
}
