/* БЭМ - Блоки, Элементы, Модификаторы */

/* Общие стили */
.page {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка сайта */
.header {
    background-color: #000;
    color: #FFD700;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    text-decoration: none;
}

.header__logo:hover {
    color: #fff;
}

.header__cart {
    position: relative;
}

.header__cart-link {
    color: #FFD700;
    text-decoration: none;
    font-size: 20px; /* Размер иконки */
    padding: 5px 10px;
    border: 2px solid #FFD700;
    border-radius: 5px;
    display: inline-block;
    position: relative;
    line-height: 1;
}

.header__cart-link:hover {
    background-color: #FFD700;
    color: #000;
}

.header__cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #FFD700;
    color: #000;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
}

/* Главная страница - товар */
.product {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 40px 0;
    padding: 30px;
}

.product__title {
    color: #000;
    font-size: 32px;
    margin-bottom: 20px;
    border-bottom: 3px solid #FFD700;
    padding-bottom: 10px;
}

.product__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Галерея товара */
.gallery {
    position: relative;
}

.gallery__main-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #FFD700;
}

.gallery__colors {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.gallery__color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.3s;
}

.gallery__color:hover {
    transform: scale(1.1);
}

.gallery__color--active {
    border-color: #FFD700;
    box-shadow: 0 0 10px #FFD700;
}

.gallery__color--black {
    background-color: #000;
}

.gallery__color--yellow {
    background-color: #FFD700;
}

.gallery__color--white {
    background-color: #fff;
    border: 2px solid #ccc;
}

/* Информация о товаре */
.info__description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 16px;
}

.info__price {
    font-size: 28px;
    font-weight: bold;
    color: #000;
    margin-bottom: 20px;
}

.info__price-value {
    color: #FFD700;
    font-size: 32px;
}

.info__color-selector {
    margin-bottom: 20px;
}

.info__color-label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

.info__color-options {
    display: flex;
    gap: 15px;
}

.info__color-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.info__color-option:hover {
    transform: scale(1.1);
}

/* Специальные стили для белого цвета (чтобы его было видно на белом фоне) */
.info__color-option--white {
    border: 2px solid #ccc !important; /* Серая обводка для белого цвета */
    box-shadow: 0 0 0 1px #ddd;
}

.info__color-option--white.info__color-option--selected {
    border-color: #FFD700 !important; /* Желтая обводка при выборе */
    box-shadow: 0 0 0 2px #FFD700;
}

/* Для галереи */

/* Альтернатива - если используете английские названия */
.gallery__color--white {
    border: 2px solid #ccc !important;
}

.gallery__color--white:hover,
.gallery__color--white.gallery__color--active {
    border-color: #FFD700 !important;
}

.info__color-option--selected {
    border-color: #FFD700;
    box-shadow: 0 0 15px #FFD700;
}

