/* ========================================
   Si Bakul Jogja - Design System
   Theme: Kraton Green Yogyakarta
   ======================================== */

/* CSS Variables */
:root {
    /* Kraton Green Palette */
    --kraton-green-dark: #0D3B0D;
    --kraton-green: #1B5E20;
    --kraton-green-light: #2E7D32;
    --kraton-green-lighter: #4CAF50;

    /* Gold Accent */
    --gold: #FFD700;
    --gold-dark: #C9A227;
    --gold-light: #FFE44D;

    /* Neutrals */
    --white: #FFFFFF;
    --off-white: #F5F5F0;
    --gray-light: #E8E8E8;
    --gray: #888888;
    --gray-dark: #333333;
    --black: #1A1A1A;

    /* Semantic Colors */
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #F44336;
    --info: #2196F3;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(255, 215, 0, 0.4);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    /* Larger for TV */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(180deg, var(--kraton-green-dark) 0%, var(--kraton-green) 50%, var(--kraton-green-dark) 100%);
    min-height: 100vh;
    color: var(--white);
    overflow-x: hidden;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Focus States for TV Remote Navigation */
.focusable:focus {
    outline: 4px solid var(--gold);
    outline-offset: 4px;
    box-shadow: var(--shadow-glow);
    transform: scale(1.02);
    transition: var(--transition-fast);
}

.focusable {
    transition: all var(--transition-normal);
}

.focusable:hover {
    transform: scale(1.02);
}

/* ========================================
   Splash Screen
   ======================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--kraton-green-dark) 0%, var(--kraton-green) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease 3s forwards;
}

.splash-content {
    text-align: center;
}

.tugu-animation {
    width: 250px;
    height: auto;
    animation: tuguGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.5));
}

@keyframes tuguGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
        transform: translateY(0);
    }

    50% {
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.6));
        transform: translateY(-10px);
    }
}

.splash-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-top: var(--space-lg);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease 0.5s both;
}

.splash-subtitle {
    font-size: 1.2rem;
    color: var(--white);
    margin-top: var(--space-sm);
    opacity: 0.8;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* ========================================
   App Container
   ======================================== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Header
   ======================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(90deg, rgba(13, 59, 13, 0.95) 0%, rgba(27, 94, 32, 0.95) 50%, rgba(13, 59, 13, 0.95) 100%);
    border-bottom: 3px solid var(--gold);
    box-shadow: var(--shadow-md);
}

.header-left,
.header-right {
    flex: 0 0 auto;
}

.header-center {
    flex: 1;
    text-align: center;
}

.hotel-logo,
.app-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: var(--transition-normal);
}

.hotel-logo {
    height: 100px;
}

.hotel-logo:hover,
.app-logo:hover {
    transform: scale(1.05);
}

.app-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.center-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ========================================
   Breadcrumb Navigation
   ======================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-xl);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid var(--gold);
    border-radius: var(--radius-md);
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-back:hover,
.btn-back:focus {
    background: var(--gold);
    color: var(--kraton-green-dark);
}

.back-icon {
    font-size: 1.2rem;
}

.breadcrumb-text {
    color: var(--white);
    font-size: 1rem;
    opacity: 0.9;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    flex: 1;
    padding: var(--space-lg) var(--space-xl);
    position: relative;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page-active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--gold);
    text-align: center;
    margin-bottom: var(--space-lg);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Mascot Characters
   ======================================== */
.mascot-left,
.mascot-right {
    position: fixed;
    bottom: 80px;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
    /* Added for the new behavior */
}

.mascot-left {
    left: 0;
    width: 180px;
}

.mascot-right {
    right: 0;
    width: 180px;
}

.mascot-img {
    height: 320px;
    /* Changed from 350px */
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    /* Removed width: auto; object-fit: contain; */
}

/* Show only the male character (left portion of image) */
.mascot-male {
    position: relative;
    left: 0;
    /* Removed object-position, width, object-fit */
    animation: mascotFloatLeft 3s ease-in-out infinite;
}

/* Show only the female character (right portion of image) */
.mascot-female {
    position: relative;
    margin-left: -300px;
    animation: mascotFloatRight 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

@keyframes mascotFloatLeft {

    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
        /* Adjusted rotation */
    }

    50% {
        transform: translateY(-12px) rotate(1deg);
        /* Adjusted translateY and rotation */
    }
}

@keyframes mascotFloatRight {

    0%,
    100% {
        transform: translateY(0) rotate(1deg);
        /* Adjusted rotation */
    }

    50% {
        transform: translateY(-12px) rotate(-1deg);
        /* Adjusted translateY and rotation */
    }
}

/* ========================================
   Tugu Background
   ======================================== */
.tugu-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.tugu-bg-image {
    width: 400px;
    height: auto;
    animation: tuguFloat 6s ease-in-out infinite;
}

@keyframes tuguFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ========================================
   Category Grid
   ======================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.category-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: var(--transition-slow);
}

