/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent-color: #529AA0;
    --secondary-color: #8B4513; /* Brown */
    --secondary-light: #A0522D; /* Lighter brown */
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --dark-gray: #333333;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Comic Neue', cursive;
    line-height: 1.5;
    color: var(--dark-gray);
    background-color: #FFF8F0; /* Warm off-white background */
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Simple Cafe Background Elements */
.cafe-bg-element {
    position: fixed;
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
}

/* Simple Coffee Cup */
.coffee-cup {
    top: 10%;
    right: 5%;
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border-radius: 50% 50% 40% 40%;
}

.coffee-cup::after {
    content: '';
    position: absolute;
    top: 15px;
    left: -8px;
    width: 8px;
    height: 20px;
    background: var(--secondary-color);
    border-radius: 4px;
}

/* Coffee Beans */
.coffee-bean {
    background: var(--secondary-color);
    border-radius: 50%;
    transform: rotate(45deg);
}

.coffee-bean-1 {
    top: 20%;
    left: 5%;
    width: 15px;
    height: 10px;
}

.coffee-bean-2 {
    bottom: 30%;
    right: 10%;
    width: 12px;
    height: 8px;
    opacity: 0.08;
}

.coffee-bean-3 {
    top: 60%;
    left: 10%;
    width: 10px;
    height: 6px;
    opacity: 0.06;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Typography */
.hand-written-title {
    font-family: 'Gochi Hand', cursive;
    font-weight: 400;
    font-size: 2.5rem;
    letter-spacing: 1px;
}

.hand-written-subtitle {
    font-family: 'Gochi Hand', cursive;
    font-weight: 400;
    font-size: 1.8rem;
    letter-spacing: 0.5px;
}

.hand-written-btn {
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.handwritten-input {
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
}

/* Header */
.header {
    padding: 20px 0;
    text-align: center;
    background-color: var(#FFF8F0);
}

.logo {
    max-height: 100px;
    width: auto;
    border-radius: var(--border-radius);
}

/* Hero Section */
.hero-section {
    padding: 20px 0;
    background-color: var(--light-gray);
}

.image-gallery {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-image {
    width: 100%;
    max-width: 300px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 2px solid var(--accent-color);
}

/* Menu Section */
.menu-section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.brown-text {
    color: var(--secondary-color);
}

/* ===== NEW STYLES FOR TYPE & CATEGORY SELECTOR ===== */
.type-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0 20px;
}

.type-btn {
    padding: 12px 30px;
    font-size: 1.3rem;
    font-family: 'Gochi Hand', cursive;
    border: 3px solid var(--accent-color);
    background: white;
    color: var(--secondary-color);
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.type-btn.active {
    background: var(--accent-color);
    color: white;
}

.categories-bar {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0 20px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) #f0f0f0;
}

.categories-bar::-webkit-scrollbar {
    height: 6px;
}

.categories-bar::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.category-chip {
    padding: 8px 20px;
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 30px;
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
    color: var(--secondary-color);
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.category-chip.active {
    background: var(--accent-color);
    color: white;
}

.category-chip:hover {
    background: var(--accent-color);
    color: white;
}

/* Simple Menu Grid - Thin Box Design */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

/* Menu item card with image on right */
.menu-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1.5px solid var(--accent-color);
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* Left side text */
.menu-item-left {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Right side image */
.menu-item-right {
    flex: 0 0 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-item-right img {
    width: 100%;
    max-width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
}

.menu-item-header h3 {
    font-family: 'Gochi Hand', cursive;
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 0;
    text-align: left;
}

.menu-item-price {
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--accent-color);
    white-space: nowrap;
}

.menu-item-category {
    display: inline-block;
    background: var(--light-gray);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
    border: 1px solid var(--accent-color);
    margin-top: 8px;
}

.loading {
    text-align: center;
    padding: 40px;
    font-family: 'Comic Neue', cursive;
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Footer */
.footer {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.social-links a {
    color: var(--white);
    font-size: 1.3rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    background: var(--white);
    color: var(--accent-color);
}

.copyright {
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--white);
}

/* Admin Styles */
.admin-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: var(--light-gray);
}

.login-page {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 2px solid var(--accent-color);
}

.login-card h1 {
    text-align: center;
    margin-bottom: 25px;
}

.dashboard {
    width: 100%;
    max-width: 1200px;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: 2px solid var(--accent-color);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--accent-color);
    color: var(--white);
}

.dashboard-header h1 {
    margin: 0;
    color: var(--white);
    font-size: 1.5rem;
}

.dashboard-content {
    padding: 20px;
}

.add-item-section {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    border: 1px solid var(--accent-color);
}

.add-item-section h2 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--secondary-color);
    font-family: 'Comic Neue', cursive;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Comic Neue', cursive;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(82, 154, 160, 0.2);
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1 1 200px;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Comic Neue', cursive;
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-accent:hover {
    background-color: #468990;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #7a3a10;
}

.btn-edit {
    background-color: #4CAF50;
    color: var(--white);
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-delete {
    background-color: #f44336;
    color: var(--white);
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-edit:hover {
    background-color: #45a049;
}

.btn-delete:hover {
    background-color: #da190b;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #ffcdd2;
    font-family: 'Comic Neue', cursive;
}

/* Items List for Admin */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1.5px solid var(--accent-color);
    box-shadow: var(--box-shadow);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--accent-color);
}

.item-header h3 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1.3rem;
    font-family: 'Gochi Hand', cursive;
}

.item-price {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem;
    font-family: 'Comic Neue', cursive;
}

.item-details {
    margin-bottom: 15px;
    color: var(--dark-gray);
    font-family: 'Comic Neue', cursive;
}

.item-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Image preview in admin */
#image-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Responsive Design - Mobile First */
@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .hero-image {
        height: 200px;
    }
    
    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
    
    .dashboard-header h1 {
        font-size: 1.8rem;
    }
}

/* Hide background elements on very small screens */
@media (max-width: 480px) {
    .cafe-bg-element {
        display: none;
    }
}

/* Simple animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.coffee-cup {
    animation: float 4s ease-in-out infinite;
}

/* Mobile-only adjustments */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 15px 0;
    }
    
    .menu-section {
        padding: 30px 0;
    }
    
    .menu-item {
        gap: 10px;
        padding: 15px;
    }
    
    .menu-item-left {
        flex: 0 0 60%;
    }
    
    .menu-item-right {
        flex: 0 0 40%;
    }
    
    .menu-item-right img {
        max-width: 110px;
        height: 110px;
    }
    
    .item-title {
        font-size: 1.2rem;
    }
    
    .item-price {
        font-size: 1.1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .item-actions {
        flex-direction: column;
    }
    
    .hero-image {
        max-width: 100%;
        margin-bottom: 10px;
    }
    
    .image-gallery {
        gap: 5px;
    }
}