:root {
    --black: #000000;
    --alterwhite: #F1E4EE;
    --white: #FFFFFF;
    --accent: #7E00D9;
    --accent2: #00FFEA;
    --Details: #C7A1E2;
    --violet-dark: #440074;
    --alterblack: #211825;
    --dark-grey: #333333;
    --light-grey: #888888;
    --errors: #FF3F3F;
    --blue: #00D4FF;

    --grad-accent: linear-gradient(90deg, var(--accent), var(--accent2));
    --font-main: 'Montserrat', sans-serif;
    
    --header-height: 100px;
    --container-width: 1200px;
    --safe-zone: 5vw;
}

html.lenis, html.lenis body { height: auto; }
  .lenis.lenis-smooth { scroll-behavior: auto !important; }
  .lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
  .lenis.lenis-stopped { overflow: hidden; }
  .lenis.lenis-scrolling iframe { pointer-events: none; }

/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    background-color: var(--black);
    color: var(--alterwhite);
    font-family: var(--font-main);
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.5;
}

/* MAIN LAYOUT */
main { min-height: 80vh; padding-top: 0px; padding-bottom: 40px; }
        
.split-container {
    display: flex; 
    width: 100%; 
    height: 70vh; 
    overflow: hidden; 
    background: #000; 
    margin: 0px 0 80px 0;
    position: relative;
}

.split-item {
    position: relative; 
    flex: 1; 
    transition: flex 0.7s cubic-bezier(0.22, 1, 0.36, 1); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
}

@media (pointer: fine) or (min-width: 1025px) {
    .split-item:hover { flex: 1.6; }
    .split-item.right:hover .cube-wrapper { transform: scale(1.25); }
}

.split-content {
    position: absolute; 
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%); 
    z-index: 100; 
    text-align: center;
    pointer-events: none; 
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.h1-title { 
    font-size: 1.8rem; 
    white-space: nowrap; 
    margin-top: 40px;
    text-shadow: 0 0 15px rgba(0,0,0,1);
    line-height: 1;
    position: relative;
    z-index: 2;
}

.banner-title { 
    font-size: 40px; 
    white-space: nowrap; 
    margin: 0 !important;
    text-shadow: 0 0 15px rgba(0,0,0,1);
    line-height: 1;
    position: relative;
    z-index: 2;
}

.hover-text {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 10px);
    line-height: 1.8;
    max-width: 400px;
    width: 100%;
    font-size: 14px;
    color: var(--alterwhite);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
    text-shadow: 0 0 8px rgba(0,0,0,1);
    padding-top: 15px;
    pointer-events: none;
}

@media (pointer: fine) or (min-width: 1025px) {
    .split-item:hover .hover-text {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }
}

.split-item.active .hover-text {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* KEY */
.thermal-svg-bg {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
}

.slice {
    transform-origin: 200px 200px; 
    animation: spin 12s linear infinite;
}

@keyframes spin {
    0% { transform: perspective(800px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateZ(var(--z)); } 
    100% { transform: perspective(800px) rotateX(360deg) rotateY(720deg) rotateZ(360deg) translateZ(var(--z)); }
}

.float {
    animation: bob 4s ease-in-out infinite;
    transform: scale(0.25);
    transform-origin: center center;
}

@keyframes bob {
    0%, 100% { transform: translateY(0px) scale(0.75); } 
    50% { transform: translateY(-15px) scale(0.75); }
}

/* CUBE */
.container-cube {
    --thermal-cyan: #00FFEA; 
    --thermal-purple: #7E00D9; 
    --thermal-bg: #020005; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    background-color: var(--thermal-bg); 
    overflow: hidden; 
    z-index: 0; 
    pointer-events: none;
}

.scanlines-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
}

.cube-wrapper {
    position: relative; 
    width: 400px; 
    height: 400px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transform: scale(1.2);
    opacity: 1;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.tc-scene {
    position: absolute; 
    width: 118px; 
    height: 118px; 
    perspective: 1200px; 
    z-index: 5; 
    animation: tc-float 6s ease-in-out infinite alternate;
}

.tc-cube {
    width: 100%; 
    height: 100%; 
    position: relative; 
    transform-style: preserve-3d; 
    animation: tc-rotateCube 15s infinite linear;
}

@keyframes tc-rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); } 
    100% { transform: rotateX(360deg) rotateY(720deg) rotateZ(360deg); }
}

