/* ═══════════════════════════════════════════════════════════
   Character Showcase — Frontend Styles
   ═══════════════════════════════════════════════════════════

   TABLE OF CONTENTS
   ─────────────────
   1.  Root Variables & Reset
   2.  Entrance Animation
   3.  Grid Layout
   4.  Character Selector Strip
   5.  Team Navigation
   6.  Character Flipbox
       6a. Video Side Panel
       6b. Click Overlay
       6c. Flip Button
       6d. Model Viewer & Fallback
       6e. Back Face (Stats & Image)
   7.  Detail Panel (Lore ↔ Product)
   8.  Product Grid
       8a. Marquee (Auto-Scroll)
   9.  Product Detail (back face)
   10. Add to Cart Button
   11. Toast Notification
   12. Character Switch Transitions
   13. Character Colour Overrides
   14. Video Modal
   15. Responsive Breakpoints

   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────
   1. ROOT VARIABLES & RESET
   ───────────────────────────────────── */

.cs-widget {
    --cs-radius: 12px;
    --cs-gap: 20px;
    --cs-transition: 0.35s cubic-bezier(.4, 0, .2, 1);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #e0e0e0;
}

.cs-widget *,
.cs-widget *::before,
.cs-widget *::after {
    box-sizing: border-box;
}

/* Hide scrollbars globally while keeping scroll functional */
.cs-widget * {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.cs-widget *::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* ─────────────────────────────────────
   2. ENTRANCE ANIMATION
   ───────────────────────────────────── */

.cs-widget:not(.cs-loaded) .cs-selector,
.cs-widget:not(.cs-loaded) .cs-left,
.cs-widget:not(.cs-loaded) .cs-right,
.cs-widget:not(.cs-loaded) .cs-teams {
    opacity: 0;
    transform: translateY(20px);
}

.cs-widget.cs-loaded .cs-selector,
.cs-widget.cs-loaded .cs-left,
.cs-widget.cs-loaded .cs-right,
.cs-widget.cs-loaded .cs-teams {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.cs-widget.cs-loaded .cs-selector {
    transition-delay: 0s;
}

.cs-widget.cs-loaded .cs-left {
    transition-delay: 0.15s;
}

.cs-widget.cs-loaded .cs-right {
    transition-delay: 0.3s;
}

/* ─────────────────────────────────────
   3. GRID LAYOUT — 3-area grid
   Selector spans left column only;
   right column aligns with the flipbox
   ───────────────────────────────────── */

.cs-main {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "selector  ."
        "left      content";
    gap: var(--cs-gap);
    align-items: stretch;
}

/* When teams bar is present, selector left + teams right in top row */
.cs-main.has-teams {
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "selector  teams"
        "left      content";
}

.cs-selector {
    grid-area: selector;
}

.cs-left {
    grid-area: left;
    display: flex;
    gap: var(--cs-gap);
    align-items: stretch;
}

.cs-right {
    grid-area: content;
    display: flex;
    flex-direction: column;
    gap: var(--cs-gap);
    align-self: stretch;
    min-width: 0;
    height: 100%;
}

/* ─────────────────────────────────────
   4. CHARACTER SELECTOR STRIP
   ───────────────────────────────────── */

.cs-selector {
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--cs-radius);
    padding: 12px 16px;
    align-self: start;
}

.cs-selector__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cs-selector__icon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 3px solid transparent;
    border-radius: 8px;
    padding: 3px;
    cursor: pointer;
    transition: all var(--cs-transition);
    outline: none;
    color: #aaa;
    -webkit-appearance: none;
    appearance: none;
}

.cs-selector__icon img {
    width: 64px;
    height: 64px;
    border-radius: inherit;
    object-fit: cover;
    display: block;
    transition: transform var(--cs-transition), box-shadow var(--cs-transition);
}

.cs-selector__letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: inherit;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
}

.cs-selector__name {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    opacity: 0.7;
    transition: opacity var(--cs-transition);
}

/* Hover */
.cs-selector__icon:hover {
    border-color: rgba(76, 175, 80, 0.4);
}

.cs-selector__icon:hover img,
.cs-selector__icon:hover .cs-selector__letter {
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
}

.cs-selector__icon:hover .cs-selector__name {
    opacity: 1;
}

/* Active */
.cs-selector__icon.is-active {
    border-color: #4CAF50;
    animation: cs-icon-bounce 0.4s ease;
}

