/* ================================================
   YOGEN FRÜZ KIOSKO - CSS
   Resolution: 1080x1920 (vertical kiosk)
   ================================================ */

/* ========================
   CSS Variables
   ======================== */
:root {
    --pink: #E91E8C;
    --pink-dark: #C4167A;
    --pink-light: #FF7EB3;
    --purple: #9B1FE8;
    --green: #8DC63F;
    --green-dark: #6BA023;
    --bg: #FBF5FC;
    --card: #FFFFFF;
    --text: #2D2D2D;
    --text-secondary: #888;
    --border: #EAEAEA;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================
   Reset & Base
   ======================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    user-select: none;
    -webkit-user-select: none;
}

/* ========================
   Screen Management
   ======================== */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 1;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* ======================================================
   SPLASH SCREEN
   ====================================================== */
#screen-splash {
    background: linear-gradient(-45deg, #E91E8C, #9B1FE8, #FF69B4, #C71585);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.splash-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.splash-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
}

.c1 {
    width: 400px;
    height: 400px;
    background: white;
    top: 5%;
    left: -10%;
    animation: floatA 8s ease-in-out infinite;
}

.c2 {
    width: 300px;
    height: 300px;
    background: var(--green);
    top: 30%;
    right: -8%;
    animation: floatB 10s ease-in-out infinite;
}

.c3 {
    width: 350px;
    height: 350px;
    background: white;
    bottom: 10%;
    left: 20%;
    animation: floatA 12s ease-in-out infinite reverse;
}

.splash-content {
    text-align: center;
    z-index: 2;
    color: white;
    padding: 0 60px;
}

.splash-logo {
    margin-bottom: 24px;
}

.splash-logo-img {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.2));
}

.logo-y,
.header-logo-y {
    font-weight: 800;
    font-size: 72px;
    letter-spacing: 6px;
    color: white;
}

.logo-f,
.header-logo-f {
    font-weight: 800;
    font-size: 72px;
    letter-spacing: 6px;
    color: var(--green);
}

.splash-tagline {
    font-size: 30px;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.4;
    margin-bottom: 48px;
}

.splash-divider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    margin: 0 auto 48px;
}

.splash-welcome {
    font-size: 60px;
    font-weight: 700;
    margin-bottom: 12px;
}

.splash-invite {
    font-size: 30px;
    opacity: 0.85;
    margin-bottom: 72px;
}

.splash-cta {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 28px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 28px 56px;
    border-radius: 60px;
    animation: pulse 2s ease-in-out infinite;
}

.pulse-ring {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    animation: pulseRing 2s ease-in-out infinite;
}

/* Splash floating product images */
.splash-floaters {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.splash-floater {
    position: absolute;
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)) brightness(1.15);
    animation: floaterDrift linear infinite;
    will-change: transform, opacity;
}

@keyframes floaterDrift {
    0% {
        transform: translateY(100vh) rotate(-10deg) scale(0.7);
        opacity: 0;
    }
    10% { opacity: 0.2; }
    50% { opacity: 0.25; }
    90% { opacity: 0.15; }
    100% {
        transform: translateY(-120vh) rotate(10deg) scale(1);
        opacity: 0;
    }
}

/* Splash product showcase */
.splash-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
    min-height: 240px;
    justify-content: center;
}

.showcase-img {
    height: 390px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.3));
    animation: showcaseEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.showcase-img.swap {
    animation: showcaseSwap 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.showcase-name {
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    animation: showcaseFadeUp 0.5s ease-out;
}

.showcase-name.swap {
    animation: showcaseFadeUp 0.5s ease-out;
}

.showcase-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--green);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 24px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
    animation: showcaseFadeUp 0.5s ease-out 0.1s both;
}

.showcase-price.swap {
    animation: showcaseFadeUp 0.5s ease-out 0.1s both;
}