@keyframes tc-float {
    0% { transform: translateY(-4px); } 
    100% { transform: translateY(4px); }
}

.tc-face {
    position: absolute; 
    width: 100%; 
    height: 100%; 
    background: radial-gradient(circle at center, #FFFC00 0%, #FF4800 30%, #7E00D9 70%, #200040 100%); 
    border: 2px solid var(--thermal-cyan); 
    border-radius: 15%; 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: repeat(3, 1fr); 
    padding: 10%; 
    box-sizing: border-box; 
    box-shadow: 0 0 15px rgba(0, 255, 234, 0.5), inset 0 0 20px rgba(0, 255, 234, 0.4); 
    backface-visibility: visible;
}

.tc-front { transform: translateZ(59px); }
.tc-back { transform: rotateY(180deg) translateZ(59px); }
.tc-right { transform: rotateY(90deg) translateZ(59px); }
.tc-left { transform: rotateY(-90deg) translateZ(59px); }
.tc-top { transform: rotateX(90deg) translateZ(59px); }
.tc-bottom { transform: rotateX(-90deg) translateZ(59px); }

.tc-dot {
    width: 70%; 
    height: 70%; 
    background-color: var(--thermal-cyan); 
    border-radius: 50%; 
    align-self: center; 
    justify-self: center; 
    box-shadow: 0 0 10px var(--thermal-cyan), 0 0 20px #fff;
}

.tc-keyhole-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 10; 
}

/* ADAPTIVE */
@media (max-width: 1024px) {
    .split-container { height: 50vh; } 
    .banner-title { font-size: 26px; }
}

@media (max-width: 768px) {
    .split-container { flex-direction: row; height: 60vh; } 
    .split-item { flex: 1; width: 100%; } 
    .banner-title { font-size: 22px; }
    .hover-text { max-width: 90%; font-size: 0,85rem; }
    .cube-wrapper { transform: scale(0.7); }
}

/* UTILS */
.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 var(--safe-zone); }
.h1-title { font-size: 32px; font-weight: 700; text-transform: uppercase; margin-bottom: 30px; letter-spacing: 1px; }
.text-reg { font-size: 16px; color: var(--alterwhite); }
.text-own { font-size: 24px; color: var(--accent); }
.text-res { font-size: 24px; color: var(--accent2); }
.text-leg { font-size: 24px; color: var(--alterwhite); line-height: 2; }