.info__color-name {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.info__quantity {
    margin-bottom: 20px;
}

.info__quantity-label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

.info__quantity-input {
    width: 80px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.info__quantity-input:focus {
    outline: none;
    border-color: #FFD700;
}

.info__actions {
    display: flex;
    gap: 15px;
}

.info__button {
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.info__button--primary {
    background-color: #FFD700;
    color: #000;
}

.info__button--primary:hover {
    background-color: #000;
    color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.info__button--secondary {
    background-color: #000;
    color: #FFD700;
}

.info__button--secondary:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Страница корзины */
/* Базовые стили для корзины */
.cart {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 40px 0;
    padding: 30px;
    overflow-x: auto; /* Добавляем горизонтальный скролл для очень маленьких экранов */
}

.cart__title {
    color: #000;
    font-size: 32px;
    margin-bottom: 20px;
    border-bottom: 3px solid #FFD700;
    padding-bottom: 10px;
}

.cart__empty {
    text-align: center;
    padding: 50px;
    color: #666;
    font-size: 18px;
}

/* Стили для таблицы (десктопная версия) */
.cart__table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    min-width: 600px; /* Минимальная ширина таблицы */
}

.cart__table th {
    background-color: #000;
    color: #FFD700;
    padding: 15px;
    text-align: left;
    font-size: 16px;
}

.cart__table td {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

.cart__product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
    vertical-align: middle;
}

.cart__product-color {
    display: inline-block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid #ddd;
    margin-right: 5px;
    vertical-align: middle;
}

.cart__quantity-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    font-size: 14px;
}

.cart__remove-btn {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
}

.cart__remove-btn:hover {
    background-color: #cc0000;
}

.cart__total {
    text-align: right;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.cart__total-value {
    color: #FFD700;
    margin-left: 10px;
}

/* Форма заказа */
.order-form {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
}

.order-form__title {
    color: #000;
    font-size: 24px;
    margin-bottom: 20px;
}

.order-form__group {
    margin-bottom: 20px;
}

.order-form__label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #000;
}

.order-form__input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.order-form__input:focus {
    outline: none;
    border-color: #FFD700;
}

.order-form__submit {
    background-color: #FFD700;
    color: #000;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

.order-form__submit:hover {
    background-color: #000;
    color: #FFD700;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.notification--success {
    background-color: #4CAF50;
}

.notification--error {
    background-color: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Подвал */
/* Базовые стили футера */
.footer {
    background-color: #000;
    color: #FFD700;
    padding: 30px 0;
    margin-top: 40px;
    width: 100%;
}

.footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer__copyright {
    font-size: 14px;
    color: #FFD700;
}

.footer__links {
    display: flex;
    gap: 20px;
}

.footer__link {
    color: #FFD700;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer__link:hover {
    color: #fff;
    text-decoration: underline;
}




/* Адаптивность */
/* Планшеты и небольшие ноутбуки (от 769px до 1024px) */
@media (max-width: 1024px) {
    .cart {
        margin: 30px 0;
        padding: 20px;
    }
    
    .cart__title {
        font-size: 28px;
    }
    
    .cart__table th {
        padding: 12px;
        font-size: 15px;
    }
    
    .cart__table td {
        padding: 12px;
    }
}

/* Мобильные устройства (до 740px) - с использованием Grid */
@media (max-width: 740px) {
    .product {
        margin: 20px 0;
        padding: 20px;
    }
    
    .product__title {
        font-size: 28px;
        text-align: center;
    }
    
    /* Grid с явным указанием порядка */
    .product__content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* Галерея - первый ряд */
    .gallery {
        grid-row: 1;
    }
    
    .gallery__main-image {
        width: 90%;
        max-height: 350px;
        object-fit: contain;
        background: linear-gradient(145deg, #f5f5f5, #ffffff);
        border-radius: 15px;
        padding: 15px;
    }
    
    .gallery__colors {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 15px;
    }
    
    .gallery__color {
        width: 45px;
        height: 45px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* Информация о товаре - второй ряд */
    .info {
        grid-row: 2;
    }
    
    .info__description {
        text-align: center;
        font-size: 16px;
        line-height: 1.6;
        color: #555;
        max-width: 90%;
        margin: 0 auto 20px;
    }
    
    .info__price {
        text-align: center;
        font-size: 26px;
        margin-bottom: 25px;
        background: linear-gradient(145deg, #f8f8f8, #ffffff);
        padding: 15px;
        border-radius: 10px;
    }
    
    .info__price-value {
        font-size: 34px;
        color: #FFD700;
        display: block;
        margin-top: 5px;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    }
    
    /* Селектор цвета */
    .info__color-selector {
        background: #f9f9f9;
        padding: 20px;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .info__color-label {
        text-align: center;
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 15px;
        display: block;
    }
    
    .info__color-options {
        justify-content: center;
        gap: 20px;
    }
    
    .info__color-option {
        width: 55px;
        height: 55px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.15);
        transition: transform 0.2s;
    }
    
    .info__color-option:hover {
        transform: scale(1.1);
    }
    
    .info__color-name {
        text-align: center;
        margin-top: 15px;
        font-size: 16px;
        font-weight: 500;
    }
    
    /* Количество */
    .info__quantity {
        text-align: center;
        margin-bottom: 25px;
        background: #f9f9f9;
        padding: 20px;
        border-radius: 12px;
    }
    
    .info__quantity-label {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 12px;
        display: block;
    }
    
    .info__quantity-input {
        width: 120px;
        height: 50px;
        font-size: 20px;
        text-align: center;
        border: 2px solid #FFD700;
        border-radius: 8px;
        margin: 0 auto;
        display: block;
    }
    
    /* Кнопки друг над другом */
    .info__actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        margin-top: 10px;
    }
    
    .info__button {
        width: 100%;
        padding: 18px 20px;
        font-size: 18px;
        font-weight: bold;
        border-radius: 8px;
        transition: all 0.3s;
        box-sizing: border-box;
    }
    
    .info__button--primary {
        background-color: #FFD700;
        color: #000;
        border: 2px solid #FFD700;
    }
    
    .info__button--primary:hover {
        background-color: #000;
        color: #FFD700;
    }
    
    .info__button--secondary {
        background-color: #000;
        color: #FFD700;
        border: 2px solid #FFD700;
    }
    
    .info__button--secondary:hover {
        background-color: #FFD700;
        color: #000;
    }
}

/* Мобильные устройства (от 566px до 768px) */
@media (max-width: 768px) {
    .cart {
        margin: 20px 0;
        padding: 15px;
    }
    
    .cart__title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .cart__table {
        font-size: 14px;
        min-width: 500px; /* Уменьшаем минимальную ширину */
    }
    
    .cart__table th {
        padding: 10px;
        font-size: 13px;
    }
    
    .cart__table td {
        padding: 10px;
    }
    
    .cart__product-image {
        width: 50px;
        height: 50px;
    }
    
    .cart__quantity-input {
        width: 50px;
        padding: 6px;
    }
    
    .cart__remove-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .cart__total {
        font-size: 20px;
        padding: 12px;
    }
        .footer {
        padding: 25px 0;
    }
    
    .footer__container {
        padding: 0 15px;
    }
    
    .footer__copyright {
        font-size: 13px;
    }
    
    .footer__links {
        gap: 15px;
    }
    
    .footer__link {
        font-size: 13px;
    }
}

/* ========== ОСОБОЕ РЕШЕНИЕ ДЛЯ ЭКРАНОВ МЕНЬШЕ 565px ========== */
@media (max-width: 565px) {
    /* Скрываем таблицу */
    .cart__table {
        display: none;
    }
    
    /* Показываем карточки товаров */
    .cart__items-mobile {
        display: block !important;
    }
    
    /* Стили для карточек товаров на мобильных */
    .cart-mobile-item {
        background-color: #fff;
        border: 1px solid #eee;
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    
    .cart-mobile-header {
        display: flex;
        align-items: center;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
    }
    
    .cart-mobile-image {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 5px;
        margin-right: 12px;
    }
    
    .cart-mobile-title {
        flex: 1;
        font-weight: bold;
        color: #000;
        font-size: 16px;
    }
    
    .cart-mobile-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding: 5px 0;
    }
    
    .cart-mobile-label {
        color: #666;
        font-size: 14px;
        font-weight: normal;
    }
    
    .cart-mobile-value {
        font-weight: bold;
        color: #000;
    }
    
    .cart-mobile-color {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .cart-mobile-color-circle {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        border: 2px solid #ddd;
    }
    
    .cart-mobile-quantity {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .cart-mobile-quantity-input {
        width: 60px;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 5px;
        text-align: center;
        font-size: 14px;
    }
    
    .cart-mobile-price {
        font-size: 18px;
        color: #000;
    }
    
    .cart-mobile-price-value {
        color: #FFD700;
        font-weight: bold;
    }
    
    .cart-mobile-subtotal {
        font-size: 16px;
        font-weight: bold;
    }
    
    .cart-mobile-remove {
        background-color: #ff4444;
        color: white;
        border: none;
        padding: 8px 15px;
        border-radius: 5px;
        cursor: pointer;
        width: 100%;
        font-size: 14px;
        transition: background-color 0.3s;
        margin-top: 10px;
    }
    
    .cart-mobile-remove:hover {
        background-color: #cc0000;
    }
    
    /* Общая стоимость на мобильных */
    .cart__total {
        font-size: 18px;
        padding: 15px;
        margin: 20px 0;
        background-color: #000;
        color: #FFD700;
        border-radius: 8px;
        text-align: center;
    }
    
    .cart__total-value {
        color: #FFD700;
        font-size: 22px;
        display: block;
        margin-top: 5px;
    }
    
    /* Форма заказа на мобильных */
    .order-form {
        padding: 20px;
    }
    
    .order-form__title {
        font-size: 20px;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .order-form__input {
        padding: 12px;
        font-size: 16px; /* Увеличиваем для удобства на мобильных */
    }
    
    .order-form__submit {
        padding: 15px;
        font-size: 16px;
    }

    .footer {
        padding: 25px 0 20px;
        margin-top: 30px;
    }
    
    .footer__container {
        flex-direction: column; /* Меняем на вертикальное расположение */
        text-align: center;
        gap: 15px;
        padding: 0 15px;
    }
    
    .footer__copyright {
        font-size: 13px;
        order: 2; /* Копирайт снизу */
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 215, 0, 0.2); /* Тонкая линия сверху */
    }
    
    .footer__links {
        flex-direction: column; /* Ссылки друг под другом */
        gap: 12px;
        order: 1; /* Ссылки сверху */
        width: 100%;
    }
    
    .footer__link {
        font-size: 15px;
        padding: 8px 0; /* Увеличиваем область нажатия */
        display: block;
        width: 100%;
        background-color: rgba(255, 215, 0, 0.05);
        border-radius: 5px;
        transition: background-color 0.3s;
    }
    
    .footer__link:hover {
        background-color: rgba(255, 215, 0, 0.15);
        text-decoration: none;
    }
}

/* Для очень маленьких экранов (до 380px) */
@media (max-width: 380px) {
    .cart {
        padding: 10px;
    }
    
    .cart-mobile-item {
        padding: 12px;
    }
    
    .cart-mobile-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-mobile-title {
        font-size: 14px;
    }
    
    .cart-mobile-quantity-input {
        width: 50px;
        padding: 6px;
    }
    
    .cart-mobile-price {
        font-size: 16px;
    }
    
    .cart__total {
        font-size: 16px;
    }
    
    .cart__total-value {
        font-size: 20px;
    }

        .footer {
        padding: 20px 0 15px;
    }
    
    .footer__copyright {
        font-size: 12px;
    }
    
    .footer__link {
        font-size: 14px;
        padding: 6px 0;
    }
}