.product-header-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px 22px;
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
    box-shadow: 0 8px 28px rgba(35, 77, 134, .06);
}

.product-header-card__content {
    min-width: 0;
}

.product-header-card .product_name {
    max-width: 100%;
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.product-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 13px;
    color: #7689a5;
    font-size: 13px;
    font-weight: 500;
}

.product-header-rating,
.product-header-sku {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.product-header-rating .product-rate {
    margin: 0;
}

.product-header-sku span {
    color: #6f829e;
}

.product-header-sku strong {
    color: #234d86;
    font-weight: 700;
}

.product-header-meta__divider {
    width: 1px;
    height: 18px;
    background: #d5dfec;
}

.product-page-actions {
    display: flex;
    flex-direction: column;
    gap: 11px;
    width: auto;
}

.custom-request-trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    justify-content: flex-start;
    width: auto;
    min-height: 36px;
    padding: 6px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #234d86;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.custom-request-trigger:hover,
.custom-request-trigger:focus-visible {
    background: transparent;
    box-shadow: none;
    color: #173f76;
    text-decoration: underline;
    transform: none;
}

.custom-request-trigger__icon {
    display: inline-flex;
    flex: 0 0 19px;
}

.custom-request-trigger__icon svg,
.custom-request-heading__icon svg,
.custom-request-file__icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.product-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 7px 10px 7px 13px;
    border: 1px solid #e2e9f2;
    border-radius: 10px;
    background: rgba(255, 255, 255, .84);
}

.product-share--header {
    display: none;
}

.product-share--under-gallery {
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 0;
    margin-top: 12px;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.product-share__label {
    color: #617794;
    font-size: 13px;
    font-weight: 600;
}

.product-share__links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-share__link {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin: 0;
    border: 1px solid #dae5f2;
    border-radius: 7px;
    background: #f4f8fd;
    color: #365d94;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}

.product-share__link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.product-share__link:hover,
.product-share__link:focus-visible {
    border-color: #9eb7da;
    background: #e7f0fb;
    color: #234d86;
    transform: translateY(-1px);
    outline: none;
}

.product-share__link--facebook {
    border-color: #1877f2;
    background: #1877f2;
    color: #fff;
}

.product-share__link--facebook:hover,
.product-share__link--facebook:focus-visible {
    border-color: #0f66d2;
    background: #0f66d2;
    color: #fff;
}

.product-share__link--telegram {
    border-color: #229ed9;
    background: #229ed9;
    color: #fff;
}

.product-share__link--telegram:hover,
.product-share__link--telegram:focus-visible {
    border-color: #1689bf;
    background: #1689bf;
    color: #fff;
}

.product-share__link--viber {
    border-color: #7360f2;
    background: #7360f2;
    color: #fff;
}

.product-share__link--viber:hover,
.product-share__link--viber:focus-visible {
    border-color: #5f4bd8;
    background: #5f4bd8;
    color: #fff;
}

/* Product purchase information. */
.shop-template .price_block > .box-product-price > span,
.shop-template .button-buy .box-product-price > span,
.shop-template .buy-product > .text-quantity {
    display: none !important;
}

.shop-template .price_block > .box-product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .shop-template .price_block {
        display: grid;
        grid-template-columns: minmax(145px, 1fr) 122px auto;
        align-items: center;
        gap: 16px;
    }

    .shop-template .price_block > .box-product-price,
    .shop-template .price_block > .buy-product,
    .shop-template .price_block > .button-buy {
        align-self: center;
        margin-top: 0 !important;
    }

    .shop-template .price_block > .button-buy .btn {
        margin-top: 0;
    }
}

.shop-template .price_block > .box-product-price .item_price {
    margin: 0 0 8px !important;
    font-size: 20px !important;
    line-height: 1.25;
}

.product-purchase-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #71849f;
    font-size: 12px;
    line-height: 18px;
}

.product-purchase-meta__reviews,
.product-purchase-meta__sku {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
}

.product-purchase-meta__reviews:hover {
    color: #234d86;
}

.product-purchase-meta__sku strong {
    color: #234d86;
}

.product-purchase-meta__divider {
    width: 1px;
    height: 15px;
    background: #d7e0ec;
}

.shop-template .buy-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px !important;
}

