/* ==================== БАЗОВЫЕ СТИЛИ /css/common.css ==================== */
body {
    margin: 0;
    font-family: Arial, Sans-Serif;
    background-color: #cdcdcd;
    background-image: url('/assets/bg/bgwhitepc.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    background-attachment: fixed;
}

@font-face {
    font-family: 'Murs Gothic Wide';
    src: url('/assets/fonts/murs-gothic-wide.ttf') format('truetype');
}

h1, h2, h3, .studio-name, .catalogname {
    font-family: 'Murs Gothic Wide', Arial, sans-serif;
}

/* ==================== НАВБАР ==================== */
.navbar {
    height: 10vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.674);
    backdrop-filter: url(#liquidGlassFilter) blur(5px);
    -webkit-backdrop-filter: url(#liquidGlassFilter) blur(5px);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 5px;
    position: fixed;
    top: 0;
    z-index: 5;
    box-sizing: border-box;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.logo {
    position: relative;
    height: 5.5vh;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo:hover {
    scale: 1.03;
}

.studio-name {
    font-size: clamp(30px, 3vw, 45px);
    color: #333;
    font-style: italic;
    letter-spacing: 1px;
    margin-top: 5px;
    margin-left: 10px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
    padding-right: 10px;
}

.nav-btn, .cart-btn {
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    border: none !important;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    scale: 1.05;
}

.nav-icon {
    height: 5.5vh;
    object-fit: contain;
}

/* ==================== КНОПКИ И ИНПУТЫ ==================== */
button {
    border: 1px solid #000;
    border-radius: 14px;
    background: white;
    padding: 10px 20px;
    transition: all 0.3s;
}

button:hover {
    background: #f0f0f0;
}

button:active {
    background: #000;
    color: white;
}

.add-to-cart,
.apply-promo-btn,
.order-btn,
.product-popup-add-btn {
    position: relative;
    background-color: #000;
    color: white;
    border: 1px solid black;
    transition: all 0.3s ease;
}

.add-to-cart:hover,
.apply-promo-btn:hover,
.order-btn:hover,
.product-popup-add-btn:hover {
    background-image: linear-gradient(135deg, #ff00ff, #00ffff) !important;
    background-color: white !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    border: 1px solid black !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 255, 0.4);
    cursor: pointer;
}

.add-to-cart:active,
.apply-promo-btn:active,
.order-btn:active,
.product-popup-add-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 0, 255, 0.2);
}

.add-to-cart:disabled,
.apply-promo-btn:disabled,
.order-btn:disabled {
    background: #d0d0d0 !important;
    background-image: none !important;
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    border: 1px solid #bbb !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.7;
}

.add-to-cart:disabled:hover,
.apply-promo-btn:disabled:hover,
.order-btn:disabled:hover {
    background: #d0d0d0 !important;
    background-image: none !important;
    color: #888 !important;
    -webkit-text-fill-color: #888 !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

.apply-promo-btn {
    white-space: nowrap;
    background: #000;
    color: white;
    border: 1px solid #000;
    border-radius: 14px;
    padding: 10px;
    font-size: 14px;
}

.order-btn {
    width: 100%;
    background: #000;
    color: white;
    padding: 15px 0;
    font-size: 16px;
    border-radius: 14px;
}

.add-to-cart {
    background: #000;
    color: white;
    padding: 12px 30px;
    border: 1px solid black;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
}

.product-popup-add-btn {
    background: #000;
    color: white;
    padding: 15px 30px;
    border: 1px solid black;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    margin-top: auto;
}

.promo-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.promo-input-wrapper .order-input {
    padding-right: 40px;
}

.promo-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: #666;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    pointer-events: auto;
    z-index: 2;
}

.promo-clear-btn.show {
    display: flex;
}

.promo-clear-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #000;
    transform: translateY(-50%) scale(1.1);
}

.promo-clear-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.input-group {
    max-width: 100%;
    margin-bottom: 10px;
}

.input-label {
    display: block;
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.input-label a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed #666;
    transition: color 0.3s ease;
}

.input-label a:hover {
    color: #000;
    border-bottom-style: solid;
}

.order-input {
    box-sizing: border-box;
    width: 100%;
    padding: 5px 0 5px 5px;
    border: 1px solid #ddd;
    border-radius: 14px;
    font-size: 14px;
    height: 4vh;
}

.order-input::placeholder {
    font-family: inherit;
    font-size: 16px;
    color: #999;
    opacity: 1;
}

#orderComment {
    height: 8.5vh;
    padding-top: 0;
    margin-bottom: 0;
}

