*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: sans-serif, Roboto, Helvetica, sans-serif;
    margin: 0;
    color: #1F2937;
}

.wrapper {
    max-width: 430px;
    margin: 0 auto;
    padding: 24px;
    overflow: hidden;
    background: white;
}

.card {
    overflow: hidden;
}

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.carousel-images {
    display: flex;
    transition: transform 0.3s ease;
    touch-action: pan-y;
}

.carousel-images img {
    width: 100%;
    flex-shrink: 0;
    user-select: none;
    border-radius: 10px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

/* Video slides styling to match images */
.carousel-images video {
    width: 100%;
    flex-shrink: 0;
    user-select: none;
    border-radius: 10px;
    aspect-ratio: 1 / 1; /* parity with images */
    object-fit: contain;
}

/* Unified media item wrapper and video overlays */
.media-item {
    position: relative;
    display: block;
    width: 100%;
    flex: 0 0 100%;
    flex-shrink: 0;
}
.video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,.6);
    color:#fff;
    font-size:12px;
    padding:2px 6px;
    border-radius:4px;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.carousel:hover .carousel-controls {
    opacity: 1;
    pointer-events: auto;
}

.carousel-controls button {
    background: white;
    border-radius: 2px;
    border: none;
    width: 30px;
    height: 30px;
    font-weight: 400;
    color: #4B5563;
    cursor: pointer;
    font-size: 30px;
    line-height: 0;
    padding-bottom: 5px;

}

.indicators {
    text-align: center;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 3px;
}

.indicator.active {
    background: #1F2937;
    width: 12px;
    height: 12px;
}

.title {
    font-weight: bold;
    font-size: 29px;
    margin-top: 24px;
}

.price {
    font-size: 54px;
    color: #DC3545;
    margin: 16px 0;
    letter-spacing: -2.5px;
}

.price-main {
    font-size: inherit;
}

.price-decimal {
    font-size: inherit;
}

.price-cents {
    font-size: 0.5em;
}

.price-currency {
    font-size: inherit;
}

.description {
    font-size: 18px;
    line-height: 1.3;
}

.line {
    max-width: 430px;
    width: 100%;
    margin: 0 auto;
    height: 1px;
    background: #9EC5FE;
}

.form-title {
    font-size: 24px;
    font-weight: 500;
}

form {
    margin-top: 30px;
}

form .form-phone-wrapper {
    margin-bottom: 24px;
}

form .field-error {
    display: none;
    color: #DC3545;
    margin-top: 4px;
}

form input[aria-invalid="true"] {
    border-color: #DC3545;
}

form input[aria-invalid="true"] ~ .field-error {
    display: block;
}

form input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #9CA3AF;
    border-radius: 8px;
    font-size: 18px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.25s;
}

form input:hover {
    border-color: #6B7280;
}

form input:focus {
    outline: none;
}

form input:focus-visible {
    border-color: #0D6EFD;
}

form input.disabled {
    border-color: #D1D5DB;
}

form input::placeholder {
    font-size: 18px;
    font-family: inherit;
}

form button {
    width: 100%;
    background: #0D6EFD;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

form button:hover {
    background: #0B5ED7;
}

form button:active {
    background: #0A58CA;
}

form button:disabled {
    background: #A5B4FC;
    cursor: not-allowed;
}

.privacy-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.privacy-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0 10px 0 0;
    accent-color: #0D6EFD;
}

.privacy-checkbox label {
    color: #6B7280;
}

.privacy-checkbox a {
    color: #0D6EFD;
    text-decoration: none;
}

.privacy-checkbox a:hover {
    text-decoration: underline;
}

@media (hover: none) {
    .carousel-controls {
        display: none;
    }
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 90%;
    width: 350px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.visible .modal-content {
    transform: scale(1);
}

.modal-icon {
    margin-bottom: 15px;
    color: #4CAF50; /* Зеленый цвет для иконки успеха */
}

.modal-header {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.modal-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
}

.confirm-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.confirm-btn:hover {
    background-color: #45a049;
}