.shop-template .buy-product .box-quantity {
    width: auto;
    margin: 0;
}

.shop-template .buy-product .input-quantity {
    position: relative;
    width: 122px;
    min-width: 122px;
    max-width: 122px;
    height: 44px;
    margin: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e6ee;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(25, 63, 117, .08);
}

.shop-template .buy-product .input-quantity input {
    width: 100%;
    height: 42px;
    padding: 0 38px;
    border: 0;
    color: #173f75 !important;
    font-size: 20px !important;
    font-weight: 700;
    line-height: 42px;
}

.shop-template .buy-product .input-quantity .minus-cart,
.shop-template .buy-product .input-quantity .plus-cart {
    top: 0;
    display: grid;
    width: 38px;
    height: 42px;
    place-items: center;
    background: none;
    color: #27486f;
    font-size: 22px;
    line-height: 1;
}

.shop-template .buy-product .input-quantity .minus-cart::before {
    content: "−";
}

.shop-template .buy-product .input-quantity .plus-cart::before {
    content: "+";
}

.product-in-cart-status {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 5px;
    color: #168148;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
}

.product-in-cart-status.is-visible {
    display: inline-flex;
}

.custom-product-request-modal .modal-dialog {
    max-width: 780px;
}

.custom-product-request-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(15, 43, 82, .24);
}

.custom-product-request-modal .modal-body {
    padding: 34px 38px 30px;
}

.custom-request-close {
    position: absolute;
    z-index: 2;
    top: 16px;
    right: 16px;
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #eef3f9;
    color: #234d86;
    font-size: 26px;
    line-height: 1;
    transition: background-color .2s ease, transform .2s ease;
}

.custom-request-close:hover {
    background: #e2eaf5;
    transform: rotate(4deg);
}

.custom-request-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-right: 42px;
    margin-bottom: 26px;
}

.custom-request-heading__icon {
    display: grid;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    padding: 13px;
    place-items: center;
    border-radius: 14px;
    background: #eaf2fc;
    color: #376eb1;
}

.custom-request-heading h2 {
    margin: 0 0 7px;
    color: #193f75;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
}

.custom-request-heading p {
    max-width: 590px;
    margin: 0;
    color: #6b7e99;
    font-size: 14px;
    line-height: 1.55;
}

.custom-request-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.custom-request-field--wide {
    grid-column: 1 / -1;
}

.custom-request-field label:not(.custom-request-file) {
    display: block;
    margin-bottom: 7px;
    color: #234d86;
    font-size: 13px;
    font-weight: 700;
}

.custom-request-field label > span {
    color: #d94b52;
}

.custom-request-field label small {
    margin-left: 4px;
    color: #91a0b5;
    font-weight: 500;
}