#promoCodeInput:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
    color: gray;
}

/* ==================== СОЦСЕТИ ==================== */
.social-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.social-btn {
    background: white;
    border: 1px solid black;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    position: relative;
}

.social-btn img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.social-btn.selected,
.delivery-btn.selected {
    background: black;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-btn.selected[data-social-type="phone"] img {
    filter: invert(1) brightness(1.2);
}

.social-btn:hover,
.delivery-btn:hover {
    background: #c4c4c4;
    transform: translateY(-2px);
}

/* ==================== КОРЗИНА (ПОПАП) ==================== */
.popup-overlay {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    display: flex;
    background: rgba(0,0,0,0.3);
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: color 0.3s ease;
    z-index: 1;
    background: none;
    border: none;
    color: #333;
}

.close-popup:hover {
    color: #000;
    transform: scale(1.1);
}

.cart-popup-content {
    display: flex;
    height: 88%;
    padding: 20px;
    flex-direction: row-reverse;
    transform: translateY(20px);
    transition: transform 0.3s ease-in-out;
    width: 80%;
    margin-left: 10%;
    pointer-events: all;
    border: 1px solid #000;
    border-radius: 14px;
    margin-top: 3dvh;
    background: rgba(255, 255, 255, 0.785);
    backdrop-filter: blur(5px);
}

.popup-overlay.active .cart-popup-content {
    transform: translateY(0);
}

.cart-items-wrapper {
    width: 50%;
    padding-left: 30px;
    border-left: 2px solid black;
    margin-left: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.cart-items-wrapper h3 {
    margin-bottom: 5px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 5px;
    padding-top: 5px;
}

.form-title-wrapper h3 {
    font-size: 24px;
    margin: 0;
}

.form-title-wrapper-mob {
    display: none;
}

.order-form {
    width: 50%;
    padding: 0;
    box-sizing: border-box;
}

.promo-code-container {
    display: flex;
    gap: 10px;
    width: 100%;
}

.promo-code-container .order-input {
    flex: 1;
    min-width: 0;
}

.cart-summary {
    position: static;
    border-top: 2px solid #000;
    text-align: end;
    margin-top: auto;
}

#cartsummarytext {
    font-weight: bold;
    font-size: larger;
    margin: 0;
    margin-top: 10px;
}

#cartsummarytextmob {
    display: none;
}

#totalPrice {
    transition: opacity 0.5s ease, transform 0.3s ease;
    display: inline-block;
}

.order-legal-text {
    font-size: 11px;
    line-height: 1.4;
    color: #888;
    text-align: center;
    margin: 10px 0 0;
    padding: 0 10px;
}

.order-legal-text a {
    color: #555;
    text-decoration: none;
    border-bottom: 1px dashed #999;
    transition: all 0.2s;
}

.order-legal-text a:hover {
    color: #000;
    border-bottom-color: #000;
}

.remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease;
}

.remove-item:hover {
    color: #ff0000;
}

.cart-item {
    background: white;
    position: relative;
    display: flex;
    margin-bottom: 5px;
    border: 1px solid #000;
    border-radius: 14px;
    padding: 15px;
    align-items: center;
    box-shadow: 0 3px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.cart-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 10px;
    margin-right: 15px;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info p {
    margin: 5px 0;
    line-height: 1.4;
}

.cart-item-price {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-weight: bold;
}

/* ==================== УВЕДОМЛЕНИЯ ==================== */
#notification-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    align-items: center;
    width: 100%;
    pointer-events: none;
}

.notification {
    min-width: 14%;
    padding: 10px 28px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    animation: slideIn 0.3s ease-out forwards;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.4;
    text-align: center;
}

.notification span {
    display: block;
    width: 100%;
}

.notification.success {
    background: #e8f5e9;
    border: 2px solid #43a047;
    color: #2e7d32;
}

.notification.error {
    background: #ffebee;
    border: 2px solid #e53935;
    color: #c62828;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(100%);
    }
}