@keyframes showcaseEnter {
    0% { transform: scale(0.3) rotate(-15deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes showcaseSwap {
    0% { transform: scale(0.5) translateY(30px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes showcaseFadeUp {
    0% { transform: translateY(16px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Splash product carousel */
.splash-carousel {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    height: 125px;
    overflow: hidden;
    z-index: 2;
    mask-image: linear-gradient(to right, transparent 0%, white 10%, white 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, white 10%, white 90%, transparent 100%);
}

.splash-carousel-track {
    display: flex;
    gap: 48px;
    align-items: center;
    height: 100%;
    animation: carouselScroll 20s linear infinite;
    width: max-content;
}

.splash-carousel-track img {
    height: 100px;
    width: auto;
    object-fit: contain;
    opacity: 0.45;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2)) brightness(1.1);
    flex-shrink: 0;
    transition: opacity 0.3s;
}

@keyframes carouselScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ======================================================
   HEADER
   ====================================================== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 110px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: white;
    flex-shrink: 0;
}

.header-brand {
    display: flex;
    gap: 12px;
}

.header-logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.header-brand .header-logo-y,
.header-brand .header-logo-f {
    font-size: 38px;
    letter-spacing: 3px;
}

.header-brand.small .header-logo-y,
.header-brand.small .header-logo-f {
    font-size: 30px;
}

.header-back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 22px;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s;
}

.header-back-btn:active {
    background: rgba(255, 255, 255, 0.35);
}

.header-title {
    font-size: 30px;
    font-weight: 700;
}

.header-cart-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    padding: 14px 24px;
    border-radius: 16px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.header-cart-btn:active {
    background: rgba(255, 255, 255, 0.35);
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--green);
    color: white;
    font-size: 17px;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--purple);
}

.cart-badge.hidden {
    display: none;
}

/* ======================================================
   PRODUCTS SCREEN
   ====================================================== */
.products-title {
    padding: 24px 40px 16px;
    flex-shrink: 0;
}

.products-title h2 {
    font-size: 38px;
    font-weight: 700;
    color: var(--text);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(300px, 1fr);
    gap: 20px;
    padding: 0 32px 24px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    align-content: start;
}

/* ======================================================
   PRODUCT CARD
   ====================================================== */
.product-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
}

.product-card:active {
    transform: scale(0.95);
    box-shadow: var(--shadow-lg);
}

.product-card.out-of-stock {
    opacity: 0.55;
    filter: grayscale(0.45);
}

.product-card.out-of-stock:active {
    transform: none;
}

.product-card-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    padding: 8px;
    overflow: hidden;
}

.product-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    pointer-events: none;
}

.product-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.1));
    pointer-events: none;
}

.product-emoji {
    font-size: 72px;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.product-img {
    width: 100%;
    max-height: 106%;
    object-fit: contain;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    transition: transform 0.2s;
}

.product-card:active .product-img {
    transform: scale(0.95);
}

.badge-popular {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--pink);
    font-size: 15px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge-armado {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.badge-stock {
    position: absolute;
    inset: auto 12px 12px auto;
    background: rgba(45, 45, 45, 0.8);
    color: white;
    font-size: 15px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    z-index: 3;
}

.product-card-info {
    padding: 16px 20px 20px;
    flex-shrink: 0;
}

.product-name {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}

.product-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.product-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--pink);
}

/* ======================================================
   CART BAR (bottom of products screen)
   ====================================================== */
.cart-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 96px;
    background: var(--card);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    transform: translateY(100%);
    transition: transform var(--transition);
}

.cart-bar.visible {
    transform: translateY(0);
}

.cart-bar-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-bar-count {
    font-size: 17px;
    color: var(--text-secondary);
}

.cart-bar-total {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
}

.cart-bar-btn {
    background: var(--pink);
    color: white;
    border: none;
    font-size: 22px;
    font-weight: 700;
    padding: 18px 40px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.cart-bar-btn:active {
    background: var(--pink-dark);
}

/* ======================================================
   CUSTOMIZATION SCREEN
   ====================================================== */
.customize-progress {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 28px 60px 8px;
    gap: 0;
    flex-shrink: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}

.progress-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    background: #DDD;
    color: white;
    transition: all 0.3s;
}

.progress-dot.active {
    background: var(--pink);
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(233, 30, 140, 0.2);
}

.progress-dot.done {
    background: var(--green);
}

.progress-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-label.active {
    color: var(--pink);
    font-weight: 700;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: #DDD;
    margin: 20px 4px 0;
    border-radius: 2px;
    transition: background 0.3s;
    min-width: 40px;
}

.progress-line.done {
    background: var(--green);
}

.customize-header {
    text-align: center;
    padding: 8px 40px 16px;
    flex-shrink: 0;
}

.customize-header h2 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 4px;
}

.customize-header p {
    font-size: 22px;
    color: var(--text-secondary);
}

