/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: #f0f0f0;
}

/* Ограничиваем ширину основного контента на десктопе */
@media (min-width: 992px) {
    main {
        max-width: 900px; /* ставьте любую желаемую ширину */
        margin: 0 auto; /* центрируем по горизонтали */
        padding: 0 1rem; /* если нужно отступы слева/справа */
    }
}
.btn-checkout {
    position: relative;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.btn-checkout::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);

    /* сюда переносим анимацию, делаем её медленнее */
    animation: shimmer 3s linear infinite;
    /* при желании:
     animation-delay: 1s;
     — тогда первая “полоса” будет с задержкой
  */
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* Если нужно только сузить слайдер */
@media (min-width: 992px) {
    .product-gallery .slider-container {
        max-width: 600px; /* ширина слайдера */
        margin: 0 auto; /* по центру */
    }
}

/* --- Header --- */
.site-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    background: #fff;
    border-bottom: 1px solid #ddd;
}
.site-header .btn svg {
    width: 24px;
    height: 24px;
    fill: #000;
}
.logo img {
    width: 200px;
    transform: translateX(10%);
}
@media (min-width: 768px) {
    .logo img {
        width: 200px;
    }
}
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
body {
    padding-top: 60px; /* Высота хедера */
}
.header-right {
    display: flex;
    gap: 0.5rem;
}
.search-btn {
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.search-btn:hover {
    background-color: #f0f0f0;
}
.search-btn i {
    font-size: 24px;
    color: #000;
    transition: color 0.2s ease;
}
.search-btn:hover i {
    color: #e60023;
}

/* --- Product Gallery --- */
.product-gallery {
    padding: 1rem;
    background: #fff;
    position: relative;
}
.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}
.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.gallery-btn i {
    font-size: 20px;
    color: #fff;
}
.prev-btn {
    left: 12px;
}
.next-btn {
    right: 12px;
}
.thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}
.thumbnails .thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    border-radius: 4px;
}
.thumbnails .thumb.active,
.thumbnails .thumb:hover {
    opacity: 1;
    border: 2px solid #000;
}

/* --- Product Info --- */
.policies-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}
.policy-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
    color: #333;
    text-align: center;
    flex: 1;
}
.policy-item i {
    font-size: 18px;
    color: #000;
}

.product-info {
    background: #fff;
    border-radius: 6px;
    padding: 0.5rem;
    margin: 0.5rem;
}
.product-info .rating {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    padding: 0.15rem 0;
}
.rating .stars i {
    font-size: 12px;
    color: #ffbb33;
    transition: transform 0.2s ease;
}
.rating .stars i:hover {
    transform: scale(1.1);
}
.sales {
    color: #666;
    font-size: 0.8rem;
    margin-left: 0.2rem;
}
.product-info .product-title {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.2rem 0;
}
.product-info .price-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.2rem 0;
}
.old-price {
    font-size: 1rem;
    color: #666;
    text-decoration: line-through;
    margin: 5px;
}
.offer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 0.5rem;
    background: #fff;
}
.offer-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.product-description {
    margin-top: 1rem;
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
}
.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
}
.description-header h2 {
    font-size: 1rem;
    margin: 0;
    color: #333;
}
.description-header i {
    font-size: 1.2rem;
    color: #333;
    transition: transform 0.3s ease;
}
.description-header i.active {
    transform: rotate(180deg);
}
.description-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.description-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #333;
}
.description-content.active {
    max-height: 500px; /* Достаточно для 5 строк */
}

.submit {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: center;
}
.offer-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}
.offer-price {
    font-size: 2.25rem;
    font-weight: bold;
    color: #e60023;
}
.offer-right .timer {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
}
.timer i {
    font-size: 14px;
    color: #000;
}

.submit {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.submit:hover {
    background-color: #333;
}

/* --- Related Products --- */
.related-products {
    padding: 1rem;
}
.related-products h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.related-item {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #333;
}
.related-item img {
    width: 100%;
    border-radius: 6px;
}
.related-item span {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* --- Reviews --- */
.reviews {
    margin-top: 1rem;
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
}
.reviews h2 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: #333;
}
.review-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.review {
    background: #fff;
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 6px;
}
.review-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.review-email {
    font-size: 0.85rem;
    color: #666;
}
.review-stars {
    display: flex;
    gap: 0.1rem;
    margin-bottom: 0.5rem;
}
.review-stars i {
    font-size: 12px;
    color: #ffbb33;
}
.review-text {
    font-size: 0.9rem;
    color: #333;
}

/* --- Transparent buttons --- */
.btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}
.btn i {
    font-size: 24px;
    color: #000;
}

