footer {
    position: relative;
    display: block;
    width: 100%;
    padding: 40px 0;
}
.footer-wrapper {
    background: radial-gradient(circle at 50% 20%, rgb(75 42 128) 0%, rgb(42 74 127) 40%, rgba(10, 12, 32, 1) 100%);
    border-radius: 27px;
    max-width: 1560px;
    margin: 0 auto;
}
.footer-content {
    padding: 100px 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    max-width: 1160px;
}
.footer-title {
    color: #ffffff;
    font-size: 54px;
    line-height: 120%;
    font-weight: 600;
    margin: 0;
    width: 70%;
}
.footer-fields-wrapper {
    margin: 70px 0 0;
}
.footer-form {
    display: flex;
    gap: 20px;
    align-items: center;
}
.footer-form input {
    border: none;
    border-radius: 9px;
    outline: none;
    padding: 13px 20px;
    max-width: 210px;
}
.footer-btn-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}
.footer-form-btn {
    height: 50px;
    font-size: 16px;
    font-weight: 500;
}
.footer-form-social {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 50px;
}
.footer-form-social-wrapper {
    position: relative; 
}
input[type="radio"] {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    left: 2px;
    opacity: 0;
}
.custom-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    opacity: 0.6;
    border-radius: 50%;
    position: relative;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}
.custom-radio::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease-in-out;
}

input[type="radio"]:checked + .custom-radio {
    opacity: 1;
}

input[type="radio"]:checked + .custom-radio::after {
    transform: translate(-50%, -50%) scale(1);
}
.footer-form-social-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-form-social-wrapper label {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
}
.footer-description {
    grid-area: description;
    color: #ffffff;
    font-size: 16px;
    line-height: 155%;
    font-weight: 400;
}
.footer-copyright {
    grid-area: copyright;
    color: #ffffff;
    font-size: 16px;
    line-height: 155%;
    font-weight: 400;
}

.footer-link {
    font-size: 13px;
    line-height: 17px;
    color: #999999;
    display: block;
}

.footer-politics {
    color: #ffffff;
    font-size: 16px;
    line-height: 155%;
    font-weight: 400;
    margin-top: 30px;
}

/* a:hover {
    color: #ffffff;
} */

.footer-order-btn.btn {
    white-space: nowrap;
    content: url(../../img/footer/message.svg);
    background-color: inherit;
    border-radius: 9px;
    border: 1px solid #2d374d !important;
    padding: 8px;
    width: 40px;
    height: 40px;
}

.footer-order-btn.btn:hover,
.footer-order-btn.btn:active,
.footer-order-btn.btn:focus {
    background-color: inherit;
    border-color: #ffffff !important;
}
.footer-link {
    color: #ffffff;
    font-size: 16px;
    line-height: 155%;
    font-weight: 400;
    text-decoration: underline;
}

.footer-politics, .footer-link {
    display: inline;
}

.footer-border {
    opacity: 0.09;
    background-color: #ffffff;
    background-position: center center;
    height: 1px;
    margin: 100px 0;
}

.footer-bottom {
    display: grid;
    grid-template-areas: 'logo description phone'
    'logo description email'
    'copyright copyright social';
    grid-template-columns: 1fr 1fr auto;
    column-gap: 30px;
    row-gap: 60px;
}


/* payoptions */
.footer-payoptions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-payoption {
    width: 35px;
    height: 20px;
    color: #ffffff;
    opacity: .5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    -webkit-transition: opacity .2s;
    -moz-transition: opacity .2s;
    transition: opacity .2s;
    margin-bottom: 10px;
}
.footer-payoption:hover {
    opacity: 1;
}
.footer-payoption svg {
    height: 20px;
}
.footer-payoption-cash {
    width: 20px;
}
.footer-payoption-visa {
    width: 33px;
}
.footer-payoption-sberbank {
    width: 19px;
}
.footer-payoption-yamoney {
    width: 15px;
}
.footer-payoption-webmoney {
    width: 19px;
}
.footer-payoption-maestro {
    width: 26px;
}
.footer-payoption-alfabank {
    width: 14px;
}
.footer-payoption-mir {
    width: 35px;
}

/* ranx */
.footer-ranx {
    display: block;
    height: 40px;
    width: 140px;
    grid-area: logo;
}

.footer-ranx img {
    height: 100%;
    width: 100%;
}

/* social */
.footer-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    grid-area: social;
}
.footer-social-block {
    width: 40px;
    height: 40px;
    display: block;
    padding: 8px;
    border: 1px solid #2d374d;
    border-radius: 9px;
    transition: ease-in-out, border-color .15s;
}
.footer-social-block:hover { border-color: #ffffff; }
.footer-social-block svg {
    height: 40px;
    width: 40px;
}

.footer-social-block:nth-child(1) {
    content: url(../../img/footer/vk.svg);
}

.footer-social-block:nth-child(2) {
    content: url(../../img/footer/telegram.svg);
}

.footer-social-block:nth-child(3) {
    content: url(../../img/footer/MAX.svg);
}

.footer-social-block svg {
    width: 19px;
    height: 19px;
    visibility: hidden;
}

/* items */
.footer-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}
.footer-item-phone {
    grid-area: phone;
}
footer-item-email {
    grid-area: email;
}
.footer-item span {
    color: #7d7d7d;
    font-size: 14px;
    line-height: 155%;
    font-weight: 400;
}
.footer-item-text {
    color: #ffffff;
    font-size: 20px;
    line-height: 155%;
    font-weight: 600;
}