/* Hero product image in customization */
.customize-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 40px 0;
    flex-shrink: 0;
    position: relative;
}

.hero-product-wrap {
    position: relative;
    width: 325px;
    height: 325px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.18));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.hero-product-img.pulse {
    transform: scale(1.08);
}

.hero-ingredients {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.hero-ingredient-badge {
    position: absolute;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--pink);
    animation: ingredientAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-ingredient-badge img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.hero-ingredient-badge .badge-emoji {
    font-size: 22px;
}

/* Badge positions around the product */
.hero-ingredient-badge:nth-child(1) { width: 48px; height: 48px; top: 8px;   left: -16px; }
.hero-ingredient-badge:nth-child(2) { width: 48px; height: 48px; top: 8px;   right: -16px; }
.hero-ingredient-badge:nth-child(3) { width: 44px; height: 44px; bottom: 40px; left: -20px; }
.hero-ingredient-badge:nth-child(4) { width: 44px; height: 44px; bottom: 40px; right: -20px; }
.hero-ingredient-badge:nth-child(5) { width: 40px; height: 40px; top: 50%;  left: -28px; transform: translateY(-50%); }
.hero-ingredient-badge:nth-child(6) { width: 40px; height: 40px; top: 50%;  right: -28px; transform: translateY(-50%); }
.hero-ingredient-badge:nth-child(7) { width: 40px; height: 40px; bottom: 4px; left: 20px; }
.hero-ingredient-badge:nth-child(8) { width: 40px; height: 40px; bottom: 4px; right: 20px; }

@keyframes ingredientAppear {
    0% { transform: scale(0) rotate(-30deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Flying element animation */
.fly-ingredient {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: 0 4px 20px rgba(233, 30, 140, 0.3);
    border: 2px solid var(--pink);
}

.fly-ingredient img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.fly-ingredient .fly-emoji {
    font-size: 28px;
}

.fly-ingredient.flying {
    transform: scale(0.5);
    opacity: 0;
}

.customize-options-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 0 32px 16px;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.option-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    align-content: start;
}

.option-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.option-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.option-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.option-card {
    background: var(--card);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 150px;
    position: relative;
}

.option-card:active {
    transform: scale(0.96);
}

.option-card.selected {
    border-color: var(--pink);
    background: linear-gradient(135deg, rgba(233, 30, 140, 0.06), rgba(155, 31, 232, 0.06));
    box-shadow: 0 0 0 2px var(--pink), var(--shadow);
}

.option-emoji {
    font-size: 52px;
}

.option-img {
    width: 112%;
    max-height: 125px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.option-name {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.option-price {
    font-size: 17px;
    color: var(--pink);
    font-weight: 700;
}

.fruit-counter {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--pink);
    padding: 8px 0 4px;
    flex-shrink: 0;
}

.customize-footer {
    flex-shrink: 0;
    padding: 16px 32px 36px;
    background: var(--card);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.customize-summary {
    font-size: 17px;
    color: var(--text-secondary);
    padding-bottom: 16px;
    min-height: 26px;
    text-align: center;
    line-height: 1.4;
}

.customize-actions {
    display: flex;
    gap: 16px;
}

/* ======================================================
   CART SCREEN
   ====================================================== */
.cart-items-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    min-height: 0;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 24px;
    color: var(--text-secondary);
}

.cart-empty-icon {
    font-size: 80px;
    opacity: 0.3;
}

.cart-empty p {
    font-size: 26px;
}

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

.cart-item {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
    align-items: center;
}

.cart-item-emoji {
    font-size: 48px;
    flex-shrink: 0;
}

.cart-item-img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 12px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 27px;
    font-weight: 700;
    margin-bottom: 4px;
}

.cart-item-config {
    font-size: 19px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.cart-item-addons {
    font-size: 17px;
    color: var(--pink);
    font-weight: 500;
}

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

.cart-item-price {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 16px;
}

.qty-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.15s;
}

.qty-btn:active {
    background: var(--bg);
    transform: scale(0.9);
}

.qty-btn.remove {
    border-color: #FF4444;
    color: #FF4444;
}

.qty-value {
    font-size: 24px;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

.cart-footer {
    flex-shrink: 0;
    padding: 24px 32px 40px;
    background: var(--card);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.cart-promo-panel {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.discount-code-row {
    display: flex;
    gap: 12px;
}

.discount-code-input {
    flex: 1;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.discount-code-btn {
    border: none;
    border-radius: 8px;
    background: var(--text);
    color: white;
    padding: 0 24px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.discount-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 18px;
}

.discount-line,
.subtotal-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.discount-line {
    color: var(--green-dark);
    font-weight: 700;
}

.subtotal-line {
    color: var(--text-secondary);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-total-label {
    font-size: 30px;
    font-weight: 600;
}

.cart-total-amount {
    font-size: 44px;
    font-weight: 800;
    color: var(--pink);
}

/* ======================================================
   PAYMENT SCREEN
   ====================================================== */
#screen-payment {
    background: linear-gradient(-45deg, #E91E8C, #9B1FE8, #FF69B4, #C71585);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    justify-content: center;
    align-items: center;
}

.payment-content {
    text-align: center;
    color: white;
    padding: 60px;
}

.payment-check {
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    margin: 0 auto 48px;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.payment-title {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 20px;
}

.payment-order {
    font-size: 30px;
    opacity: 0.85;
    margin-bottom: 12px;
}

.payment-msg {
    font-size: 26px;
    opacity: 0.7;
    margin-bottom: 60px;
}

.payment-timer {
    font-size: 20px;
    opacity: 0.5;
    margin-bottom: 32px;
}

/* ======================================================
   BUTTONS
   ====================================================== */
.btn {
    border: none;
    font-size: 22px;
    font-weight: 700;
    padding: 22px 40px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.15s;
    flex: 1;
    text-align: center;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--pink);
    color: white;
}

.btn-primary:active {
    background: var(--pink-dark);
}

.btn-primary:disabled {
    background: #CCC;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-outline:active {
    background: var(--bg);
}

.btn-pay {
    background: var(--green);
    color: white;
    font-size: 30px;
    padding: 26px;
    width: 100%;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: 3px;
    transition: background 0.2s;
}

.btn-pay:active {
    background: var(--green-dark);
    transform: scale(0.98);
}

.btn-pay:disabled {
    background: #CCC;
    cursor: not-allowed;
}

.btn-large {
    font-size: 28px;
    padding: 26px 64px;
}

/* ======================================================
   TOAST
   ====================================================== */
.toast {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 45, 45, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 22px 48px;
    border-radius: 20px;
    font-size: 24px;
    font-weight: 600;
    z-index: 100;
    transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toast.show {
    bottom: 140px;
}

/* ======================================================
   ADMIN
   ====================================================== */
body.hide-admin .admin-entry-btn,
body.hide-admin .header-admin-btn {
    display: none !important;
}

.admin-entry-btn,
.header-admin-btn {
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.22);
    color: white;
    font-size: 18px;
    font-weight: 800;
    padding: 12px 18px;
    cursor: pointer;
    z-index: 6;
}

.admin-entry-btn {
    position: absolute;
    top: 28px;
    right: 28px;
}

.header-admin-btn {
    margin-left: 12px;
}

#screen-admin {
    background: #F6F7F9;
}

.admin-header {
    background: #2D2D2D;
}

.admin-login {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.admin-login-box {
    width: 460px;
    background: white;
    border-radius: 8px;
    padding: 36px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-login-box h2,
.admin-form h3 {
    font-size: 28px;
    color: var(--text);
}

.admin-login-msg {
    min-height: 22px;
    color: #D93636;
    font-size: 16px;
    font-weight: 700;
}

.admin-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    padding: 18px 24px;
    background: white;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.admin-tab {
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.admin-tab.active {
    border-color: var(--pink);
    background: rgba(233, 30, 140, 0.08);
    color: var(--pink);
}

.admin-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.admin-section {
    display: none;
    grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.1fr);
    gap: 20px;
    height: 100%;
    padding: 20px 24px 28px;
}

.admin-section.active {
    display: grid;
}

/* Secciones que no usan el grid de 2 columnas (ej. Pagos con sub-tabs):
   se apilan en una sola columna y manejan su propio scroll. */
.admin-section-stack {
    display: none;
    grid-template-columns: none;
    flex-direction: column;
    overflow: hidden;
}

.admin-section-stack.active {
    display: flex;
}

/* Sub-pestañas dentro de una sección (ej. Pagos: Transbank / DTE / DNF / Folios) */
.admin-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 16px;
}

.admin-subtab {
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}

.admin-subtab:hover {
    border-color: var(--pink);
}

.admin-subtab.active {
    border-color: var(--pink);
    background: var(--pink);
    color: white;
}

.admin-subbody {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.admin-subsection {
    display: none;
}

.admin-subsection.active {
    display: block;
}

/* Tarjetas dentro de una sub-pestaña: responsivas, sin romperse al apilarse. */
.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 20px;
    align-items: start;
}

.admin-cards .admin-form {
    overflow: visible;
    height: auto;
}

/* Banner del folio de la próxima venta (pestaña Ventas) */
.admin-folio-banner {
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(233, 30, 140, 0.10), rgba(233, 30, 140, 0.03));
    border: 2px solid var(--pink);
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 18px;
    text-align: center;
}

.admin-folio-label {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-folio-value {
    font-size: 44px;
    font-weight: 900;
    color: var(--pink);
    line-height: 1.1;
    margin: 4px 0;
}

.admin-folio-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.admin-ventas-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    margin-bottom: 8px;
}

.admin-ventas-toolbar h3 {
    margin: 0;
}

.admin-ventas-summary {
    flex-shrink: 0;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.venta-row {
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    align-items: center;
    cursor: pointer;
}

.venta-row:hover {
    background: rgba(233, 30, 140, 0.04);
}

.venta-row:last-child {
    border-bottom: none;
}

.venta-total {
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
    white-space: nowrap;
}

.venta-badge {
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    background: #EEF2F6;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Modal de detalle de venta */
.venta-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.venta-modal.hidden {
    display: none;
}

.venta-modal-box {
    background: white;
    border-radius: 14px;
    width: min(560px, 100%);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.venta-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.venta-modal-head h3 {
    margin: 0;
}

.venta-modal-close {
    border: none;
    background: #EEF2F6;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    color: var(--text);
}

.venta-modal-body {
    padding: 18px 22px 24px;
    overflow-y: auto;
}

.venta-detalle-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.venta-detalle-line:last-child {
    border-bottom: none;
}

.venta-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 18px;
    margin-bottom: 16px;
}

.venta-meta-grid .k {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 800;
}

.venta-meta-grid .v {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.admin-list,
.admin-form {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 0;
    overflow-y: auto;
}

.admin-list {
    display: flex;
    flex-direction: column;
}

.admin-row {
    border-bottom: 1px solid var(--border);
    padding: 16px;
    display: grid;
    grid-template-columns: 68px 1fr auto;
    gap: 14px;
    align-items: center;
}

.admin-row:last-child {
    border-bottom: none;
}

.admin-row-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    background: #F6F7F9;
}

.admin-row-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.admin-row-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.admin-hint {
    font-size: 14px;
    color: var(--text-secondary);
    margin: -4px 0 12px;
    line-height: 1.4;
}

.admin-row-actions {
    display: flex;
    gap: 8px;
}

.admin-mini-btn {
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.admin-mini-btn.danger {
    color: #D93636;
}

.admin-mini-btn.stock-on {
    border-color: var(--green);
    color: var(--green-dark);
}

.admin-mini-btn.stock-off {
    border-color: #D93636;
    color: #D93636;
}

.admin-form {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-secondary);
}

.admin-input {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font-size: 18px;
    font-weight: 650;
    padding: 12px 14px;
    min-height: 50px;
}

.admin-input.pin {
    text-align: center;
    font-size: 26px;
    letter-spacing: 4px;
}

textarea.admin-input {
    resize: vertical;
    min-height: 80px;
}

.admin-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
}

.admin-check-row label {
    flex-direction: row;
    align-items: center;
    color: var(--text);
    font-size: 16px;
}

.admin-check-row input {
    width: 22px;
    height: 22px;
}

.admin-upload-row {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 16px;
    background: #FAFAFA;
}

.admin-upload-row input {
    width: 100%;
    font-size: 16px;
}

.admin-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.design-form {
    grid-column: 1 / -1;
    max-width: 860px;
}

/* ======================================================
   ANIMATIONS
   ====================================================== */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatA {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -40px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-3deg); }
}

@keyframes floatB {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, -25px) rotate(-5deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.04); opacity: 0.9; }
}

@keyframes pulseRing {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.8); opacity: 0.3; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

/* ======================================================
   SCROLLBAR
   ====================================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ======================================================
   UTILITIES
   ====================================================== */
.hidden {
    display: none !important;
}
