:root[data-theme="light"] {
    --background: #e3e5e9;
    --text-color: #1d1d1d;
    --search-bar-wrapper-bg: linear-gradient(135deg, #f1f2f5, #dfe3e8, #b0c4d0);
    --hamburger-button-color: #1d1d1d;
    --shop-title-color: linear-gradient(135deg, #1c1c1c, #303030, #1c1c1c);
    --nav-button-bg: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    --nav-button-color: #1d1d1d;
    --reset-btn-bg: #a0a0a0;
    --reset-btn-color: #1d1d1d;
    --search-btn-bg: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    --search-btn-color: #1d1d1d;
    --affiliate-marquee-color: #1d1d1d;
    --sidebar-bg: linear-gradient(135deg, #f1f2f5, #dfe3e8, #b0c4d0);
    --sidebar-h3-color: #1d1d1d;
    --sort-section-bg: #fff;
    --sort-bg: #e3e5e9;
    --sort-hover-bg: #a0a0a0;
    --sort-active-bg: #1d1d1d;
    --sort-active-color: #fff;
    --category-options-bg: #fff;
    --subcategory-list-li-bg: #e3e5e9;
    --dropdown-bg: #f1f2f5;
    --dropdown-options-bg: #f1f2f5;
    --dropdown-li: #e3e5e9;
    --dropdown-li-bg-active: #1d1d1d;
    --dropdown-li-color-active: #fff;
    --right-panel-bg: #f1f2f5;
    --background-modal-overlay: linear-gradient(135deg, #f1f2f5, #dfe3e8, #b0c4d0);
    --background-modal-content: linear-gradient(135deg, #f1f2f5, #dfe3e8, #b0c4d0);
    --color-category-title: #1d1d1d;
    --allcategory-bg: transparent;
    --color-scrollbar-thumb: #fff;
    --color-scrollbar-thumb-hover: #a0a0a0;
    --scrollbar-color: #fff transparent;
    --color-top-title: #1d1d1d;
    --scroll-top-bg: #fff;
    --scroll-top-color: #1d1d1d;
    --scroll-thumb: #fff;
    --scroll-thumb-hover: #a0a0a0;
    --fullscreen-bg: #e3e5e9;
    --admin-form-bg: #f1f2f5;
    --title-color: #1d1d1d;
    --add-button-bg: #a0a0a0;
    --delete-button-bg: #a0a0a0;
    --delete-button-color: red;
    --delete-button-border: red;
    --delete-button-hover-bg: red;
    --delete-button-hover-color: #000;
    --delete-product-button-bg: #a0a0a0;
    --delete-product-button-color: red;
    --delete-product-button-border: red;
    --suggestion-bg: #e3e5e9;
    --suggestion-hover-bg: #a0a0a0;
    --buy-button-bg: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    --buy-button-color: #1d1d1d;
    --btn-submit-bg: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    --btn-submit-color: #1d1d1d;
    --star-inactive: #a0a0a0;
    --edit-button-bg: #a0a0a0;
    --edit-button-color: #1d1d1d;
    --custom-file-bg: #1d1d1d70;
    --custom-file-hover: #1d1d1d;
    --close-bg: black;
    --product-bg: linear-gradient(135deg, #f1f2f5, #dfe3e8, #b0c4d0);
    --buy-color: #1d1d1d;
    --buy-bg: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    --prise-color: black;
    --description-color: #555;
    --image-indicator-color: #55555570;
    --description-bg: #e3e5e9;
    --cart-modal-bg: linear-gradient(135deg, #f1f2f5, #dfe3e8, #b0c4d0);
    --cart-cell-bg: linear-gradient(135deg, #f1f2f5, #dfe3e8, #b0c4d0);
    --floating-label-input-label-color: #00000090;
    --floating-label-input-label-focus-color: #00000090;
    --contact-seller-color: black;
    --description-strong-color: black;
}

:root[data-theme="dark"] {
    --background: black;
    --text-color: white;
    --search-bar-wrapper-bg: linear-gradient(135deg, #1c1c1c, #303030, #1c1c1c);
    --hamburger-button-color: #eaeaea;
    --shop-title-color: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    --nav-button-bg: #eaeaea;
    --nav-button-color: #0f0f0f;
    --reset-btn-bg: #777;
    --reset-btn-color: white;
    --search-btn-bg: white;
    --search-btn-color: black;
    --affiliate-marquee-color: #eaeaea;
    --sidebar-bg: linear-gradient(135deg, #1c1c1c, #303030, #1c1c1c);
    --sidebar-h3-color: #fff;
    --sort-section-bg: #000;
    --sort-bg: #555;
    --sort-hover-bg: #eaeaea;
    --sort-active-bg: #ffffff;
    --sort-active-color: #000;
    --category-options-bg: #000;
    --subcategory-list-li-bg: #555;
    --dropdown-bg: #1b1b1b;
    --dropdown-options-bg: #0f0f0f;
    --dropdown-li: #555;
    --dropdown-li-bg-active: #fff;
    --dropdown-li-color-active: #000;
    --right-panel-bg: #000000;
    --background-modal-overlay: linear-gradient(135deg, #1c1c1c, #303030, #1c1c1c);
    --background-modal-content: linear-gradient(135deg, #1c1c1c, #303030, #1c1c1c);
    --color-category-title: #fff;
    --allcategory-bg: transparent;
    --color-scrollbar-thumb: #888;
    --color-scrollbar-thumb-hover: #555;
    --scrollbar-color: #888 transparent;
    --color-top-title: #fff;
    --scroll-top-bg: #333;
    --scroll-top-color: white;
    --scroll-thumb: #888;
    --scroll-thumb-hover: #555;
    --fullscreen-bg: rgba(0, 0, 0, 0.95);
    --admin-form-bg: linear-gradient(135deg, #1c1c1c, #303030, #1c1c1c);
    --title-color: #f1f2f5;
    --add-button-bg: #2e2e2e;
    --delete-button-bg: #2e2e2e;
    --delete-button-color: #ff4444;
    --delete-button-border: #ff4444;
    --delete-button-hover-bg: #ff4444;
    --delete-button-hover-color: #000;
    --delete-product-button-bg: #2e2e2e;
    --delete-product-button-color: #ff4444;
    --delete-product-button-border: #ff4444;
    --suggestion-bg: #777;
    --suggestion-hover-bg: #f0f0f0;
    --buy-button-bg: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    --buy-button-color: black;
    --btn-submit-bg: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    --btn-submit-color: black;
    --star-inactive: #ccc;
    --edit-button-bg: #2e2e2e;
    --edit-button-color: #d78c00;
    --custom-file-bg: #4CAF5050;
    --custom-file-hover: #45a049;
    --close-bg: white;
    --product-bg: linear-gradient(135deg, #1c1c1c, #303030, #1c1c1c);
    --buy-color: black;
    --buy-bg: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    --prise-color: black;
    --description-color: #8a8a8a;
    --image-indicator-color: #555;
    --description-bg: #2e2e2e;
    --cart-modal-bg: linear-gradient(135deg, #1c1c1c, #303030, #1c1c1c);
    --cart-cell-bg: linear-gradient(135deg, #1c1c1c, #303030, #1c1c1c);
    --floating-label-input-label-color: #00000090;
    --floating-label-input-label-focus-color: #ffffff90;
    --contact-seller-color: black;
    --description-strong-color: white;
}

@font-face {
    font-family: 'Neon80s';
    src: url('/fonts/Neon.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'flash';
    src: url('/fonts/flash.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Pixel';
    src: url('/fonts/pixel_lcd_7.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

html,
body {
    scrollbar-gutter: stable;
    /* для Chromium-браузеров */
}

#root {
    width: 100vw;
    height: 100vh;
}

body {
    font-family: sans-serif;
    background: var(--background);
    color: var(--text-color);
    width: 100%;
    height: 100%;
}

td {
    text-align: center;
    border-radius: 0.5rem;
    background: var(--cart-cell-bg);
    padding: 5px;
}

.center-flex {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-fade {
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

.image-fade.fade-out {
    opacity: 0;
}


.background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    padding: 0;
    margin: 0;
    border: none;
    display: block;
    font-family: 'flash';
    pointer-events: none;
    /* Чтобы не мешал кликам */
}


.login-screen {
    position: fixed;
    /* или absolute, если нужно внутри родителя */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}


.login-screen input {
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 0.5rem;
}

.login-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.title {
    display: flex;
    justify-content: center;
    font-size: 25px;
    color: var(--title-color);
    margin: 0;
}

.footer {
    color: #555;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--search-bar-wrapper-bg);
    gap: 10px;
    padding: 16px;
    margin-bottom: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html::-webkit-scrollbar {
    display: none;
}

.sidebar-logo {
    display: none;
}

.logo-image {
    height: 40px;
    object-fit: contain;
    margin-left: 80px;
    margin-top: 3px;
}

.left-side {
    display: flex;
    align-items: center;
    gap: 10px;
    /* расстояние между кнопкой, логотипом и заголовком */
}

.search-bar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--search-bar-wrapper-bg);
    padding: 10px 0;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.reset-search-button {
    padding: 6px;
    font-size: 15px;
    background: var(--reset-btn-bg);
    color: var(--reset-btn-color);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    width: auto;
    transition: transform 0.3s ease;
}

.reset-search-button:hover {
    transform: scale(1.1);
}

.search-input {
    padding: 15px;
    border-radius: 0.5rem;
    width: 300px;
    height: 10px;
    font-size: 16px;
    border: none;
}

.search-button {
    padding: 6px;
    font-size: 15px;
    background: var(--search-btn-bg);
    color: var(--search-btn-color);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    width: auto;
    transition: transform 0.3s ease;
}

.search-button:hover {
    transform: scale(1.1);
}

.admin-exit-button {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 6px;
    font-size: 15px;
    background: red;
    color: black;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    width: auto;
    transition: transform 0.3s ease;
}

.admin-exit-button:hover {
    transform: scale(1.1);
}

.user-login-button {
    border-radius: 0.5rem;
    padding: 5px;
    cursor: pointer;
    margin-top: 10px;
    width: 150px;
    border: none;
    background: white;
    transition: transform 0.3s ease;
    color: black;
}

.user-login-button:hover {
    transform: scale(1.05);
}

.orders-button {
    border-radius: 0.5rem;
    padding: 5px;
    cursor: pointer;
    margin: 10px 10px 0 10px;
    width: 150px;
    border: none;
    color: black;
    background: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    transition: transform 0.3s ease;
}

.orders-button:hover {
    transform: scale(1.05);
}

.buy-with-crypto-button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.nowpayments-button {
    height: 48px;
}

:root[data-theme="light"] .nowpayments-button {
    content: url('https://nowpayments.io/images/embeds/payment-button-white.svg');
}

:root[data-theme="dark"] .nowpayments-button {
    content: url('https://nowpayments.io/images/embeds/payment-button-black.svg');
}

.buy-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spiner 1s linear infinite;
    margin: auto;
}

@keyframes spiner {
    to {
        transform: rotate(360deg);
    }
}


.logout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: red;
}

.user-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-card {
    border-radius: 0.5rem;
    padding: 16px;
    margin-bottom: 20px;
    background: var(--cart-cell-bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.order-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.order-card-image {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 0.5rem;
}

.order-card-title {
    font-weight: bold;
    font-size: 18px;
}

.order-card-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 5px;
    margin-top: 12px;
    border-bottom: 1px solid #555;
    text-align: center;
    align-items: center;
    padding-bottom: 5px;
}

.font-medium {
    border: 1px solid #555;
    border-radius: 0.5rem;
    padding: 2px 0;
}

.shipping-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.order-status {
    padding: 4px 8px;
    border-radius: 8px;
    color: white;
}

.order-status.waiting {
    background-color: orange;
}

.order-status.finished {
    background-color: green;
}

.order-status.default {
    background-color: gray;
}

.ship-status {
    display: inline-block;
    border-radius: 0.5rem;
    padding: 4px 8px;
}

.ship-status.sent {
    background-color: green;
}

.ship-status.not-sent {
    background-color: red;
}

.delete-section {
    margin-top: 16px;
}

.delete-order-button {
    background-color: var(--delete-button-bg);
    color: var(--delete-button-color);
    border: 1px solid var(--delete-button-border);
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 0.5rem;
    margin-top: 5px;
    margin-bottom: 20px;
    cursor: pointer;
}

.pay-button {
    background: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    padding: 10px 20px;
    border: none;
    border-radius: 0.5rem;
    font-size: 20px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 90%;
    transition: transform 0.3s ease;
}

.pay-button:hover {
    transform: scale(1.05);
}

.pay-now-text {
    font-size: 20px;
    font-weight: bold;
}

.pay-description {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cart-cell-bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-cart-left,
.modal-cart-right {
    margin: 10px;
    flex: 1;
    position: relative;
    min-width: 400px;
    max-width: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-direction: column;
}

.address-input {
    width: 90%;
    height: 40px;
    border: none;
    border-radius: 0.5rem;
    margin-bottom: 20px;
}

.clear-button {
    border: none;
    border-radius: 0.5rem;
    padding: 2px 4px;
    margin-bottom: 10px;
    cursor: pointer;
    background: #580000;
    color: #fff;
    transition: transform 0.3s ease;
}

.clear-button:hover {
    transform: scale(1.05);
}



.date-separator {
    margin: 20px 0 10px;
    font-weight: bold;
    font-size: 18px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

.orders-wrapper {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.back-button {
    margin-bottom: 20px;
    padding: 8px 16px;
    border-radius: 0.5rem;
    cursor: pointer;
    border: none;
    transition: transform 0.3s ease;
}

.back-button:hover {
    transform: scale(1.05);
}

.orders-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
}

.orders-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-main {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.order-image img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 0.5rem;
}

.order-info {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.order-info input {
    border: none;
    border-radius: 0.5rem;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 0.5rem;
    color: white;
    font-weight: bold;
}

.status-badge.waiting {
    background-color: orange;
}

.status-badge.finished {
    background-color: green;
}

.status-badge.pending {
    background-color: #5d2e00;
}

.status-badge.expired {
    background-color: red;
}

.shipped-button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}

.shipped-button.sent {
    background-color: green;
}

.shipped-button.notsent {
    background-color: red;
}

.order-extra {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #555;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    font-size: 14px;
}







.theme-toggle {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 1;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #a0a0a0;
    transition: 0.4s;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 999px;
    padding: 0;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 999px;
}

input:checked+.slider:before {
    transform: translateX(36px);
}

input:checked+.slider {
    background: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
}

.slide {
    position: absolute;
    cursor: pointer;
    background-color: red;
    transition: 0.4s;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.5rem;
    padding: 0;
}

.slide:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 0.5rem;
}

input:checked+.slide:before {
    transform: translateX(36px);
}

input:checked+.slide {
    background-color: green;
}


.affiliate-marquee {
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    border: none;
    padding: 5px 0;
    position: relative;
    font-size: 20px;
    color: #1d1d1d;
    white-space: nowrap;
    top: 63px;
}

.affiliate-marquee p {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 25s linear infinite;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}


.hamburger-button {
    position: fixed;
    left: 20px;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--hamburger-button-color);
    z-index: 11;
}


.nav-title-wrapper {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin: 0;
    font-family: 'flash';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Базовый стиль ссылок */
.shop-link {
    text-decoration: none;
}

/* Заголовок */
.shop-title {
    font-family: 'flash';
    pointer-events: none;
    font-size: 20px;
    background: var(--shop-title-color);
    cursor: pointer;
    position: relative;
    padding-top: 7px;
    padding-bottom: 7px;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}



/* Линии */
.shop-title::before,
.shop-title::after {
    content: "";
    position: absolute;
    background: var(--shop-title-color);
    height: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: transform;
}

/* Верхняя линия — справа налево */
.shop-title::before {
    width: 90%;
    top: 0;
    right: -8%;
    transform: scaleX(0);
    transform-origin: right center;
}

/* Нижняя линия — слева направо */
.shop-title::after {
    width: 90%;
    bottom: 0;
    left: -8%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left center;
}

/* Активная — обе линии видимы */
.shop-link.active .shop-title::before,
.shop-link.active .shop-title::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Прячем линии у активной при наведении на другие */
.nav-title-wrapper:hover .shop-link.active:not(:hover) .shop-title::before,
.nav-title-wrapper:hover .shop-link.active:not(:hover) .shop-title::after {
    opacity: 0;
    transform: scaleX(0);
}

/* Показываем линии при ховере */
.shop-link:hover .shop-title::before,
.shop-link:hover .shop-title::after {
    opacity: 1;
    transform: scaleX(1);
}


.admin-button-wrapper {
    margin: 20px 0;
    text-align: center;
}

.nav-select {
    display: inline-block;
    padding: 8px 16px;
    background: var(--nav-button-bg);
    color: var(--nav-button-color);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 20px;
}

.admin-button {
    display: inline-block;
    padding: 8px 16px;
    background: var(--nav-button-bg);
    color: var(--nav-button-color);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 20px;
    transition: transform 0.3s ease;
}

.admin-button:hover {
    transform: scale(1.1);
}


.sidebar-controls.open {
    left: 0;
}

.close-sidebar-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--close-bg);
    background: transparent;
    font-size: 30px;
}

.sidebar-inner {
    padding: none;
    margin-top: 30px;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9;
}

.sidebar-controls {
    position: fixed;
    left: -300px;
    top: 0;
    width: 300px;
    padding: 16px;
    background: var(--sidebar-bg);
    border: 0;
    height: 100%;
    overflow-y: auto;
    z-index: 12;
    text-align: center;
    transition: left 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.sidebar-controls.open {
    left: 0;
}


.sidebar-controls h3 {
    font-size: 24px;
    padding: 5px;
    width: auto;
    color: var(--sidebar-h3-color);
}

.sort-section {
    border-radius: 0.5rem;
    background: var(--sort-section-bg);
    padding: 5px;
}

.category-section {
    margin-top: 10px;
    background: var(--category-options-bg);
    border-radius: 0.5rem;
    padding-top: 5px;
}

.price-wrapper {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: flex-end;
}

.total-category-price {
    color: rgb(0, 175, 0);
    font-weight: bold;
}

.typical-category-price {
    text-decoration: line-through;
    color: #ff000080;
    font-size: 13px;
}

.sort-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sort-options li {
    padding: 5px;
    cursor: pointer;
    border-radius: 0.5rem;
    color: var(--sidebar-h3-color);
    margin-bottom: 3px;
    background: var(--sort-bg);
    transition: background 0.3s ease, color 0.3s ease;
}

.sort-options li:hover {
    background: var(--sort-hover-bg);
    color: #000;
}

.sort-options .active {
    background: var(--sort-active-bg);
    font-weight: bold;
    color: var(--sort-active-color);
}

.category-options {
    list-style: none;
    padding: 5px;
    margin: 0;
    border-radius: 0.5rem;
}

.category-options li {
    padding: none;
    cursor: pointer;
    border-radius: 0.5rem;
    color: var(--sidebar-h3-color);
    margin-bottom: 10px;
    transition: background 0.3s ease, color 0.3s ease;
}

.main-category {
    font-size: 20px;
}

.subcategory-list li:hover {
    background: var(--sort-hover-bg);
    color: #000;
}


.subcategory-list .active {
    background: var(--sort-active-bg);
    font-weight: bold;
    color: var(--sort-active-color);
}

.subcategory-list li {
    list-style: none;
    background: var(--subcategory-list-li-bg);
    border-radius: 0.5rem;
    margin-bottom: 3px;
    padding: 5px;
    font-size: 16px;
}

.rigth-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 220px;
    padding: 16px;
    background: var(--right-panel-bg);
    border: 0;
    height: 100%;
    overflow-y: auto;
    z-index: 10;
    text-align: center;
    transition: background 0.3s ease, color 0.3s ease;
}

.content {
    flex: 1;
    text-align: center;
    justify-items: center;
    width: auto;
    margin-top: 85px;
    margin-bottom: 0;
    min-height: 100vh;
}

/* =================== Grid =================== */
.top-products-section,
.all-category {
    width: 100%;
    box-sizing: border-box;
}

.top-products-section {
    margin-bottom: 15px;
}

.grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 0;
    width: 100%;
}

.product-card-wrapper {
    flex: 0 0 auto;
}

.top-title {
    font-size: 30px;
    color: var(--color-top-title);
    padding-top: 10px;
}

/* =================== Scroll =================== */
.main-category-section {
    margin-bottom: 15px;
}

.scroll-wrapper {
    overflow-x: auto;
    background: transparent;
    overflow-y: hidden;
    padding: 0px 10px;
    border: 0;
    border-radius: 0.5rem;
    box-sizing: border-box;
    scrollbar-color: var(--scrollbar-color);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: 10px;
    max-width: 100vw;
}

.scroll-inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    scroll-snap-type: x mandatory;
    box-sizing: border-box;
    padding: 10px 0;
}



/* =================== Category =================== */
.category-title {
    color: var(--color-category-title);
    font-size: 30px;
    margin: 20px 0 30px 0;
    border-radius: 0.5rem;
    width: 100%;
}

#allcategory {
    color: var(--color-category-title);
    font-size: 30px;
    margin: 0;
    background: var(--allcategory-bg);
}

/* =================== Scroll-to-top =================== */
.scroll-to-top {
    position: fixed;
    bottom: 56px;
    right: 21px;
    z-index: 999;
    padding: 5px;
    font-size: 20px;
    background: var(--scroll-top-bg);
    color: var(--scroll-top-color);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease, background 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top:hover {
    background-color: var(--color-scrollbar-thumb-hover);
}

/* =================== Modal =================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-modal-overlay);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1010;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    color: black;
}

.modal-content {
    background: var(--background-modal-content);
    width: 100%;
    height: 100%;
    display: flex;
    border-radius: 0.5rem;
    padding: 20px;
    position: relative;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =================== Modal Left =================== */
.modal-left {
    position: relative;
    width: 50%;
    height: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-direction: column;
}

.image-wrapper {
    width: 100%;
    max-width: 1300px;
    height: 95%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.modal-scroll-wrapper {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.modal-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.modal-scroll-inner {
    display: flex;
    height: 100%;
    align-items: center;
    gap: 1rem;
    scroll-snap-type: x mandatory;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    scroll-snap-align: center;
    flex: 0 0 auto;
}

/* Скроллим только описание */
.description {
    margin-top: 0;
    overflow-y: auto;
    font-size: 1rem;
    color: var(--description-color);
    padding: 10px;
    scrollbar-color: var(--scroll-thumb) transparent;
    scrollbar-width: 10px;
    background: var(--description-bg);
    border-radius: 0.5rem;
}

.description p {
    line-height: 1.5;
}

.description ul {
    border-bottom: 1px solid #555;
}

.description li {
    list-style: none;
}

.description strong,
.description h3,
.description h2,
.description h1 {
    color: var(--description-strong-color);
}

.description img {
    width: 50%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 8px;
    /* по желанию */
}

.tiptap-editor {
    position: relative;
    height: 800px;
    width: 100%;
    border: none;
    padding: 5px;
    border-radius: 8px;
    background-color: #fff;
    overflow-y: auto;
    color: #000;
}

.tiptap-editor img {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 10px 0;
}

.delete-image-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    color: red;
    border: none;
    cursor: pointer;
    font-size: 20px;
    z-index: 100;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    /* расстояние между кнопками */
    margin-bottom: 8px;
}

.toolbar-button {
    padding: 0 5px;
    border: none;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 20px;
    border-radius: 4px;
    transition: transform 0.1s ease;
    color: #000;
    min-width: 30px !important;
    width: auto !important;
    margin: 0 !important;
}

.toolbar-button.is-active {
    background: #dbeafe;
    /* светло-синий фон */
    transform: scale(1.15);
    /* увеличение активной кнопки */
    font-weight: bold;
    border-color: #3b82f6;
}

.marketplace-links {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
}

.marketplace-button {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 5px;
    padding: 1px;
    background-color: #007bff;
    color: black;
    border-radius: 0.5rem;
    text-decoration: none;
}

.marketplace-button:hover {
    background-color: #0056b3;
}


/* Для Chrome, Safari и Edge */
.scroll-wrapper::-webkit-scrollbar {
    height: 10px;
}

.scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 10px;
}

.scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
}

/* ================= Fullscreen Overlay ================= */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fullscreen-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.fullscreen-image {
    max-width: 98%;
    max-height: 98%;
    border-radius: 0.5rem;
    cursor: zoom-out;
}

/* ================= Arrow Buttons ================= */
.fullscreen-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 5px 0px;
    border-radius: 0.5rem;
    cursor: pointer;
    z-index: 10000;
    height: 60%;
    width: 50px;
}

.fullscreen-arrow.left {
    left: 20px;
}

.fullscreen-arrow.right {
    right: 20px;
}

.fullscreen-arrow svg {
    display: block;
    margin: auto;
}

/* ================= Modal Right ================= */
.modal-right {
    flex: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 20px 0px 10px 0px;
}

.contact-seller {
    background: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    color: var(--contact-seller-color);
    border: none;
    font-size: 16px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    width: 100%;
    border-radius: 0.5rem;
}

.low-stock-label {
    background: linear-gradient(135deg, #ffa600, #ff7300, #ff4d00);
    width: 100%;
    text-align: center;
    border-Radius: 0.5rem;
    font-Weight: bold;
    margin-bottom: 10px;
    color: black;
}

.modal-top {
    text-align: center;
    align-items: center;
    justify-content: center;
}

#product-name {
    font-size: 25px;
    color: var(--text-color);
}

.price-buy-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 10px;
}

.modal-price-wrapper {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 0 10px 0;
    padding: 0px;
    align-items: flex-end;
}

.price {
    font-weight: bold;
    font-size: 1.5rem;
    color: #008f00;
    align-items: flex-end;
}

.typical_price {
    font-size: 1.2rem;
    color: #ff000070;
    text-decoration: line-through;
}

.buy-button {
    background: var(--buy-button-bg);
    color: var(--buy-button-color);
    padding: 10px 15px;
    text-align: center;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 20px;
    animation: pulse 2s infinite;
    transition: transform 0.5s ease, background 0.5s ease;
    font-weight: bold;
    border: none;
}

.buy-button:hover {
    animation: none;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 90%;
    margin: 20px auto;
    align-items: center;
    justify-content: center;
    background: var(--admin-form-bg);
    padding: 50px;
    border-radius: 0.5rem;
}

.admin-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 5px;
}

.add-button {
    background-color: var(--add-button-bg);
    color: #00ff00;
    border: 1px solid #00ff00;
    font-size: 20px;
    padding: 5px 0;
    width: 250px;
    border-radius: 0.5rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-icon {
    animation: spin 1s linear infinite;
    width: 60px;
    height: 60px;
}

.spinner-icon .path {
    stroke: #3498db;
    stroke-linecap: round;
    stroke-dasharray: 126;
    /* Чтобы круг заполнился */
    stroke-dashoffset: 0;
    transform-origin: 50% 50%;
    animation: dash 1.5s ease-in-out infinite, spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dashoffset: 126;
    }

    50% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: 126;
    }
}



.add-button:hover,
.add-button.active {
    background-color: #00ff00;
    color: black;
}

.delete-button {
    background-color: var(--delete-button-bg);
    color: var(--delete-button-color);
    border: 1px solid var(--delete-button-border);
    font-size: 20px;
    padding: 5px 0;
    width: 250px;
    border-radius: 0.5rem;
}

.delete-button:hover,
.delete-button.active {
    background-color: var(--delete-button-hover-bg);
    color: var(--delete-button-hover-color);
}

.delete-product-button {
    margin-top: 50px;
    padding: 10px;
    font-size: 30px;
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--delete-product-button-bg);
    color: var(--delete-product-button-color);
    border: 1px solid red;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.delete-product-button:hover {
    background-color: var(--delete-button-hover-bg);
    color: #fff;
}

.form-columns {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    width: 80vw;
    height: 100%;
}

.form-left,
.form-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.admin-form input {
    padding: 5px;
    font-size: 1rem;
    border-radius: 0.5rem;
    width: 100%;
    height: 30px;
    border: none;
}



.floating-label-input {
    position: relative;
    margin-bottom: 10px;
}

.floating-label-input input {
    width: 100%;
    padding: 14px 12px 6px;
    font-size: 16px;
    border: 1px solid #999;
    border-radius: 6px;
    background: #fff;
    outline: none;
    color: black;
}

.floating-label-input label {
    position: absolute;
    top: 8px;
    left: 12px;
    /* адаптируй под свою тему */
    padding: 0 4px;
    font-size: 16px;
    transition: 0.2s ease all;
    pointer-events: none;
    color: var(--floating-label-input-label-color);
    text-transform: capitalize;
}

/* Когда фокус или не пустое значение — поднимаем label */
.floating-label-input input:focus+label,
.floating-label-input input:not(:placeholder-shown)+label {
    top: -18px;
    left: 10px;
    font-size: 16px;
    color: var(--floating-label-input-label-focus-color);
}





/* Стиль для нераскрытого селекта */
.input-with-clear select {
    background-color: #fff;
    border: none;
    padding: 10px;
    font-size: 16px;
    color: #1d1d1d;
    cursor: pointer;
    border-radius: 0.5rem;
}



.custom-category-input {
    position: relative;
}

.suggestions-list {
    position: absolute;
    z-index: 10;
    background: var(--suggestion-bg);
    border: none;
    border-radius: 0.5rem;
    width: 100%;
    height: auto;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
    box-shadow: none;
}

.suggestions-list li {
    padding: 5px;
    cursor: pointer;
    text-align: center;
    border: 1px solid #000;
}

.suggestions-list li:hover {
    background-color: var(--suggestion-hover-bg);
    color: #000;
}

.input-with-clear {
    margin-bottom: 0px;
}

.input-with-clear input {
    flex: 1;
}

.clear-button-outside {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: black;
}

.clear-button-stars {
    position: relative;
    left: 8px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: red;
}

.description-textarea {
    height: 50vh;
    resize: none;
    font-size: 20px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0.5rem;
}

button[type="submit"] {
    background: var(--btn-submit-bg);
    color: var(--btn-submit-color);
    padding: 10px;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 30px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

button[type="submit"]:hover {
    transform: scale(1.1);
}

.form-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 10px;
    width: 100%;
}

.image-link-input {
    width: 90%;
    border-radius: 0.5rem;
}

.preview-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}

.preview-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.star-rating {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 24px;
    color: var(--star-inactive);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.star.active {
    color: #f39c12;
}

.star:hover {
    color: #f1c40f;
}

.custom-file-button {
    background-color: var(--custom-file-bg);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.custom-file-button:hover {
    background-color: var(--custom-file-hover);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.file-button-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reset-button {
    background: transparent;
    border: none;
    color: red;
    font-size: 30px;
    cursor: pointer;
}

h4 {
    text-align: center;
}

.edit-button {
    background-color: var(--edit-button-bg);
    color: var(--edit-button-color);
    font-size: 20px;
    width: 250px;
    padding: 5px 0;
    border-radius: 0.5rem;
    border: 1px solid var(--edit-button-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.edit-button:hover,
.edit-button.active {
    background-color: #d78c00;
    color: #000;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.load-product-button {
    background-color: #958400;
    color: black;
    padding: 5px;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 16px;
    width: 200px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.load-product-button:hover {
    background-color: #958400;
    transform: scale(1.05);
}

.form-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
}

.edit-images-section {
    margin-top: 1rem;
}

.image-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.image-preview-item {
    position: relative;
    cursor: grab;
    transition: transform 0.2s ease;
}

.image-preview-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
}

.image-preview-item:active {
    cursor: grabbing;
    transform: scale(1.02);
}

.preview-delete-button {
    position: absolute;
    top: -6px;
    right: -6px;
    background: transparent;
    color: red;
    border: none;
    cursor: pointer;
    font-size: 20px;
}

.preview-delete-button:hover {
    transform: scale(1.1);
}

@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(2deg);
    }

    50% {
        transform: rotate(-2deg);
    }

    75% {
        transform: rotate(2deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* ================= Arrow Button ================= */
.arrow-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border-radius: 0.5rem;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 0px;
    z-index: 2;
    height: 100%;
    width: 50px;
}

.arrow-button svg {
    display: block;
    margin: auto;
}

.arrow-button.left {
    left: 0px;
}

.arrow-button.right {
    right: 0px;
}

/* ================= Image Indicator ================= */
.image-indicator {
    margin-top: 8px;
    padding: 0;
    font-size: 18px;
    color: var(--image-indicator-color);
}

/* ================= Close Button ================= */
.close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--close-bg);
    border: none;
    padding: 6px;
    border-radius: 0.5rem;
    cursor: pointer;
    z-index: 3;
    transition: background 0.3s ease;
    color: white;
}

.close-button:hover {
    background: var(--close-bg-hover);
}

.close-button svg {
    display: block;
    margin: auto;
}

/* ================= Product ID ================= */
.product-id {
    position: absolute;
    bottom: 0px;
    right: 22px;
    font-size: 12px;
}

/* ================= Product Card Styles ================= */

.add-to-cart-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.condition-select {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #cbf206;
    padding: 2px 10px;
    margin: 10px;
    font-size: 18px;
    color: black;
    cursor: pointer;
}

.add-to-cart-button {
    background: linear-gradient(135deg, #cbf206, #a8f000, #6be100);
    color: black;
    border: none;
    padding: 6px 20px 4px 20px;
    cursor: pointer;
    align-items: center;
    transition: color 0.3s ease;
    font-size: 14px;
    font-weight: bold;
    border-radius: 0.5rem;
    margin: 10px;
}

.add-to-cart-button i {
    font-size: 14px;
    align-items: center;
    justify-content: center;
}

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

.cart-item-box {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 0.5rem;
    gap: 10px;
    background: var(--cart-cell-bg);
    width: 90vw;
}

.cart-item-box img {
    border-radius: 0.5rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0px;
}

.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-modal {
    background: var(--cart-modal-bg);
    padding: 20px;
    border-radius: 8px;
    max-height: 100%;
    overflow-y: auto;
    position: relative;
}

.cart-icon-wrapper {
    cursor: pointer;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #fff;

}

.cart-item img {
    border-radius: 0.5rem;
}

.cart-item-delete {
    color: red;
    border: none;
    cursor: pointer;
    background: transparent;
    font-size: 20px;
}


.product-card {
    position: relative;

    border-radius: 0.5rem;
    padding: 10px;
    background: var(--product-bg);
    width: 250px;
    height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 8px #555555;
}

/* Image Wrapper */
.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0.5rem;
    background: white;
}

/* Image */
.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.5s ease;
}

#product-card-name {
    font-size: 16px;
    line-height: 1.2;
    max-height: 58px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #555;
}


/* Rating */

.product-card-rating {
    height: auto;
}


.product-rating {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.product-card-star {
    font-size: 20px;
    color: #555;
    margin: 0;
}

.product-card-star.filled {
    background: linear-gradient(135deg, #ffa600, #ff7300, #ff4d00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Price */
.product-card-price-wrapper {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 0;
    margin: 0;
    align-items: flex-end;
}

#product-card-price {
    font-size: 20px;
    color: #008f00;
    font-weight: bold;
}

#product-card-typical_price {
    font-size: 13px;
    color: #ff000080;
    text-decoration: line-through;
}

/* Buy Button */
#buy-button {
    border-radius: 0.5rem;
    border: none;
    height: 35px;
    font-weight: bold;
    width: auto;
    color: var(--buy-color);
    background: var(--buy-bg);
    font-size: 16px;
    margin-top: auto;
    animation: pulse 2s infinite;
    align-self: center;
    padding: 0 10px;
    transition: transform 0.5s ease, background 0.5s ease;
    cursor: pointer;
}

#buy-button:hover {
    animation: none;
}

#buy-button.out-of-stock {
    background: red;
    color: white;
    animation: none;
    cursor: not-allowed;
}

.buy-button.out-of-stock {
    background-color: red;
    color: white;
    animation: none;
    cursor: not-allowed;
}

.in-stock-label {
    color: green;
    font-weight: bold;
    margin-bottom: 10px;
}

.out-of-stock-label {
    color: red;
    font-weight: bold;
    margin-bottom: 10px;
}



.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* =================== Mobile Responsive =================== */
@media (max-width: 1000px) {
    .app {
        flex-direction: column;
        display: flex;
    }

    .hamburger-button {
        position: absolute;
        top: 11px;
        left: 15px;
        font-size: 30px;
        color: var(--hamburger-btn-color);
        z-index: 11;
    }

    .sidebar-logo {
        display: block;
        position: absolute;
        top: 2px;
        left: 50%;
        width: 120px;
        padding: 0;
        transform: translateX(-50%)
    }

    .cart-icon-wrapper {
        display: none;
    }

    .cart-icon-wrapper-mobile {
        cursor: pointer;
        font-size: 25px;
        margin-top: 0px;
        position: absolute;
        top: 10px;
        left: 65px;
        z-index: 11;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-title-wrapper {
        gap: 5px;
        margin: 125px 0 0 0;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .shop-title {
        font-size: 18px;
        padding-top: 7px;
        padding-bottom: 6px;
        padding-left: 10px;
        padding-right: 10px;
        margin-left: 15px;
        margin-right: 15px;
    }

    .shop-title::before {
        right: -2%;
    }

    /* Нижняя линия — слева направо */
    .shop-title::after {
        left: -2%;
    }

    .logo-image {
        display: none;
    }



    .search-bar-wrapper {
        position: static;
        left: 0;
        width: 100%;
        background: var(--search-bar-wrapper-bg);
        padding: 0 0 0 0;
        box-shadow: none;
        margin-bottom: 0;
        align-items: none;
        justify-content: none;
        height: 50px;
        z-index: 0;
    }

    .search-bar {
        position: relative;
        width: 100%;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 15px;
    }

    .search-input {
        width: auto;
    }

    .theme-toggle {
        top: 13px;
        right: 5px;
    }

    .content {
        min-height: 100vh;
        padding: 0px;
        margin: 60px 0 0 0;
    }

    .affiliate-marquee {
        margin-top: 10px;
        padding: 3px 0;
        font-size: 16px;
    }

    .top-controls-inner {
        margin-top: 0;
    }

    .grid-container {
        gap: 20px;
    }

    .top-title {
        padding-top: 5px;
        font-size: 25px;
    }

    .category-title,
    #allcategory {
        font-size: 25px;
        margin: 5px;
    }

    .toggle-button {
        width: 40%;
        padding: 5px;
        font-size: 16px;
    }

    .scroll-wrapper {
        width: 100%;
        padding-bottom: 5px;
        max-width: 100vw;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .modal-content {
        flex-direction: column;
        height: 95%;
        overflow-y: auto;
        padding: 0;
    }

    .modal-left {
        width: 100%;
        height: 600px;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        padding: 45px 10px 10px 10px;
        flex-shrink: 0;
    }

    .image-wrapper {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0 0 10px 0;
    }

    .modal-image {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .modal-right {
        width: 100%;
        padding: 10px 10px 30px 10px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        flex-grow: 1;
    }

    .modal-top {
        text-align: center;
        margin-bottom: 10px;
    }

    .description {
        overflow: visible;
        max-height: none;
    }

    .image-indicator {
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        background: transparent;
        font-size: 10px;
        margin: 0;
        padding: 0;
    }

    .close-button {
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1000;
    }

    .fullscreen-image {
        max-width: 95%;
        max-height: 95%;
    }

    #product-name {
        font-size: 20px;
        margin: 0;
    }

    .price {
        margin: 0;
        font-size: 18px;
        padding: 0;
        font-weight: bold;
    }

    .typical_price {
        font-size: 14px;
    }

    .buy-button {
        font-size: 14px;
        padding: 8px 12px;
    }

    .fullscreen-arrow {
        display: none;
    }

    .close-button {
        padding: 4px;
    }

    .product-id {
        display: none;
    }

    .product-card {
        width: 180px;
        padding: 8px;
        height: 290px;
    }

    .product-card:hover {
        transform: none;
        /* Убираем трансформацию на мобильных устройствах */
    }

    #product-card-name {

        font-size: 14px;

    }

    #product-card-price {
        margin: 0;
        font-size: 16px;
        padding: none;
    }

    .product-card-star {
        font-size: 14px;
    }

    #buy-button {
        font-size: 14px;
        height: auto;
        padding: 5px;
    }

    #buy-button:hover {
        transform: none;
    }

    .admin-form {
        width: 90%;
        margin: 20px auto;
        padding: 10px;
    }

    .form-columns {
        flex-direction: column;
        gap: 0;
    }

    .form-left {
        width: 100%;
        display: block;
        gap: 2rem;
    }

    .admin-tabs {
        gap: 10px;
    }

    .add-button {
        width: 120px;
        font-size: 20px;
    }

    .delete-button {
        width: 120px;
        font-size: 20px;
    }

    .edit-button {
        width: 120px;
        font-size: 20px;
    }

    .description-textarea {
        width: 100%;
        box-sizing: border-box;
        font-size: 20px;
    }

    .admin-form input {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 1rem;
    }

    .input-with-clear select {
        padding: 5px;
        font-size: 16px;
        margin-bottom: 10px;
    }

    .form-bottom {
        gap: 1rem;
    }

    .form-top {
        margin: 10px;
        gap: 0;
    }

    .preview-delete-button {
        padding: 0;
    }
}