/* line */
.footer-line {
    width: 100%;
    height: 1px;
    background-color: #ffffff;
    opacity: .1;
    margin: 30px 0 40px;
}

/* footer menu */
.footer-menu {
    display: flex;
    flex-wrap: wrap;
}
.footer-menu a {
    color: #ffffff;
    font-weight: bold;
    font-size: 15px;
    line-height: 19px;
    margin-right: 38px;
    white-space: nowrap;
    margin-bottom: 10px;
}

/* light version */
.footer-light {
    background-color: #f8f8f8;
    color: #333333;
}
.footer-light .footer-item-text,
.footer-light .footer-item-icon,
.footer-light .footer-menu a,
.footer-light .footer-social-block:hover,
.footer-light .footer-ranx,
.footer-light .footer-payoption {
    color: #333333;
}
.footer-light .footer-line {
    background-color: #333333;
}
.favorites-counter-btn {
    cursor: pointer;
    position: fixed;
    top: 210px;
    right: 30px;
    font-size: 13px;
    line-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    outline: none;
    background-color: #ffffff;
    box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: transform 0.2s ease-in-out;
}
.header-basket-icon svg {
    width: 34px;
    height: 34px;
    display: block;
}
.favorites-counter-btn:hover {
    transform: scale(1.1);
}
.favorites-count {
    font-family: 'Arial', Arial, sans-serif;
    bottom: -6px;
    font-size: 14px;
    height: 24px;
    line-height: 24px;
    right: -6px;
    width: 24px;
    position: absolute;
    background-color: #0434ff;
    color: white;
    border-radius: 50px;
    text-align: center;
}

#favorites-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
}

#favorites-sidebar.active {
    z-index: 9999;
    width: 100%;
}

.favorites-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}
#favorites-sidebar.active .favorites-sidebar-overlay {
    opacity: 1;
    pointer-events: all;
}

.favorites-sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 560px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

#favorites-sidebar.active .favorites-sidebar-content {
    transform: translateX(0);
}

.favorites-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.favorites-sidebar-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.favorites-sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: #666;
    transition: all 0.3s ease;
}

.favorites-sidebar-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.favorites-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.favorites-item-content {
    flex: 1;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
}

.favorites-item-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.favorites-item-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: black;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.3s ease;
}

.favorites-item-price {
    display: flex;
    align-items: center;
    font-size: 16px;
    min-width: 65px;
    font-weight: 600;
    color: #333;
}

.favorites-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #999;
    transition: all 0.3s ease;
    margin-left: 12px;
    border: 1px solid #e0e0e0;
    border-radius:50px;
    max-width: 26px;
    max-height: 26px;
}
.favorites-item-remove svg{
    overflow: hidden;
    vertical-align: top;
}
.favorites-item-remove:hover {
    color: black;
    border-color: black;
}

.favorites-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

.favorite-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: black;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 10000;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 400px;
    word-wrap: break-word;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.add-to-favorites {
    transition: all 0.3s ease;
}

.added-to-favorites svg path {
    fill: #1DCD24 !important;
    stroke: #1DCD24 !important;
}

@media (max-width: 1220px) {
    .footer-content {
        max-width: 940px;
    }
    .footer-form input {
        max-width: 156px;
    }
    .footer-title {
        width: auto;
    }
}

@media (max-width: 991px) {
    .footer-content {
        max-width: 620px;
    }
    .footer-fields-wrapper {
        margin-top: 40px;
    }
    .footer-form {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-form input {
        max-width: 100%;
        width: 100%;
    }
    .footer-btn-wrapper,
    .footer-form-btn {
        width: 100%;
    }
    .footer-border {
        margin: 10px 0 60px;
    }
    .footer-bottom {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas: 'logo phone'
        'description email'
        'description social'
        'copyright copyright';
        row-gap: 10px;
    }
    .footer-social {
        align-self: end;
    }
    .footer-copyright {
        text-align: center;
        margin-top: 50px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        max-width: 460px;
        padding: 60px 20px;
    }
    .footer-title {
        font-size: 24px;
    }
    .footer-bottom {
        grid-template-columns: 1fr;
        grid-template-areas: 'logo'
        'description'
        'phone'
        'email'
        'social'
        'copyright';
        row-gap: 50px;
    }
    .footer-social {
        gap: 30px;
        justify-content: flex-start;
    }
    .footer-copyright {
        text-align: start;
        margin-top: 0;
    }
    .favorites-counter-btn {
        right: 15px;
    }
}

@media (max-width: 560px) {
    .favorites-sidebar-content {
        width: 100%;
    }
    .favorites-item-content {
        flex-direction: column-reverse;
    }
}

@media (max-width: 480px) {
    .footer-content {
        max-width: 300px;
    }
}