.cs-selector__icon.is-active img,
.cs-selector__icon.is-active .cs-selector__letter {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.25), 0 4px 20px rgba(76, 175, 80, 0.4);
}

.cs-selector__icon.is-active .cs-selector__name {
    opacity: 1;
    color: #4CAF50;
}

@keyframes cs-icon-bounce {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.15);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

/* Active pulse ring */
.cs-selector__icon.is-active::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid rgba(76, 175, 80, 0.3);
    animation: cs-pulse 2s ease-out infinite;
}

@keyframes cs-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* ─── Glassmorphism (opt-in via Elementor) ── */

.cs-glass .cs-selector {
    background: rgba(30, 30, 30, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─────────────────────────────────────
   5. TEAM NAVIGATION
   ───────────────────────────────────── */

.cs-teams {
    grid-area: teams;
    display: flex;
    flex-direction: column;
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--cs-radius);
    padding: 12px;
    align-self: start;
}

.cs-teams__list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cs-team-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    transition: all var(--cs-transition);
    outline: none;
}

.cs-team-btn__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid transparent;
    border-radius: 8px;
    padding: 3px;
    overflow: hidden;
    transition: all var(--cs-transition);
}

.cs-team-btn__icon img {
    width: 56px;
    height: 56px;
    border-radius: inherit;
    object-fit: cover;
    display: block;
    transition: transform var(--cs-transition), box-shadow var(--cs-transition);
}

.cs-team-btn__letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: inherit;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
}

.cs-team-btn__name {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    opacity: 0.7;
    color: #aaa;
    transition: opacity var(--cs-transition);
}

/* Hover */
.cs-team-btn:hover .cs-team-btn__icon {
    border-color: rgba(76, 175, 80, 0.4);
}

.cs-team-btn:hover .cs-team-btn__icon img,
.cs-team-btn:hover .cs-team-btn__icon .cs-team-btn__letter {
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
}

.cs-team-btn:hover .cs-team-btn__name {
    opacity: 1;
}

/* ─── Glassmorphism ── */

.cs-glass .cs-teams {
    background: rgba(30, 30, 30, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─────────────────────────────────────
   6. CHARACTER FLIPBOX
   ───────────────────────────────────── */

.cs-char-flip {
    perspective: 1200px;
    height: 500px;
    flex: 1;
    min-width: 0;
}

/* ─────────────────────────────────────
   6a. VIDEO SIDE PANEL
   ───────────────────────────────────── */

.cs-side-panel {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 80px;
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--cs-radius);
    padding: 8px;
    overflow: hidden;
}

.cs-side-panel__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 100%;
    overflow-y: auto;
}

.cs-side-panel__item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    padding: 0;
    transition: all var(--cs-transition);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.cs-side-panel__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cs-side-panel__item:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.cs-side-panel__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity var(--cs-transition);
    pointer-events: none;
}

.cs-side-panel__item:hover .cs-side-panel__play {
    opacity: 1;
}

/* Hide side panel when empty */
.cs-side-panel__list:empty {
    display: none;
}

/* ─── Glassmorphism ── */

.cs-glass .cs-side-panel {
    background: rgba(30, 30, 30, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-char-flip__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(.4, 0, .2, 1);
}

.cs-char-flip.is-flipped .cs-char-flip__inner {
    transform: rotateY(180deg);
}

.cs-char-flip__front,
.cs-char-flip__back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--cs-radius);
    overflow: hidden;
}