/* --- Inline search box --- */
.inline-search {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #fff;
    padding: 0.5rem;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    display: none;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    margin-bottom: 0.25rem;
}
.inline-search.open {
    display: flex;
}
.inline-search input {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.inline-search .btn.find-btn {
    color: #000;
    font-size: 1rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid #000;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

/* BEGIN: Email Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #fff;
    padding: 1rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.modal-icon {
    font-size: 2rem;
}
#modal-text {
    text-align: center;
    margin: 0;
    font-size: 1rem;
    color: #333;
}
#email-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}
#apply-email-btn {
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    background: #000;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}
#apply-email-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
/* Cart page refinements */
.cart-wrapper {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Общий контейнер товара */
.cart-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* ← здесь добавляем: */
    position: relative;
    overflow: hidden;
}

/* Левая колонка: изображение плюс кнопки */
.cart-image-block {
    width: 35%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-image {
    width: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.cart-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

/* Правая колонка: название и цена */
.cart-details {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.cart-price {
    font-size: 1.25rem;
    color: #e53935;
    margin: 0;
}

/* Описание товара (по умолчанию раскрыто) */
.product-description {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    overflow: hidden;
}

.product-description .description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: #f9f9f9;
}

.product-description .description-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.product-description.open .description-content {
    max-height: none;
    padding: 1rem 1.5rem;
}

.product-description .description-content {
    max-height: 0;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.product-description.open .bx-chevron-up {
    transform: rotate(0deg);
}

.product-description:not(.open) .bx-chevron-up {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.cart-wrapper {
    max-width: 600px;
    margin: 1rem auto;
    padding: 0 1rem;
}
.page-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.cart-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* ← здесь добавляем: */
    position: relative;
    overflow: hidden;
}
.cart-image-container {
    width: 80px;
    height: 80px;
    margin: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
.cart-details {
    flex: 1;
    /* сверху/снизу 1rem, справа/слева 2rem */
    padding: 1rem 2rem;
    position: relative;
}
.cart-title {
    font-size: 1rem;
    font-weight: normal;
    margin: 0 0 0.25rem;
    line-height: 1.2;
}
.description-label {
    font-size: 0.9rem;
    color: #777;
    margin: 0 0 0.5rem;
}
.delete-container {
    position: absolute;
    top: 1rem;
    right: 0.5rem;
}
.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #777;
}
.delete-btn:hover {
    color: #e53935;
}
.timer {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
    margin-top: 0.5rem;
}
.timer i {
    margin-right: 0.5rem;
    font-size: 1rem;
}
.summary.full-width {
    background: #fff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}
.summary-divider {
    border-top: 1px solid #ddd;
    margin: 0.5rem 0;
}
.summary-item.total {
    font-weight: bold;
}
.summary-item .value {
    color: #000;
}
.divider {
    margin: 1rem 0;
    border: none;
    border-top: 1px solid #ddd;
}
.section-title {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}
/* Общие стили футера */
.site-footer {
    background-color: #f8f8f8;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Сетка секций */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

/* Заголовки секций */
.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: #111;
}

/* Списки ссылок */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li + li {
    margin-top: 0.5rem;
}
.footer-links a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: #000;
}

/* Социальные иконки */
.social-icons a {
    font-size: 1.5rem;
    margin-right: 0.7rem;
    color: #555;
    transition: color 0.2s;
}
.social-icons a:hover {
    color: #000;
}

/* Нижняя полоса с копирайтом */
.footer-bottom {
    background-color: #e0e0e0;
    text-align: center;
    padding: 1rem 0;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #666;
}

/* --- Side-menu & overlay --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s,
        visibility 0.3s;
    z-index: 999;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transition: left 0.3s;
    z-index: 1000;
    padding: 1.5rem 1rem;
}

.side-menu.open {
    left: 0;
}
.overlay.open {
    opacity: 1;
    visibility: visible;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.side-nav {
    display: flex;
    flex-direction: column;
}
.side-nav a {
    margin: 0.5rem 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.side-nav a:hover {
    color: #000;
}
