.product-detail__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-detail__form .form__error-message {
    display: flex;
    gap: 4px;
    align-items: center;
    color: rgb(var(--color-tag-background));
}

.product-detail__form .form__error-message::after {
    content: attr(data-message);
}

.product-detail__form .form__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Sticky buy buttons for mobile */
.product-detail__sticky-buy-buttons {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    padding: 12px 16px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.product-detail__sticky-buy-buttons.is-visible {
    transform: translateY(0);
}

.product-detail__sticky-buy-buttons .product-detail__form--sticky {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-detail__sticky-buy-buttons .form__buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media screen and (max-width: 749px) {
    .product-detail__sticky-buy-buttons {
        display: block;
    }
}

@media screen and (min-width: 750px) {
    .product-detail__sticky-buy-buttons {
        display: none !important;
    }
}

@media screen and (max-width: 749px) {
    .product-detail__sticky-buy-buttons .form__buttons--mobile-sticky-split {
        display: none;
    }

    .product-detail__sticky-buy-buttons .form__buttons--mobile-sticky-spec {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 160px !important;
        gap: 8px !important;
        align-items: center;
    }

    .product-detail__sticky-buy-buttons .mobile-sticky-price-only {
        display: flex;
        align-items: center;
        gap: 3px;
        min-width: 0;
        min-height: 44px;
        padding-left: 8px;
    }

    .product-detail__sticky-buy-buttons .mobile-sticky-spec-trigger__price {
        display: block;
        color: rgb(var(--color-discount));
        font-size: 17px;
        font-weight: 700;
        line-height: 1;
    }

    .product-detail__sticky-buy-buttons .mobile-sticky-spec-trigger__tax {
        color: rgb(var(--color-text));
        font-size: 12px;
        line-height: 1;
    }

    .product-detail__sticky-buy-buttons .mobile-sticky-add-button {
        width: 100% !important;
        min-height: 44px;
        border-color: #002448;
        background: #002448;
        color: #fff;
    }

    .product-detail__sticky-buy-buttons .mobile-sticky-add-button:hover {
        border-color: #002448;
        background: #002448;
        color: #fff;
    }

    .mobile-sticky-spec-open,
    .mobile-sticky-spec-open body {
        overflow: hidden;
    }

    .mobile-sticky-spec-modal {
        position: fixed;
        inset: 0;
        z-index: 1000;
    }

    .mobile-sticky-spec-modal[hidden],
    .mobile-sticky-size-chart-modal[hidden] {
        display: none !important;
    }

    .mobile-sticky-spec-modal__mask {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
    }

    .mobile-sticky-spec-modal__panel {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        max-height: 86vh;
        min-height: 58vh;
        padding: 18px;
        background: #fff;
        overflow-y: auto;
    }

    .mobile-sticky-spec-modal__close {
        position: absolute;
        top: 14px;
        right: 16px;
        width: 30px;
        height: 30px;
        border: 0;
        background: transparent;
        color: rgb(var(--color-text));
        font-size: 28px;
        line-height: 1;
    }

    .mobile-sticky-spec-modal__head {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-bottom: 22px;
        padding-right: 40px;
    }

    .mobile-sticky-spec-modal__image-wrap {
        width: 72px;
        height: 72px;
        flex: 0 0 auto;
    }

    .mobile-sticky-spec-modal__image-wrap img,
    .mobile-sticky-spec-modal__image {
        width: 72px;
        height: 72px;
        object-fit: cover;
    }

    .mobile-sticky-spec-modal__price {
        color: rgb(var(--color-text));
        font-size: 16px;
        font-weight: 700;
    }

    .mobile-sticky-spec-modal__options {
        display: flex;
        flex-direction: column;
        gap: 22px;
        padding-bottom: 76px;
    }

    .mobile-sticky-spec-option {
        padding: 0;
        margin: 0;
        border: 0;
    }

    .mobile-sticky-spec-option__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 10px;
    }

    .mobile-sticky-spec-option__name,
    .mobile-sticky-spec-quantity__name {
        margin: 0;
        color: rgb(var(--color-text));
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-sticky-size-chart-trigger {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #980606;
        opacity: 1;
        font-size: 12px;
        line-height: 1.2;
        text-decoration: none;
        cursor: pointer;
    }

    .mobile-sticky-size-chart-trigger:hover {
        opacity: 1;
    }

    .mobile-sticky-size-chart-trigger__icon {
        width: 14px;
        height: 14px;
        flex: 0 0 auto;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-sticky-spec-option__values {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .mobile-sticky-spec-option__value {
        position: relative;
        display: block;
    }

    .mobile-sticky-spec-option__value input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .mobile-sticky-spec-option__value span {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        min-width: 84px;
        min-height: 36px;
        padding: 4px 10px;
        border: 1px solid rgb(var(--color-entry-line));
        background: #fff;
        color: rgb(var(--color-text));
        font-size: 12px;
        line-height: 1.2;
    }

    .mobile-sticky-spec-option[data-mobile-sticky-option-index="1"] .mobile-sticky-spec-option__value span {
        width: 56px;
        min-width: 56px;
        max-width: 56px;
        height: 35px;
        min-height: 35px;
        padding: 0;
        justify-content: center;
    }

    .mobile-sticky-spec-option__value input:checked+span {
        border-color: rgb(var(--color-text));
        box-shadow: inset 0 0 0 1px rgb(var(--color-text));
    }

    .mobile-sticky-spec-option__thumb {
        width: 28px;
        height: 28px;
        object-fit: cover;
    }

    .mobile-sticky-spec-quantity__control {
        display: inline-grid;
        grid-template-columns: 40px 52px 40px;
        min-height: 40px;
        border: 1px solid rgb(var(--color-entry-line));
    }

    .mobile-sticky-spec-quantity__control button,
    .mobile-sticky-spec-quantity__control span {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: #fff;
        color: rgb(var(--color-text));
        font-size: 16px;
    }

    .mobile-sticky-spec-modal__ok {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        min-height: 50px;
        border: 0;
        background: #002448;
        color: #fff;
        font-size: 14px;
        font-weight: 700;
    }

    .mobile-sticky-size-chart-modal {
        position: absolute;
        inset: 0;
        z-index: 3;
        background: #fff;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .mobile-sticky-size-chart-modal__head {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 48px;
        padding: 0 16px;
        background: #fff;
        color: rgb(var(--color-text));
        font-size: 16px;
    }

    .mobile-sticky-size-chart-modal__scrollbar {
        position: sticky;
        top: 48px;
        z-index: 2;
        height: 3px;
        margin: 0 16px;
        background: #e5e5e5;
    }

    .mobile-sticky-size-chart-modal__scrollbar span {
        position: absolute;
        top: 0;
        left: 0;
        display: block;
        height: 100%;
        min-width: 24px;
        border-radius: 999px;
        background: #9a9a9a;
    }

    .mobile-sticky-size-chart-modal__scrollbar[hidden] {
        display: none !important;
    }

    .mobile-sticky-size-chart-modal__close {
        width: 32px;
        height: 32px;
        border: 0;
        background: transparent;
        color: rgb(var(--color-text));
        font-size: 26px;
        line-height: 1;
    }

    .mobile-sticky-size-chart-modal__body {
        position: relative;
        padding: 16px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-x;
        background: #fff;
        scrollbar-width: none;
    }

    .mobile-sticky-size-chart-modal__body::-webkit-scrollbar {
        display: none;
    }

    .mobile-sticky-size-chart-modal__body table {
        width: max-content;
        min-width: 620px;
        border-collapse: separate;
        border-spacing: 0;
    }

    .mobile-sticky-size-chart-modal__body th,
    .mobile-sticky-size-chart-modal__body td {
        min-width: 50px;
        padding: 10px 8px;
        border: 0;
        border-bottom: 1px solid rgb(var(--color-entry-line));
        text-align: center;
        font-size: 11px;
        line-height: 1.3;
        white-space: nowrap;
    }

    .mobile-sticky-size-chart-modal__body th:first-child,
    .mobile-sticky-size-chart-modal__body td:first-child {
        position: sticky;
        left: 0;
        z-index: 10;
        width: 42px;
        min-width: 42px;
        max-width: 42px;
        background: #fff !important;
        box-shadow: none;
    }

    .mobile-sticky-size-chart-modal__body th:first-child {
        z-index: 11;
    }
}