.notification.hide {
    animation: fadeOut 0.3s ease-in forwards;
}

/* ==================== СТРЕЛКИ НАВИГАЦИИ ПО ДИЗАЙНАМ (ПК) ==================== */
.global-design-nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 36px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2001;
    opacity: 0.9;
    transition: all 0.3s ease;
    border: 2px solid white;
    line-height: 1;
    padding: 0;
}

.global-design-nav-arrow.left {
    left: 15px;
}

.global-design-nav-arrow.right {
    right: 15px;
}

.global-design-nav-arrow:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.global-design-nav-arrow.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ==================== КНОПКА SALE ==================== */
.sale-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(-45deg, #ff1cff, #1cffff);
    color: black;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.sale-button:hover {
    scale: 1.1;
}

.bottom-strip {
    width: 60%;
    background: white;
    color: black;
    text-align: center;
    padding: 10px 0;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    margin: 10px auto 0;
    font-size: 17px;
    border: 1px solid black;
}

/* ==================== ФУТЕР ==================== */
.site-footer {
    background: #1a1a1a;
    color: white;
    padding: 40px 20px;
    padding-bottom: 0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.footerlogo {
    border-radius: 10px;
    width: 150px;
    height: auto;
}

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
}

.footer-heading {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom-color: transparent;
}

.social-links {
    list-style: none;
    padding: 0;
}

.social-links li {
    margin-bottom: 10px;
}

.social-icon {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.social-icon:hover {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom-color: transparent;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 14px;
    color: #ccc;
}

.TGdevlink {
    display: inline-block;
    margin-top: 10px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.TGdevlink:hover {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom-color: transparent;
}

/* ==================== КУКИ-БАННЕР ==================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.97);
    backdrop-filter: blur(10px);
    color: white;
    padding: 18px 24px;
    z-index: 9999;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-text strong {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.cookie-link {
    color: #00ffff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 255, 255, 0.5);
    transition: all 0.2s;
}

.cookie-link:hover {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom-color: transparent;
}

.cookie-accept {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    color: #000;
    border: none;
    padding: 10px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 255, 0.4);
}

.cookie-accept:active {
    transform: translateY(0);
}

/* ==================== ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ ==================== */
.hidden {
    display: none !important;
}

.active {
    display: block !important;
}

/* ==================== УНИВЕРСАЛЬНЫЙ МЕДИА-ПОПАП ==================== */
.media-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.media-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.media-popup-container {
    position: relative;
    width: 100vw;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.media-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 3001;
    transition: background-color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-popup-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg) scale(1.1);
}

.media-popup-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(60, 60, 60, 0.6);
    color: white;
    border: 1px solid white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 3002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
    padding: 0;
    line-height: 1;
}

.media-popup-nav:hover {
    background: rgba(60, 60, 60, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.media-popup-nav--prev { left: 20px; }
.media-popup-nav--next { right: 20px; }

.zoomable {
    touch-action: none;
    transform-origin: center center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-in;
}

.media-popup-loader {
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.media-popup-loader.show {
    opacity: 1;
}

.media-popup-media-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    min-height: 0;
    pointer-events: none;
}

.media-popup-media {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 90vw;
    max-height: 70vh;
    width: fit-content;
    height: fit-content;
    border-radius: 14px;
    pointer-events: auto;
    overflow: visible;
    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.9),
        0 0 0 6px #ff00ff,
        0 0 0 6px 0 0 40px rgba(255, 0, 255, 0.3);
}

.media-popup-image,
.media-popup-video {
    max-width: 90vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 11px;
    pointer-events: none;
    display: none;
}

.media-popup-image.active,
.media-popup-video.active {
    opacity: 1;
    pointer-events: auto;
    display: block;
}

.media-zoom-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3005;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.media-zoom-indicator.show {
    opacity: 1;
}

.media-popup-caption {
    background: rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 500;
    pointer-events: none;
    display: none;
    padding: 5px 10px;
    border-radius: 14px;
    text-align: center;
}

.media-popup-counter {
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 12px;
    border-radius: 12px;
    margin-top: 10px;
}

.media-popup-thumbs-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    width: fit-content;
    max-width: 90vw;
    justify-content: center;
    pointer-events: none;
}

.media-popup-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 0 1 auto;
    max-width: 80vw;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.05);
    padding: 8px 4px;
    justify-content: flex-start;
    pointer-events: auto;
}