/* TABLET */
@media (max-width: 1024px) {
    .h1-title {
        font-size: 28px;
        margin-bottom: 25px;
    }
    .text-own, .text-res, .text-leg {
        font-size: 22px;
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .h1-title {
        font-size: 24px;
        margin-bottom: 20px;
        letter-spacing: 0.5px;
    }
    
    .text-reg {
        font-size: 14px;
    }

    .text-own, .text-res {
        font-size: 20px;
    }

    .text-leg {
        font-size: 18px;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .h1-title {
        font-size: 20px;
    }
    
    .text-leg {
        line-height: 1.5;
    }
}

.gradient-text { background: var(--grad-accent); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.divider { width: 100%; height: 1px; background: var(--dark-grey); margin: 60px 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* BUTTONS */
.btn {
    position: relative; display: inline-flex; justify-content: center; align-items: center;
    font-family: var(--font-main); font-weight: 700; color: var(--alterwhite);
    background: transparent; border: 1px solid var(--accent);
    cursor: pointer; overflow: hidden; transition: 0.2s; text-transform: uppercase;
}

.btn canvas, .lightning-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}
.btn:hover { border-color: var(--accent2); background: rgba(126, 0, 217, 0.1); box-shadow: 0 0 40px 5px rgba(126, 0, 217, 0.4);
    transition: 
  border-color 0.8s ease-in-out, 
  box-shadow 0.8s ease-in-out;}

.btn span { position: relative; z-index: 2; }
.btn-rounded { border-radius: 30px; padding: 0 30px; height: 50px; font-size: 14px; letter-spacing: 1px; }
.btn-rect { border-radius: 0; padding: 12px 30px; font-size: 14px; letter-spacing: 1px; }
.lightning-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1; mix-blend-mode: screen;
}

/* HEADER */
.main-header {
    position: sticky; top: 0; z-index: 1000;
    height: var(--header-height); width: 100%;
    background: linear-gradient(180deg, rgba(126, 0, 217, 0.3) 0%, rgba(0,0,0,0) 100%); 
    backdrop-filter: blur(15px);
    display: flex; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }

.logo-container { width: 200px; height: 70px; position: relative; cursor: pointer; display: flex; align-items: center; }
.logo-container svg { width: 100%; height: 100%; overflow: visible; opacity: 1 !important; mask: none !important; }
.logo-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80%; height: 80%; background: var(--accent); filter: blur(30px);
    opacity: 0; transition: opacity 0.3s; z-index: -1;
}
.logo-container:hover .logo-glow {
    opacity: 0.9;
    box-shadow:
      0 0 20px 2px rgba(0, 255, 255, 0.9),
      0 0 40px 10px rgba(126, 0, 217, 0.6),
      0 0 80px 20px rgba(255, 0, 255, 0.2);
      
    transition: all 0.4s ease;
  }
  
  .logo-container:hover img {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
  }

.header-nav { display: flex; align-items: center; gap: 20px; }

/* --- CART ICON ANIMATION --- */
.cart-trigger {
    flex-shrink: 0; cursor: pointer; position: relative;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: #7E00D9; border-radius: 50%;
    color: var(--accent); font-size: 20px;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.5s ease;
    will-change: transform;
}
.cart-trigger:hover {
    transform: scale(1.15); transition: transform 1s ease;
    filter: drop-shadow(0 0 1px #7E00D9) drop-shadow(0 0 5px #7E00D9) brightness(1.2);
}
.cart-trigger:hover svg {
    transform: scale(1.15); transition: transform 0.3s ease;
    filter: drop-shadow(0 0 8px #e5ff00) drop-shadow(0 0 15px #FFCC00);
}
.cart-trigger svg {
    width: 20px; height: 20px;
    transform: scale(1); transition: transform 0.3s ease, filter 0.3s ease;
}
.cart-count {
    position: absolute; top: -5px; right: -5px;
    background: white; color: black;
    font-size: 10px; font-weight: bold; width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* Lang Switcher */
.lang-switcher { position: relative; font-weight: 600; font-size: 14px; cursor: pointer; padding: 10px; user-select: none; }
.lang-dropdown {
    display: none; position: absolute; top: 100%; right: 0;
    background: var(--black); border: 1px solid var(--accent);
    min-width: 60px; z-index: 10;
}
.lang-switcher:hover .lang-dropdown { display: block; }
.lang-opt { padding: 8px 15px; text-align: center; color: var(--alterwhite); transition: 0.2s;}
.lang-opt:hover { background: var(--accent); }


.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }

.card {
    display: flex; flex-direction: column; cursor: pointer; position: relative;
    transition: transform 0.3s ease; background: var(--alterblack);
    z-index: 1;
}
.card:hover { transform: translateY(-5px); }
.card::before {
    content: ''; position: absolute; inset: -2px; z-index: -1;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    filter: blur(15px); opacity: 0; transition: opacity 0.3s;
}
.card:hover::before { opacity: 0.6; }

.card-img-box { width: 100%; aspect-ratio: 1/1; background: #2a2a2a; object-fit: cover; }
.card-info { padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.card-name { font-weight: 600; font-size: 16px; letter-spacing: -0.5px; }
.card-price { font-size: 14px; color: var(--accent2); }
.card-cat-center { justify-content: center; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }

/* Join Section */
.join-section {
    width: 100%;
    width: calc(100% - 40px);
    margin: 60px 0;
    border: 1px solid; 
    background: rgba(33, 24, 37, 0.5);
    border-image-source: linear-gradient(90deg, var(--accent), var(--accent2));
    border-image-slice: 1;
    padding: clamp(30px, 5vw, 60px); 
    text-align: center; 
    margin: 60px auto; 
    max-width: 100%; 
    width: 1000px; 
    box-sizing: border-box;
}

/* Join Title Gradient*/
.join-title {
    font-size: clamp(20px, 4vw, 28px); 
    font-weight: 700; 
    margin-bottom: 10px;
    background: var(--grad-accent); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
}

.join-form { 
    width: 100%;
    max-width: 400px; 
    margin: 30px auto 0; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

.input-field {
    width: 100%; 
    background: var(--black); 
    border: 1px solid var(--dark-grey);
    padding: 12px; 
    color: var(--alterwhite); 
    font-family: var(--font-main); 
    font-size: 16px; 
    outline: none; 
    transition: 0.3s;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .input-field { font-size: 14px; }
}

.input-field:focus { border-color: var(--accent); }

textarea.input-field { 
    height: 100px; 
    resize: none; 
}

.join-btn-container { 
    display: flex; 
    justify-content: center; 
    width: 100%;
}

.join-btn-container .btn {
    width: 100%; 
    max-width: 250px;
}

@media (max-width: 480px) {
    .join-section {
        margin: 40px auto;
        padding: 25px 15px;
    }
    .join-btn-container .btn {
        max-width: 100%;
    }
}

/* CART SIDEBAR */
.cart-sidebar {
    position: fixed; top: 0; right: -450px; width: 450px; height: 100vh;
    background: linear-gradient(90deg, #440074 0%, #211825 100%);
    border-left: 1px solid var(--accent);
    z-index: 2000; transition: right 0.3s ease;
    display: flex; flex-direction: column; padding: 30px;
}
.cart-sidebar.open { right: 0; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1900; display: none; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.overlay.active { opacity: 1; display: block; }

.cart-header { font-size: 24px; margin-bottom: 30px; display: flex; justify-content: space-between; }
.cart-close-icon { cursor: pointer; font-size: 20px; }
.cart-items-container { flex-grow: 1; overflow-y: auto; margin-bottom: 20px; }
.cart-item {
    display: flex; gap: 15px; border-bottom: 1px solid var(--dark-grey);
    padding-bottom: 15px; margin-bottom: 15px; position: relative;
}
.ci-img { width: 70px; height: 70px; background: #333; }
.ci-name { font-size: 14px; font-weight: 600; }
.ci-sku { font-size: 12px; color: var(--light-grey); }
.ci-price { font-size: 14px; color: var(--accent2); margin-top: 5px; }
.ci-remove { position: absolute; top: 0; right: 0; color: var(--errors); cursor: pointer; font-size: 18px; }

.cart-total { font-size: 20px; display: flex; justify-content: space-between; margin-bottom: 5px; }
.cart-approx { font-size: 12px; color: var(--light-grey); text-align: right; }
.cart-note { font-size: 10px; color: var(--light-grey); text-align: right; margin-bottom: 20px; font-style: italic; }
.cart-checkout-btn { width: 100%; margin-top: 20px; }

/* MODAL */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 3000; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.product-card-open {
    width: 1200px; height: 600px; background: var(--black);
    border: 1px solid;
    border-image-source: linear-gradient(to right, #7E00D9, #00FFEA);
    border-image-slice: 1; display: flex; position: relative; 
    max-width: 100%; max-height: 90vh;
}
.close-modal { position: absolute; top: 20px; right: 20px; font-size: 24px; color: white; cursor: pointer; z-index: 10; transform: rotate(0deg); }
.close-modal:hover {
    position: absolute;
    top: 20px; right: 20px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    z-index: 10;
    transform: rotate(180deg);
    transition: transform 0.5s ease-in-out;
}
.pc-left { width: 50%; aspect-ratio: 1 / 1; background: #1a1a1a; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pc-left img { width: 100%; height: 100%; object-fit: cover; }
.pc-right { width: 50%; padding: 40px; display: flex; flex-direction: column; overflow-y: auto; }

.m-title { font-size: 28px; font-weight: 700; margin-bottom: 5px; line-height: 1.2;}
.m-meta { font-size: 14px; color: var(--light-grey); margin-bottom: 20px; }
.link-hover { text-decoration: underline; cursor: pointer; color: var(--blue); }
.link-hover:hover { color: var(--accent2); }
.m-divider { height: 1px; background: var(--dark-grey); width: 100%; margin-bottom: 20px; }
.m-desc { font-size: 14px; line-height: 1.6; margin-bottom: 30px; color: #ddd; }

.m-toggles { display: flex; gap: 30px; margin-top: 0px; }

.toggle-btn {
    padding: 15px;
    border: 1px solid #fff;
    background: #000;
    color: #fff;
    cursor: pointer;
    flex: 1;
    text-align: center;
    font-family: var(--font-main);
    transition: 0.3s;
    line-height: 1.2;
    margin: 0;
}

.toggle-btn:hover {
    border: 1px solid var(--accent);
    background: #000;
}

.toggle-btn.active {
    border-color: var(--accent);
    background: #000;
}

.toggle-btn.active:hover {
    border-color: var(--accent);
    background: rgba(168, 85, 247, 0.2);
}

.toggle-btn.owner:hover {
    border-color: var(--accent);
    background: #1a0033;
    box-shadow: 0 -5px 10px var(--accent), 0 -10px 20px var(--accent2), 0 -15px 120px #ff00de;
    animation: fire 2s infinite alternate;
}

.toggle-btn.baileer:hover {
    border-color: var(--accent2);
    background: var(--alterblack);
    box-shadow: none;
    animation: none;
}

@keyframes fire {
    0% { box-shadow: 0 0 10px var(--accent), inset 0 0 10px var(--accent); filter: hue-rotate(0deg); }
    100% { box-shadow: 0 -15px 120px var(--accent2), inset 0 0 20px #440074; filter: hue-rotate(30deg); }
}
.lg-text { font-size: 14px; font-weight: 700; display: block; position: relative; z-index: 1; transition: color 0.3s ease; }
.m-note { font-size: 12px; color: var(--light-grey); margin-bottom: 30px; min-height: 1.2em;}

@media (max-width: 1024px) {
    .toggle-btn {
        display: flex !important;
        flex-direction: column !important; /* Текст строго один під одним */
        align-items: center !important;    /* Центруємо по горизонталі */
        justify-content: center !important; /* Центруємо по вертикалі */
        gap: 5px !important;               /* Відступ між lg-text та m-note */
        padding: 15px 10px !important;
        height: auto !important;
        min-height: 60px;
    }

    .lg-text {
        font-size: 14px !important;
        display: block !important;
        width: 100%;
        text-align: center;
    }

    .sm-text {
        font-size: 10px !important;
        margin: 0 !important;
        display: block !important;
        width: 100%;
        text-align: center;
        opacity: 0.8;
    }

    .toggle-btn.owner, 
    .toggle-btn.owner:hover, 
    .toggle-btn.active.owner {
        animation: none !important;
        box-shadow: none !important;
        background: #000 !important;
        border: 1px solid var(--accent) !important;
    }
}

@media (max-width: 480px) {
    .m-toggles {
        gap: 10px !important;
    }
    
    .lg-text {
        font-size: 12px !important;
    }
}

.m-purchases-count {
    font-size: 13px;
    color: var(--accent2);
    opacity: 0.9;
}

.m-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.m-price { font-size: clamp(24px, 3vw + 10px, 32px); font-weight: 700; }
.m-buy-btn { width: 140px; }

.main-footer {
    padding: 120px 0;
    border-top: 1px solid var(--dark-grey);
    text-align: center;
    font-size: 14px;
    color: var(--light-grey);
    position: relative;
    overflow: hidden;
}

.footer-links {
    margin-bottom: 120px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 140px;
}


.footer-links a {
    color: var(--white);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--accent);
}

.footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.footer-links a:hover::after,
.footer-links a:focus::after {
    transform: scaleX(1);
    transform-origin: left;
}

.footer-links a:not(:hover):not(:focus)::after {
    transform-origin: right;
}

/* MOBILE */
.mobile-bottom-bar { display: none; }

@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .product-card-open { height: auto; flex-direction: column; width: 500px; }
    .pc-left { aspect-ratio: 1 / 1; width: 100%; height: 100%; }
    .pc-right { width: 100%; padding: 20px; }
    .logo-container { width: 150px; }
}

@media (max-width: 768px) {
    :root { --header-height: 70px; }
    .grid-3 { grid-template-columns: 1fr; }
    .shop-btn-desk { display: none; }
    .mobile-bottom-bar {
        display: flex; position: fixed; bottom: 0; left: 0; width: 100%;
        background: var(--black); padding: 10px; z-index: 999; border-top: 1px solid var(--dark-grey);
    }
    .shop-btn-mobile { width: 100%; }
    .cart-sidebar { width: 100%; right: -100%; }
    .h1-title { font-size: 24px; }
    .footer-links { flex-direction: column; gap: 60px; }
    main { padding-bottom: 40px; }
}

/* --- ADMIN PANEL & LOGIN STYLES --- */
.admin-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 9000;
    display: flex; flex-direction: column; padding: 20px; overflow-y: auto;
    color: var(--alterwhite);
}
.admin-login-box {
    margin: auto; width: 100%; max-width: 400px; padding: 40px;
    background: var(--alterblack); border: 1px solid var(--accent);
    text-align: center;
}
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--accent); padding-bottom: 20px; }
.admin-content { display: flex; gap: 30px; height: 100%; }
.admin-sidebar { width: 300px; border-right: 1px solid var(--dark-grey); overflow-y: auto; padding-right: 20px; }
.admin-main { flex: 1; overflow-y: auto; padding-bottom: 50px; }

.admin-item { 
    padding: 10px; border-bottom: 1px solid var(--dark-grey); cursor: pointer; 
    display: flex; justify-content: space-between; align-items: center; font-size: 14px;
}
.admin-item:hover { background: rgba(126, 0, 217, 0.2); color: var(--accent2); }
.admin-cat-header { font-weight: 700; color: var(--accent2); margin-top: 15px; padding: 5px; background: rgba(255,255,255,0.05); }

.admin-form-group { margin-bottom: 15px; }
.admin-label { display: block; margin-bottom: 5px; color: var(--light-grey); font-size: 12px; text-transform: uppercase; }
.admin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.admin-img-preview { height: 60px; width: auto; margin-top: 10px; border: 1px solid var(--dark-grey); }

/* Checkbox custom */
.checkbox-wrapper { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-top: 10px; }
.checkbox-wrapper input { width: 20px; height: 20px; accent-color: var(--accent2); }

/* Update Cart Item Image Style */
.ci-img { width: 70px; height: 70px; background-size: cover; background-position: center; border: 1px solid var(--dark-grey); }

/* HEARD */
@keyframes logo-pulse {
    0%, 100% { transform: scale(1); filter: brightness(1); filter: drop-shadow(0 0 0px rgba(0, 212, 255, 0)); }
    50% { transform: scale(1.15); filter: brightness(1.2); filter: drop-shadow(0 0 8px rgba(0, 212, 255, 1.6)) 
        drop-shadow(0 0 12px rgba(255, 204, 0, 1.4)); }
}

@keyframes particles-fly {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    80%, 100% {
        transform: translate(-50%, -50%) scale(1.2) translate(var(--tw-x), var(--tw-y));
        opacity: 0;
    }
}

.main-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.footer-logo-wrapper {
    position: relative;
    display: inline-block;
    padding: 15px; 
    cursor: pointer;
    line-height: 0;
}

.footer-logo-wrapper:hover .footer-logo-svg {
    animation: logo-pulse 1.5s infinite ease-in-out !important;
    cursor: pointer;
}

@keyframes logo-pulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.2); }
    100% { transform: scale(1); filter: brightness(1); }
}

.footer-logo-wrapper::before,
.footer-logo-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.footer-logo-wrapper::before {
    background: #00D4FF;
    --tw-x: -25px;
    --tw-y: -20px;
    box-shadow: 
        10px -15px 0 #00D4FF, 
        -20px -5px 0 #00D4FF, 
        5px 18px 0 #00D4FF;
}

.footer-logo-wrapper::after {
    background: #FFCC00;
    --tw-x: 25px;
    --tw-y: 20px;
    box-shadow: 
        -10px 15px 0 #FFCC00, 
        20px 5px 0 #FFCC00, 
        -5px -18px 0 #FFCC00;
}

.footer-logo-wrapper:hover::before,
.footer-logo-wrapper:hover::after {
    animation: particles-fly 1.5s infinite ease-out;
}

.main-footer {
    position: relative;
    width: 100%;
    overflow: visible !important;
    padding-bottom: 0 !important; 
    margin-bottom: 0 !important;
    border: none !important;
    line-height: 0;
}

.footer-illustration {
    display: block;
    position: absolute;
    width: 316px;
    height: auto;
    bottom: -1000; 
    left: 8%;
    
    pointer-events: none;
    z-index: 10;
    
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.footer-illustration.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .footer-illustration {
        width: 250px;
        left: 2%;
        bottom: -10;
        opacity: 1;
    }
}

/* МОБІЛЬНА ВЕРСІЯ */
@media (max-width: 768px) {
    .main-footer {
        padding-bottom: 0 !important; 
    }

    .footer-illustration {
        position: relative; 
        left: 0;
        bottom: -100;
        display: block;
        margin: 20px auto 0 auto;
        transform: translateY(10px); 
        width: 320px;
        height: auto;
    }

    .footer-illustration.is-visible {
        transform: translateY(0);
    }
}

.footer-illustration svg {
    display: block;
    vertical-align: bottom;
    margin-bottom: 0;
}

.main-footer .container {
    line-height: normal; 
    padding-bottom: 0px;
}

.input-error-msg {
    color: var(--errors);
    font-size: 12px;
    font-weight: 500;
    margin-top: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.input-error-msg.visible {
    max-height: 20px;
    opacity: 1;
    margin-top: 5px;
}

/* Блок з правилами у кошику */
.cart-terms-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    margin-top: 15px;
    text-align: left;
}

.terms-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.terms-text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--white);
}

.terms-link {
    color: var(--accent2);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.terms-link:hover {
    text-decoration: none;
    color: var(--accent);
}

.input-field {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-field:focus:not(:placeholder-shown):valid {
    box-shadow: 0 0 5px var(--accent2);
}

.cents {
    font-size: 0.6em;
    vertical-align: super;
    margin-left: 1px;
}

.total-amount .cents {
    font-size: 0.5em;
}

@keyframes admin-flash-animation {
    0% { filter: brightness(1); transform: scale(1); }
    50% { filter: brightness(2.5) drop-shadow(0 0 15px var(--accent)); transform: scale(1.1); }
    100% { filter: brightness(1); transform: scale(1); }
}

.admin-flash {
    animation: admin-flash-animation 0.5s ease-in-out !important;
}

/* --- COOKIE --- */
.cookie-banner {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 360px;
    max-width: 90vw;
    background-color: var(--alterblack);
    border: 1px solid var(--violet-dark);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    font-family: var(--font-main);
    color: var(--white);
    
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.cookie-banner.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.cookie-close-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--light-grey);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

.cookie-close-icon:hover {
    color: var(--white);
    transform: scale(1.1);
}

.cookie-content p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    color: var(--alterwhite);
    padding-right: 20px;
}

.cookie-actions {
    display: flex;
    justify-content: flex-start;
}

.cookie-btn {
    padding: 10px 25px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 0 1px var(--accent);
}

.cookie-btn-primary {
    background: var(--grad-accent);
    color: var(--white);
    border: none;
}

.cookie-btn-primary:hover {
    background: rgba(68, 0, 116, 0.8);
    box-shadow: inset 0 0 0 1px var(--accent);
}

@media (max-width: 992px) {
    .cookie-banner {
        right: 50%;
        transform: translate(50%, 20px);
    }
    .cookie-banner.show {
        transform: translate(50%, 0);
    }
}

@media (max-width: 768px) {
    .cookie-banner {
        bottom: 90px;
        width: calc(100% - 40px);
        text-align: center;
    }
    .cookie-actions {
        justify-content: center;
    }
    .cookie-btn {
        width: 100%;
    }
}

.cookie-link {
    color: var(--blue);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cookie-link:hover {
    color: var(--accent2);
    text-decoration: none;
}

/* --- EMPTY CART POPUP --- */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-content {
    background: linear-gradient(135deg, #2b0054 0%, #000000 100%);
    width: 100%;
    max-width: 550px;
    min-height: 300px;
    padding: 10px 40px 60px 40px;
    position: relative;
    border: 1px solid var(--accent);
    box-shadow: 0 0 60px rgba(168, 85, 247, 0.4);
    text-align: center;
    overflow: hidden;
}

.popup-close {
    position: absolute;
    top: 20px; 
    right: 20px;
    background: none; 
    border: none;
    color: white; 
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(0deg);
}

.popup-close:hover {
    color: white;
    transform: rotate(180deg);
    transition: transform 0.5s ease-in-out;
}

.popup-title {
    margin-top: 30px !important;
    margin-bottom: 10px !important;
    color: var(--alterwhite); font-size: 32px !important;
}

.popup-divider {
    height: 1px;
    background: var(--accent);
    width: 100%;
    margin-bottom: 30px;
}

.popup-text {
    margin-bottom: 40px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.shop-btn-popup {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-main) !important;
    font-weight: 700;
    font-size: 18px;
    color: var(--alterwhite);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    border: 1px solid var(--accent);
    padding: 14px 60px;
    cursor: pointer;
    overflow: hidden;
    transition: 0.2s ease-in-out;
    min-width: 220px;
    z-index: 5;
}

.shop-btn-popup span {
    position: relative;
    z-index: 15;
    pointer-events: none;
}

.shop-btn-popup:hover {
    border-color: var(--accent2);
    background: rgba(126, 0, 217, 0.1);
    box-shadow: 0 0 40px 5px rgba(126, 0, 217, 0.4);
    transition: 
        border-color 0.8s ease-in-out, 
        box-shadow 0.8s ease-in-out,
        background 0.3s ease;
}

.shop-btn-popup .lightning-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.popup-graffiti {
    position: absolute;
    bottom: -20px;
    right: -10px;
    width: 180px;
    opacity: 0.5;
    pointer-events: none;
}

.popup-content.resident-border {
    border: 1px solid var(--accent2);
}

@media (max-width: 768px) {
    .popup-content { padding: 50px 25px; }
    .popup-title { font-size: 24px !important; }
    .popup-text { font-size: 14px; }
    .popup-graffiti { width: 130px; }
}