.cs-char-flip__front {
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.cs-char-flip__back {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* ── Ambient Glow pseudo-element ── */

.cs-char-flip__front::after {
    content: '';
    position: absolute;
    inset: 15%;
    border-radius: 50%;
    background: var(--cs-glow-color, rgba(102, 126, 234, 0.35));
    filter: blur(60px);
    opacity: 0;
    z-index: -1;
    animation: cs-ambient-glow 4s ease-in-out infinite;
    pointer-events: none;
}

.cs-glow-on .cs-char-flip__front::after {
    opacity: 1;
}

@keyframes cs-ambient-glow {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* ─── Glassmorphism ── */

.cs-glass .cs-char-flip__front {
    background: rgba(30, 30, 30, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-glass .cs-char-flip__back {
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ─── 6b. Click Overlay (for "click anywhere" mode) ── */

.cs-char-flip__click-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    cursor: pointer;
    display: none;
}

.cs-char-flip[data-trigger="click"] .cs-char-flip__click-overlay {
    display: block;
}

/* ─── 6c. Flip Button ── */

.cs-flip-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    cursor: pointer;
    transition: all var(--cs-transition);
    outline: none;
    padding: 0;
}

.cs-flip-btn:hover {
    background: rgba(76, 175, 80, 0.7);
    border-color: #4CAF50;
    transform: rotate(180deg) scale(1.1);
}

.cs-flip-btn--back {
    top: 14px;
    right: 14px;
    bottom: auto;
}

/* ─── 6d. Model Viewer & Fallback Image ── */

.cs-model-viewer {
    width: 100%;
    height: 100%;
    outline: none;
    background: transparent;
    --poster-color: transparent;
}

.cs-char-flip__fallback {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cs-char-flip__fallback.is-hidden {
    display: none;
}

/* ─── 6e. Back Face: Stats & Image ── */

.cs-char-flip__stats {
    flex: 1;
    padding: 24px;
    padding-top: 60px;
    overflow-y: auto;
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.7;
}

.cs-char-flip__stats p {
    margin: 0 0 10px;
}

.cs-char-flip__stats strong {
    color: #ccc;
}

.cs-char-flip__back-img {
    flex-shrink: 0;
    max-height: 45%;
    overflow: hidden;
}

.cs-char-flip__back-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─────────────────────────────────────
   7. DETAIL PANEL (Lore ↔ Product)
   ───────────────────────────────────── */

.cs-detail {
    perspective: 1200px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.cs-detail__inner {
    position: relative;
    width: 100%;
    flex: 1;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(.4, 0, .2, 1);
}

.cs-detail__inner.is-flipped {
    transform: rotateY(180deg);
}

/* 360° forward spin when switching between products */
.cs-detail__inner.is-product-swap {
    transition: none !important;
    animation: cs-product-swap 0.6s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes cs-product-swap {
    0% {
        transform: rotateY(180deg);
    }

    100% {
        transform: rotateY(540deg);
    }
}

.cs-detail__front {
    position: relative;
    width: 100%;
    min-height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--cs-radius);
    padding: 28px;
    background: rgba(30, 30, 30, 0.5);
    color: #fff;
    z-index: 2;
}

.cs-detail__back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--cs-radius);
    padding: 28px;
    overflow-y: auto;
    background: rgba(30, 30, 30, 0.5);
    color: #fff;
    transform: rotateY(180deg);
    z-index: 1;
}

/* ─── Glassmorphism ── */

.cs-glass .cs-detail__front,
.cs-glass .cs-detail__back {
    background: rgba(30, 30, 30, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Title ── */

.cs-detail__title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated gradient shimmer on title */
.cs-title-shimmer .cs-detail__title {
    background: linear-gradient(90deg, #fff 0%, #ccc 25%, #999 50%, #ccc 75%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cs-title-gradient 4s linear infinite;
}

@keyframes cs-title-gradient {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* ─── Lore ── */

.cs-detail__lore {
    font-size: 14px;
    line-height: 1.7;
    opacity: 0.9;
}

.cs-detail__lore p {
    margin: 0 0 12px;
}

/* ─────────────────────────────────────
   8. PRODUCT GRID
   ───────────────────────────────────── */

.cs-products {
    position: relative;
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--cs-radius);
    padding: 16px;
    flex-shrink: 0;
    min-width: 0;
    overflow: hidden;
}

/* ─── Glassmorphism ── */

.cs-glass .cs-products {
    background: rgba(30, 30, 30, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Decorative separator line ── */

.cs-separator-on .cs-products::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15), transparent);
    background-size: 200% 100%;
    animation: cs-separator-flow 3s linear infinite;
    border-radius: 1px;
}

@keyframes cs-separator-flow {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ─── Heading ── */

.cs-products__heading {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

/* ─── Grid ── */

.cs-products__grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ─── Marquee mode (auto-scroll) ── */

.cs-products__grid.cs-marquee {
    flex-wrap: nowrap;
    overflow: hidden;
}

.cs-marquee__track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: cs-marquee var(--cs-marquee-duration, 15s) linear infinite;
}

.cs-marquee__track.is-paused {
    animation-play-state: paused;
}

@keyframes cs-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause on hover */
.cs-products__grid.cs-marquee:hover .cs-marquee__track {
    animation-play-state: paused;
}

/* ─── Tiles ── */

.cs-product-tile {
    width: 100px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(30, 30, 30, 0.6);
    transition: all var(--cs-transition);
}

.cs-product-tile:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.cs-product-tile.is-active {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
    animation: cs-tile-pulse 0.35s ease;
}

@keyframes cs-tile-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}

.cs-product-tile__img {
    height: 100px;
    overflow: hidden;
    background: #fff;
}

.cs-product-tile__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--cs-transition);
}

.cs-product-tile:hover .cs-product-tile__img img {
    transform: scale(1.08);
}

.cs-product-tile__name {
    font-size: 11px;
    font-weight: 600;
    padding: 6px 8px 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e0e0e0;
}

.cs-product-tile__price {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px 8px;
    color: #4CAF50;
}

.cs-no-products {
    color: #888;
    font-style: italic;
    font-size: 13px;
    margin: 0;
}

/* ─── Loading shimmer skeleton ── */

.cs-products__grid.is-loading {
    position: relative;
    min-height: 80px;
}

.cs-products__grid.is-loading::before,
.cs-products__grid.is-loading::after {
    content: '';
    display: block;
    width: 100px;
    height: 130px;
    border-radius: 10px;
    background: linear-gradient(110deg,
            rgba(255, 255, 255, 0.04) 30%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.04) 70%);
    background-size: 200% 100%;
    animation: cs-shimmer 1.5s ease infinite;
}

@keyframes cs-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ─────────────────────────────────────
   9. PRODUCT DETAIL (back face)
   ───────────────────────────────────── */

.cs-product-detail {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ─── Back Button ── */

.cs-back-to-lore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--cs-transition);
    align-self: flex-start;
}

.cs-back-to-lore svg {
    transition: transform var(--cs-transition);
}

.cs-back-to-lore:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.cs-back-to-lore:hover svg {
    animation: cs-arrow-bounce 0.6s ease infinite;
}

@keyframes cs-arrow-bounce {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-4px);
    }
}