.media-popup-thumbs::-webkit-scrollbar { height: 6px; }
.media-popup-thumbs::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; }
.media-popup-thumbs::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 10px; }

.media-popup-thumb {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    position: relative;
    padding: 1px;
    background: white;
    border: none;
    box-sizing: border-box;
}

.media-popup-thumb:hover { 
    opacity: 0.8; 
    transform: scale(1.05); 
}

/* Активная миниатюра — градиентная рамка 2px */
.media-popup-thumb.active {
    opacity: 1;
    transform: scale(1.05);
    padding: 2px;
    background: linear-gradient(135deg, #ff00ff, #00ffff);
}

/* Контент внутри миниатюры */
.media-popup-thumb img,
.media-popup-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px; 
}

.media-popup-thumb.active img,
.media-popup-thumb.active video {
    border-radius: 6px;
}

.media-thumbs-arrow {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
    flex-shrink: 0;
    pointer-events: auto;
}

.media-thumbs-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* === УХОД ФОТО В ЗАВИСИМОСТИ ОТ НАПРАВЛЕНИЯ === */
.media-popup-media.animating-out-next,
.media-popup-media.animating-out-prev {
    will-change: transform, opacity;
    transition: transform 0.2s ease-in, opacity 0.2s ease-in;
    opacity: 0;
}

.media-popup-media.animating-out-next {
    transform: translateX(-60px) scale(0.95);
}

.media-popup-media.animating-out-prev {
    transform: translateX(60px) scale(0.95);
}

/* === ВХОД НОВОГО ФОТО === */
.media-popup-media.slide-in-next {
    animation: slideInNext 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.media-popup-media.slide-in-prev {
    animation: slideInPrev 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* === АНИМАЦИЯ ЗАКРЫТИЯ МЕДИА === */
.media-popup-media.closing {
    animation: mediaClose 0.2s ease-in forwards;
}

@keyframes mediaClose {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.9);
        opacity: 0;
    }
}

/* === БЫСТРАЯ АНИМАЦИЯ ЗАКРЫТИЯ OVERLAY === */
.media-popup-overlay {
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

@keyframes slideInNext {
    from {
        transform: translateX(60px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideInPrev {
    from {
        transform: translateX(-60px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* ==================== ПЛЕЙСХОЛДЕРЫ ГАЛЕРЕИ ==================== */
.thumbnail {
    width: 200px;
    height: 200px;
    flex: 0 0 200px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: rgba(200, 200, 200, 0.3);
    contain: layout style paint;
}

.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.thumbnail img,
.thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail.placeholder {
    background: linear-gradient(135deg, rgba(200,200,200,0.3), rgba(180,180,180,0.5));
}

.thumbnail.placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.4) 50%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.video-thumbnail-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    pointer-events: none;
    transition: transform 0.2s;
}

.thumbnail:hover .video-thumbnail-icon {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-thumbnail-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 12px 0 12px 18px;
    border-color: transparent transparent transparent white;
}

/* ==================== УНИВЕРСАЛЬНЫЙ ТОВАРНЫЙ ПОПАП ==================== */
.product-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 100px;
    box-sizing: border-box;
}

.product-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.product-popup-content {
    width: 100%;
    height: 90dvh;
    max-height: 750px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    position: relative;
    display: flex;
    flex-direction: row;
    box-sizing: border-box;
    overflow: visible;
}

.product-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
    border: none;
    transition: background-color 0.3s, transform 0.3s;
    line-height: 1;
    padding: 0;
}

.product-popup-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.product-zoom-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3005;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-zoom-indicator.show {
    opacity: 1;
}

.product-popup-overlay-label {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: rgb(234, 234, 234);
    color: black;
    padding: 5px 8px;
    font-size: 16px;
    text-align: center;
    border-radius: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
}

.product-popup-overlay-label.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.product-popup-media {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: 16px;
}

.product-popup-media.zoomed {
    overflow: hidden;
}

/* === ОБЁРТКА ДЛЯ АНИМАЦИИ И ИЗОБРАЖЕНИЯ === */
.product-popup-media-inner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

.product-popup-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    display: block;
    transform-origin: center center;
}

.product-popup-image.zoomed {
    max-width: none !important;
    max-height: none !important;
    width: auto !important;
    height: auto !important;
}

.product-photo-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #000;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: #333;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.2s;
    padding: 0;
    line-height: 1;
}

.product-photo-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.product-photo-nav--prev { left: 15px; }
.product-photo-nav--next { right: 15px; }

.product-popup-dots {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 6;
}

.product-popup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-popup-dot.active {
    background-color: white;
    border: 2px solid black;
}

/* === СТРЕЛКИ ПРОЛИСТЫВАНИЯ ДИЗАЙНОВ === */
.product-design-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 2002;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.2s;
    padding: 0;
    line-height: 1;
}