.category-card:hover::before,
.category-card:focus::before {
    left: 100%;
}

.category-card:hover,
.category-card:focus {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: var(--gold);
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.category-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto var(--space-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    padding: var(--space-sm);
    box-shadow: var(--shadow-sm);
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Subcategory Page
   ======================================== */
.subcategory-header {
    position: relative;
    height: 200px;
    margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-xl)) var(--space-lg);
    overflow: hidden;
}

.subcategory-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: blur(2px);
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}

.subcategory-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.subcategory-card:hover,
.subcategory-card:focus {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: var(--gold);
    transform: scale(1.03);
}

.subcategory-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.subcategory-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--white);
}

/* ========================================
   Products Grid
   ======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.product-card:hover,
.product-card:focus {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--white);
}

.product-info {
    padding: var(--space-md);
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-xs);
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
}

/* ========================================
   Product Detail
   ======================================== */
.detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 2px solid rgba(255, 215, 0, 0.2);
}

.detail-image img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: var(--white);
}

.detail-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: var(--space-md);
}

.detail-description {
    font-size: 1rem;
    color: var(--white);
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.detail-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: var(--space-lg);
}

.quantity-section,
.datetime-section {
    margin-bottom: var(--space-lg);
}

.quantity-section label,
.datetime-section label {
    display: block;
    font-size: 1rem;
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.qty-btn {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gold);
    background: rgba(255, 215, 0, 0.2);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.qty-btn:hover,
.qty-btn:focus {
    background: var(--gold);
    color: var(--kraton-green-dark);
}

.qty-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    min-width: 50px;
    text-align: center;
}

.form-input {
    width: 100%;
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1rem;
    font-family: var(--font-body);
}

.form-input:focus {
    border-color: var(--gold);
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.detail-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.btn-primary {
    background: linear-gradient(145deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--kraton-green-dark);
    border-color: var(--gold);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(145deg, var(--gold-light) 0%, var(--gold) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: rgba(255, 215, 0, 0.2);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.2rem;
    min-width: 250px;
}

/* ========================================
   Payment Page
   ======================================== */
.payment-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.payment-summary {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    text-align: left;
}

.payment-summary h3 {
    color: var(--gold);
    margin-bottom: var(--space-md);
    font-family: var(--font-display);
}

.payment-items {
    margin-bottom: var(--space-md);
}

.payment-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    padding-top: var(--space-md);
    border-top: 2px solid var(--gold);
}

.qris-section {
    margin-bottom: var(--space-lg);
}

.qris-image {
    max-width: 300px;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.qris-instruction {
    margin-top: var(--space-md);
    color: var(--white);
    opacity: 0.9;
}

.wa-section {
    margin-bottom: var(--space-lg);
    text-align: left;
}

.wa-section label {
    display: block;
    color: var(--white);
    margin-bottom: var(--space-sm);
}

/* ========================================
   Delivery Tracking
   ======================================== */
.delivery-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.delivery-animation {
    margin-bottom: var(--space-xl);
}

.delivery-motor {
    width: 250px;
    height: auto;
    animation: motorMove 2s ease-in-out infinite;
}

@keyframes motorMove {

    0%,
    100% {
        transform: translateX(-10px);
    }

    50% {
        transform: translateX(10px);
    }
}

.delivery-status {
    margin-bottom: var(--space-xl);
}

.status-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    opacity: 0.5;
    transition: var(--transition-normal);
}

.status-item.active {
    opacity: 1;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--gold);
}

.status-item.completed {
    opacity: 0.8;
    background: rgba(76, 175, 80, 0.2);
}

.status-icon {
    font-size: 2rem;
}

/* ========================================
   Custom Tour
   ======================================== */
.custom-tour-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: var(--space-xl);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.custom-tour-text {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.contact-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: rgba(255, 215, 0, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.phone-icon {
    font-size: 2.5rem;
}

.phone-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.custom-tour-note {
    color: var(--white);
    opacity: 0.8;
    margin-bottom: var(--space-lg);
}

/* ========================================
   Cart Indicator
   ======================================== */
.cart-indicator {
    position: fixed;
    bottom: 100px;
    right: var(--space-lg);
    background: var(--gold);
    color: var(--kraton-green-dark);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    cursor: pointer;
    transition: var(--transition-normal);
}

.cart-indicator:hover {
    transform: scale(1.1);
}

.cart-icon {
    font-size: 1.5rem;
}

.cart-count {
    background: var(--kraton-green);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: var(--space-md) var(--space-xl);
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.footer p {
    color: var(--white);
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-nav-hint {
    margin-top: var(--space-xs);
    color: var(--gold) !important;
    opacity: 1 !important;
}

/* ========================================
   Responsive Adjustments for TV
   ======================================== */
@media (min-width: 1920px) {
    html {
        font-size: 22px;
    }

    .category-icon {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 1024px) {
    html {
        font-size: 16px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .detail-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .hotel-logo,
    .app-logo {
        height: 50px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
}