.custom-request-field input:not([type="file"]),
.custom-request-field textarea {
    width: 100%;
    border: 1px solid #cfdaea;
    border-radius: 10px;
    background: #fff;
    color: #17375f;
    font-size: 14px;
    outline: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.custom-request-field input:not([type="file"]) {
    height: 46px;
    padding: 0 14px;
}

.custom-request-field textarea {
    min-height: 120px;
    padding: 12px 14px;
    resize: vertical;
}

.custom-request-field input:focus,
.custom-request-field textarea:focus {
    border-color: #477ab8;
    box-shadow: 0 0 0 3px rgba(71, 122, 184, .12);
}

.custom-request-field.is-invalid input,
.custom-request-field.is-invalid textarea,
.custom-request-field.is-invalid .custom-request-file {
    border-color: #d94b52;
}

.custom-request-error {
    min-height: 16px;
    padding-top: 4px;
    color: #c63c45;
    font-size: 12px;
    line-height: 1.25;
}

.custom-request-file {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 13px 14px;
    border: 1px dashed #afc2dd;
    border-radius: 12px;
    background: #f8fbff;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
}

.custom-request-file:hover {
    border-color: #376eb1;
    background: #f2f7fd;
}

.custom-request-file__icon {
    flex: 0 0 29px;
    width: 29px;
    height: 29px;
    color: #376eb1;
}

.custom-request-file > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.custom-request-file strong {
    color: #234d86;
    font-size: 14px;
}

.custom-request-file small {
    color: #8697af;
    font-size: 12px;
}

.custom-request-file__button {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid #bfd0e5;
    border-radius: 8px;
    background: #fff;
    color: #234d86;
    font-size: 12px;
    font-weight: 700;
}

.custom-request-file-name {
    padding-top: 6px;
    color: #376eb1;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.custom-request-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

.custom-request-status {
    display: none;
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 9px;
    background: #fff1f2;
    color: #b8333d;
    font-size: 13px;
}

.custom-request-status.is-visible {
    display: block;
}

.custom-request-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    margin-top: 20px;
    border: 0;
    border-radius: 10px;
    background: #2f65a7;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(47, 101, 167, .2);
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.custom-request-submit:hover {
    background: #25558f;
    box-shadow: 0 10px 24px rgba(47, 101, 167, .28);
    transform: translateY(-1px);
}

.custom-request-submit:disabled {
    cursor: wait;
    opacity: .72;
    transform: none;
}

.custom-request-submit__loader {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: custom-request-spin .7s linear infinite;
}

.custom-request-submit.is-loading .custom-request-submit__loader {
    display: inline-block;
}

.custom-request-note {
    max-width: 560px;
    margin: 11px auto 0;
    color: #7b8da5;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.custom-request-success {
    padding: 34px 20px 22px;
    text-align: center;
}

.custom-request-success__icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    background: #e6f5eb;
    color: #21844a;
    font-size: 31px;
    font-weight: 800;
}

.custom-request-success h3 {
    margin-bottom: 8px;
    color: #193f75;
    font-size: 23px;
}

.custom-request-success p {
    margin-bottom: 22px;
    color: #7588a2;
}

.custom-request-success button {
    min-width: 150px;
    padding: 10px 18px;
    border: 0;
    border-radius: 9px;
    background: #2f65a7;
    color: #fff;
    font-weight: 700;
}

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

@media (max-width: 991.98px) {
    .product-header-card {
        grid-template-columns: 1fr;
        gap: 18px;
        align-items: stretch;
    }

    .product-page-actions {
        display: flex;
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    .product-header-card {
        gap: 16px;
        margin-bottom: 18px;
        padding: 17px 16px;
        border-radius: 13px;
    }

    .product-header-card .product_name {
        font-size: 24px;
        line-height: 1.26;
    }

    .product-header-meta {
        gap: 9px;
        margin-top: 11px;
    }

    .product-header-meta__divider {
        height: 16px;
    }

    .product-page-actions {
        display: flex;
    }

    .custom-request-trigger {
        min-height: 44px;
        padding: 5px 0;
    }

    .product-share {
        min-height: 0;
    }

    .product-share--under-gallery {
        margin: 10px 0 18px;
    }

    .shop-template .price_block {
        position: static;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 24px;
    }

    .shop-template .buy-product {
        align-items: flex-start;
    }

    .custom-product-request-modal .modal-dialog {
        align-items: flex-start;
        min-height: calc(100% - 16px);
        margin: 8px;
    }

    .custom-product-request-modal .modal-content {
        max-height: calc(100vh - 16px);
        overflow-x: hidden;
        overflow-y: auto;
        border-radius: 14px;
    }

    .custom-product-request-modal .modal-body {
        padding: 28px 20px 22px;
    }

    .custom-request-heading {
        gap: 12px;
        padding-right: 28px;
        margin-bottom: 20px;
    }

    .custom-request-heading__icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        padding: 11px;
    }

    .custom-request-heading h2 {
        font-size: 20px;
    }

    .custom-request-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .custom-request-field--wide {
        grid-column: auto;
    }

    .custom-request-file {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .custom-request-file__button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .shop-template .button-buy {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 999;
        display: grid;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 150px;
        align-items: center;
        gap: 12px;
        padding: 8px 16px;
        background: #fff;
        box-shadow: 0 -4px 18px rgba(15, 43, 82, .12);
    }

    .shop-template .button-buy .box-product-price {
        display: block;
        min-width: 0;
    }

    .shop-template .button-buy .box-product-price .item_price {
        display: block;
        width: auto;
        margin: 0 !important;
        white-space: nowrap;
        font-size: 18px;
        line-height: 1.2;
    }

    .shop-template .button-buy .btn {
        width: 150px;
        min-height: 42px;
        padding: 8px 14px;
        font-size: 14px;
        line-height: 1.2;
    }
}