.product-design-nav:hover {
    background: rgba(0, 0, 0, 1);
    transform: translateY(-50%) scale(1.1);
}

.product-design-nav--prev { left: 20px; }
.product-design-nav--next { right: 20px; }

.product-counter {
    position: fixed;
    bottom: 10px;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 16px;
    z-index: 2002;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease-out;
}

.product-counter.visible {
    opacity: 1;
    transition: opacity 0.5s ease-in;
}

@media (max-aspect-ratio: 1/1) {
    .product-counter {
        bottom: 3px;
        top: auto;
        padding: 1px 8px;
    }
}

.product-popup-info {
    width: 30%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-left: 1px solid #eee;
}

.product-popup-title {
    font-size: 28px;
    margin: 0 0 20px;
    color: #000;
}

.product-popup-config {
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-popup-config p {
    margin: 10px 0;
    word-wrap: break-word;
    white-space: normal;
}

/* ==================== АНИМАЦИИ СМЕНЫ ФОТО В PRODUCT-POPUP ==================== */
.product-popup-media-inner.animating-out,
.product-popup-media-inner.slide-in-next,
.product-popup-media-inner.slide-in-prev {
    will-change: transform, opacity;
}

.product-popup-media-inner.animating-out {
    transition: transform 0.25s ease-in, opacity 0.25s ease-in;
    transform: translateX(-60px) scale(0.95);
    opacity: 0;
}

.product-popup-media-inner.slide-in-next {
    animation: productSlideInNext 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.product-popup-media-inner.slide-in-prev {
    animation: productSlideInPrev 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes productSlideInNext {
    from {
        transform: translateX(80px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes productSlideInPrev {
    from {
        transform: translateX(-80px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* === УХОД КОНТЕНТА В ЗАВИСИМОСТИ ОТ НАПРАВЛЕНИЯ === */
.product-popup-content.animating-out-next,
.product-popup-content.animating-out-prev {
    will-change: transform, opacity;
    transition: transform 0.2s ease-in, opacity 0.2s ease-in;
    opacity: 0;
}

/* Листаем вправо (next) — текущий контент уходит ВЛЕВО */
.product-popup-content.animating-out-next {
    transform: translateX(-60px) scale(0.97);
}

/* Листаем влево (prev) — текущий контент уходит ВПРАВО */
.product-popup-content.animating-out-prev {
    transform: translateX(60px) scale(0.97);
}

/* ВХОД НОВОГО КОНТЕНТА */
.product-popup-content.slide-in-next {
    animation: productContentSlideInNext 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.product-popup-content.slide-in-prev {
    animation: productContentSlideInPrev 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes productContentSlideInNext {
    from {
        transform: translateX(60px) scale(0.97);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes productContentSlideInPrev {
    from {
        transform: translateX(-60px) scale(0.97);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* ==================== ПОЛНЫЙ МОБИЛЬНЫЙ АДАПТИВ ==================== */
@media (max-aspect-ratio: 1/1) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    body {
        background-image: url('/assets/bg/bgwhitemob.jpg');
        background-size: contain;
    }

    .navbar {
        height: 7vh;
        padding: 0 5px;
        margin-top: 0;
    }

    .logo {
        height: 4.5vh;
        margin: 0;
    }

    .studio-name {
        display: none;
    }

    .nav-buttons {
        gap: 0;
        margin-left: auto;
    }

    .nav-icon {
        height: 4.5vh;
    }

    .cart-popup-content {
        display: flex;
        flex-direction: column;
        width: 98%;
        height: 99dvh;
        padding: 3%;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.785);
        backdrop-filter: blur(5px);
        border: 1px solid #000;
        border-radius: 14px;
        margin: auto;
        transform: translateY(0);
        pointer-events: all;
        margin-top: 1%;
    }

    .cart-items-wrapper {
        width: 100%;
        padding-left: 0;
        border-left: none;
        margin: 0;
    }

    .order-form {
        width: 100%;
        margin-top: auto;
    }

    .form-title-wrapper {
        display: none;
    }

    .form-title-wrapper-mob {
        display: flex;
        justify-content: space-between;
        padding: 0;
        margin: 0;
        color: black;
        border-bottom: 2px solid #000;
        border-top: 2px solid #000;
    }

    .form-title-wrapper-mob h3 {
        margin: 5px 0;
    }

    .cart-summary {
        display: none;
    }

    #cartsummarytextmob {
        font-weight: 300;
        font-size: clamp(10px, 5vw, 18px);
        padding: 0 10px 0 0;
        margin: auto 0 0 0;
    }

    .close-popup {
        top: 0;
        right: 3%;
        font-size: 40px;
    }

    .social-btn {
        width: 40px;
        height: 40px;
    }

    .social-btn img {
        width: 30px;
        height: 30px;
    }

    .social-btn:hover,
    .delivery-btn:hover {
        background: black;
        transform: none;
    }

    .input-group {
        margin-bottom: 3px;
    }

    .order-input {
        height: 4vh;
        padding: 3px;
        margin-bottom: 3px;
    }

    .apply-promo-btn {
        height: 4vh;
    }

    .order-btn {
        font-size: 18px;
        padding: 10px 0;
    }

    .cart-item {
        padding: 5px;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item-info {
        font-size: clamp(14px, 4vw, 18px);
    }

    .cart-item-price {
        bottom: 8px;
        right: 15px;
    }

    .order-legal-text {
        line-height: 1;
        font-size: 10px;
        margin: 3px;
    }

    .global-design-nav-arrow {
        display: none !important;
    }

    .media-popup-caption {
        font-size: 14px;
    }

    .site-footer {
        padding: 10px 8px 0;
    }

    .footer-content {
        gap: 5px;
    }

    .footer-section, .footer-description, .footer-heading {
        margin: 5px 0;
    }

    .footer-bottom {
        margin-top: 10px;
        padding-top: 5px;
    }

    .footer-bottom p {
        margin: 8px 0;
    }

    .bottom-strip {
        width: 90vw;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-accept {
        width: 100%;
    }
    
    .cookie-text {
        font-size: 13px;
    }

    .notification {
        min-width: 300px;
        max-width: 90vw;
        font-size: 14px;
    }

    /* Миниатюры галереи */
    .thumbnail {
        width: 140px;
        height: 140px;
        flex: 0 0 140px;
    }

    .video-thumbnail-icon {
        width: 50px;
        height: 50px;
    }
 
    .video-thumbnail-icon::after {
        border-width: 10px 0 10px 15px;
    }

    /* Product popup */
    .product-popup-overlay {
        padding: 10px;
    }

    .product-counter {
        bottom: 3px;
        top: auto;
        padding: 1px 8px;
    }

    .product-popup-content {
        flex-direction: column;
        width: 95%;
        height: 95dvh;
        max-height: none;
    }

    .product-popup-media {
        flex: 0 0 50%;
        min-height: 300px;
    }

    .product-popup-dot {
        width: 6px;
        height: 6px;
        border: 1px solid rgba(0, 0, 0, 0.3);
    }

    .product-popup-dot.active {
        border: 1px solid black;
    }

    .product-popup-overlay-label {
        bottom: 3px;
    }

    .product-popup-info {
        flex: 1;
        border-left: none;
        border-top: 1px solid #eee;
        padding: 20px;
        width: 90%;
    }

    .product-popup-title {
        font-size: 22px;
    }

    .product-design-nav {
        display: none !important;
    }

    .product-photo-nav {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .product-photo-nav--prev { left: 10px; }
    .product-photo-nav--next { right: 10px; }

    /* Media popup thumbs */
    .media-popup-thumb {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
    }

    .media-popup-thumbs {
        padding: 8px 10px 15px;
    }
}

@media (max-width: 480px) {
    .thumbnail {
        width: 120px;
        height: 120px;
        flex: 0 0 120px;
    }
}