/* ─── Horizontal Layout ── */

.cs-product-detail__main {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.cs-product-detail__image-col {
    flex: 0 0 45%;
    max-width: 45%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cs-product-detail__info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* ─── Product Image ── */

.cs-product-detail__image {
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.cs-product-detail__image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ─── Gallery Thumbnails ── */

.cs-product-detail__gallery {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cs-product-detail__thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--cs-transition);
    background: #fff;
}

.cs-product-detail__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cs-product-detail__thumb:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cs-product-detail__thumb.is-active {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
    transform: scale(1.05);
}

/* ─── Info ── */

.cs-product-detail__title {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    color: #fff;
}

.cs-product-detail__price {
    font-size: 20px;
    font-weight: 700;
    color: #4CAF50;
}

.cs-product-detail__price del {
    color: #888;
    font-size: 16px;
}

.cs-product-detail__price ins {
    text-decoration: none;
}

.cs-product-detail__desc {
    font-size: 14px;
    line-height: 1.7;
    opacity: 0.85;
}

.cs-product-detail__desc p {
    margin: 0 0 10px;
}

/* ─── Customize Link (variable products) ── */

.cs-add-to-cart--link {
    text-decoration: none;
}

/* ─────────────────────────────────────
   10. ADD TO CART BUTTON
   ───────────────────────────────────── */

.cs-add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--cs-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cs-add-to-cart:hover {
    background: #388E3C;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.cs-add-to-cart:active {
    transform: translateY(0);
}

.cs-add-to-cart.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.cs-add-to-cart.is-added {
    background: #2E7D32;
}

/* ─────────────────────────────────────
   11. TOAST NOTIFICATION
   ───────────────────────────────────── */

.cs-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2E7D32;
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.cs-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cs-toast.is-error {
    background: #c62828;
}

/* ─────────────────────────────────────
   12. CHARACTER SWITCH TRANSITIONS
   Applied to .cs-char-flip, .cs-detail
   and .cs-products when switching chars
   ───────────────────────────────────── */

.cs-char-flip,
.cs-detail,
.cs-products,
.cs-side-panel {
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

/* Fade */
.cs-switch-fade-out {
    opacity: 0 !important;
}

/* Flip (3D Y-axis) */
.cs-switch-flip-out {
    transform: perspective(1200px) rotateY(90deg) !important;
    opacity: 0.3 !important;
}

/* Slide Up */
.cs-switch-slide-up-out {
    transform: translateY(-40px) !important;
    opacity: 0 !important;
}

/* Slide Left */
.cs-switch-slide-left-out {
    transform: translateX(-60px) !important;
    opacity: 0 !important;
}

/* Zoom */
.cs-switch-zoom-out {
    transform: scale(0.7) !important;
    opacity: 0 !important;
}

/* Blur */
.cs-switch-blur-out {
    filter: blur(12px) !important;
    opacity: 0 !important;
}

/* Rotate */
.cs-switch-rotate-out {
    transform: rotate(8deg) scale(0.85) !important;
    opacity: 0 !important;
}

/* ─────────────────────────────────────
   13. CHARACTER COLOUR — dynamic per-char
   Active only when .cs-use-char-color is on
   ───────────────────────────────────── */

.cs-use-char-color .cs-selector,
.cs-use-char-color .cs-teams,
.cs-use-char-color .cs-char-flip__front,
.cs-use-char-color .cs-char-flip__back,
.cs-use-char-color .cs-detail__front,
.cs-use-char-color .cs-detail__back,
.cs-use-char-color .cs-products,
.cs-use-char-color .cs-side-panel {
    border-color: var(--cs-char-color, rgba(255, 255, 255, 0.1)) !important;
    transition: border-color 0.5s ease, box-shadow 0.5s ease,
        opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

.cs-use-char-color .cs-selector__icon.is-active {
    border-color: var(--cs-char-color, #4CAF50);
}

.cs-use-char-color .cs-selector__icon.is-active::after {
    border-color: var(--cs-char-color, rgba(76, 175, 80, 0.3));
}

.cs-use-char-color .cs-selector__icon.is-active img,
.cs-use-char-color .cs-selector__icon.is-active .cs-selector__letter {
    box-shadow: 0 0 0 3px var(--cs-char-color, rgba(76, 175, 80, 0.25)),
        0 4px 20px var(--cs-char-color, rgba(76, 175, 80, 0.4));
}

.cs-use-char-color .cs-selector__icon.is-active .cs-selector__name {
    color: var(--cs-char-color, #4CAF50);
}

.cs-use-char-color.cs-glow-on .cs-char-flip__front::after {
    background: var(--cs-char-color, rgba(102, 126, 234, 0.35));
}

/* ─────────────────────────────────────
   14. VIDEO MODAL
   ───────────────────────────────────── */

.cs-video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-video-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cs-video-modal__content {
    position: relative;
    width: 90%;
    max-width: 900px;
    z-index: 1;
    animation: cs-modal-in 0.35s ease;
}

@keyframes cs-modal-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cs-video-modal__close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    padding: 4px 12px;
    transition: all 0.3s ease;
    outline: none;
    line-height: 1;
}

.cs-video-modal__close:hover {
    color: #ff4444;
    transform: scale(1.2);
}

.cs-video-modal__iframe-wrap {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
}

.cs-video-modal__iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ─────────────────────────────────────
   15. RESPONSIVE BREAKPOINTS
   ───────────────────────────────────── */

@media (max-width: 768px) {
    .cs-main {
        grid-template-columns: 1fr;
        grid-template-areas:
            "selector"
            "left"
            "content";
    }

    .cs-main.has-teams {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto 1fr;
        grid-template-areas:
            "selector"
            "teams"
            "left"
            "content";
    }

    .cs-left {
        flex-direction: column;
    }

    .cs-side-panel {
        width: 100% !important;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .cs-side-panel__list {
        flex-direction: row;
    }

    .cs-side-panel__item {
        width: 60px;
        flex-shrink: 0;
    }

    .cs-char-flip {
        height: 350px;
    }

    .cs-selector__icon img,
    .cs-selector__letter {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .cs-product-detail__main {
        flex-direction: column;
    }

    .cs-product-detail__image-col {
        flex: none;
        max-width: 100%;
    }

    .cs-selector__name {
        font-size: 10px;
    }

    .cs-product-tile {
        width: 80px;
    }

    .cs-product-tile__img {
        height: 80px;
    }
}

@media (max-width: 480px) {
    .cs-selector__list {
        gap: 10px;
    }

    .cs-detail__title {
        font-size: 22px;
    }

    .cs-char-flip {
        height: 280px;
    }

    .cs-side-panel__item {
        width: 48px;
    }
}