/**
 * Copyright (c) 2025 Victor Raul Galindo / VRG Market Solutions
 * All Rights Reserved.
 * 
 * PROPRIETARY AND CONFIDENTIAL
 * Unauthorized copying or modification of this file is strictly prohibited.
 * This software may not be resold without written permission.
 * 
 * Website: vrgmarketsolutions.com
 */

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f8f8f8;
    --border-color: #e0e0e0;
    --category-active: #8B0000;
    --category-inactive: #666666;
    --price-color: #333333;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --modal-bg: rgba(0,0,0,0.5);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --header-bg: #2a2a2a;
    --border-color: #404040;
    --category-active: #ff6b6b;
    --category-inactive: #999999;
    --price-color: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --modal-bg: rgba(0,0,0,0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 30px 20px;
    margin: -20px -20px 30px -20px;
    position: relative;
}

.header-content {
    text-align: center;
    position: relative;
}

.vendor-login-link {
    position: absolute;
    top: 30px;
    right: 20px;
    display: flex;
    align-items: center;
    padding: 8px;
    background: transparent;
    color: #888;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.vendor-login-link:hover {
    opacity: 1;
    background: rgba(0,0,0,0.05);
}

.vendor-login-link svg {
    stroke: #888;
}

@media (max-width: 768px) {
    .vendor-login-link {
        position: static;
        margin: 15px auto 0;
        width: fit-content;
    }
    
    header {
        padding-bottom: 20px;
    }
}

.logo {
    font-size: 48px;
    font-style: italic;
    font-weight: normal;
    margin-bottom: 5px;
}

.tagline {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--category-inactive);
}

/* Welcome Section */
.welcome {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.welcome p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 14px;
}

@media (max-width: 768px) {
    .welcome {
        margin-bottom: 25px;
        padding: 0 15px;
    }
    
    .welcome p {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* Search Section */
.search-section {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--header-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.2);
    border-color: var(--category-active);
}

.search-icon {
    color: var(--category-inactive);
    margin-right: 10px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 16px;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--category-inactive);
    opacity: 0.7;
}

.search-clear {
    background: none;
    border: none;
    color: var(--category-inactive);
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}

.search-clear:hover {
    color: var(--category-active);
}

.search-results-info {
    margin-top: 10px;
    text-align: center;
    color: var(--category-inactive);
    font-size: 14px;
}

/* Search highlight */
mark {
    background-color: #ffeb3b;
    color: #333;
    padding: 2px 0;
    border-radius: 2px;
}

[data-theme="dark"] mark {
    background-color: #ffc107;
    color: #000;
}

/* Categories */
.categories {
    display: flex;
    justify-content: center;  /* Center categories by default */
    gap: 30px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    position: relative;
    max-width: 100%;
    scroll-behavior: smooth;
    width: 100%;
}

/* When categories overflow, start from left */
.categories.has-overflow {
    justify-content: flex-start;
}

/* Scroll hint for mobile */
@media (max-width: 768px) {
    .categories::after {
        content: '→';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 20px;
        color: var(--category-inactive);
        animation: scrollHint 2s ease-in-out infinite;
        pointer-events: none;
        opacity: 0.7;
    }
    
    @keyframes scrollHint {
        0%, 100% {
            transform: translateY(-50%) translateX(0);
        }
        50% {
            transform: translateY(-50%) translateX(5px);
        }
    }
    
    /* Hide hint when scrolled */
    .categories.scrolled::after {
        display: none;
    }
}

/* Custom scrollbar for categories */
.categories::-webkit-scrollbar {
    height: 10px;
}

.categories::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

.categories::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.categories::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Mobile scrollbar visibility */
@media (max-width: 768px) {
    .categories::-webkit-scrollbar {
        height: 6px;
    }
}

.categories::before,
.categories::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 1;
}

.categories::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}

.categories::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}





.category-btn {
    background: none;
    border: none;
    color: var(--category-inactive);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
    padding: 5px 10px;
    font-family: 'Georgia', serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-btn:hover {
    color: var(--category-active);
}

.category-btn.active {
    color: var(--category-active);
}

/* Menu Carousel */
.menu-carousel {
    overflow: hidden;
    margin-bottom: 40px;
    position: relative;
    min-height: 400px;
}

.menu-track {
    display: flex;
    transition: transform 0.5s ease;
}

.menu-section {
    min-width: 100%;
    display: flex;
    justify-content: center;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 400px));
    gap: 40px;
    justify-content: center;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Three column grid layout */
.menu-grid.three-columns {
    grid-template-columns: repeat(3, minmax(250px, 350px));
    gap: 30px;
    max-width: 1200px;
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
    .category-btn:active,
    .store-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
    
    .menu-item:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
}

/* Menu Item */
/* Reset font weights for menu items */
.menu-item * {
    font-weight: inherit;
}

.menu-item {
    position: relative;
    background: #f9f9f9;
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    font-weight: normal; /* Base font weight */
}

.edit-mode .menu-item {
    cursor: move;
}

[data-theme="dark"] .menu-item {
    background: #2a2a2a;
}

/* Drag handle indicator in edit mode */
.edit-mode .menu-item::before {
    content: '⋮⋮';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 12px;
    color: var(--category-inactive);
    opacity: 0.5;
    transition: opacity 0.3s;
    z-index: 1;
    cursor: move;
}

.edit-mode .menu-item:hover::before {
    opacity: 1;
}

/* Drag tooltip - shows on first hover in edit mode */
.edit-mode .menu-item::after {
    content: 'Drag to reorder';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    transition: transform 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.edit-mode .menu-item:hover::after {
    transform: translateX(-50%) scale(1);
}

.edit-mode .menu-item.dragging::after {
    display: none;
}

/* Product Images Section */
.product-images {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.main-image-container {
    flex: 1;
    min-width: 60%;
}

.additional-images {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 35%;
}

/* Image Container */
.image-container {
    width: 100%;
    height: 180px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.small-image {
    height: 86px;
}

.small-image .image-placeholder svg {
    width: 20px;
    height: 20px;
}

.small-image .image-placeholder p {
    font-size: 18px;
    margin: 0;
    font-weight: bold;
}

/* Image Carousel Styles */
.image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-images {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-image.active {
    opacity: 1;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.carousel-dots .dot.active {
    background: white;
    transform: scale(1.2);
}

.carousel-dots .dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.menu-item:hover .carousel-prev,
.menu-item:hover .carousel-next {
    opacity: 0.8;
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.image-controls {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.edit-mode .image-controls {
    display: flex;
}

.image-rotate-btn,
.image-flip-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.image-rotate-btn:hover,
.image-flip-btn:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.image-rotate-btn svg,
.image-flip-btn svg {
    color: var(--text-color);
}

[data-theme="dark"] .image-rotate-btn,
[data-theme="dark"] .image-flip-btn {
    background: rgba(42, 42, 42, 0.9);
}

[data-theme="dark"] .image-rotate-btn:hover,
[data-theme="dark"] .image-flip-btn:hover {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.clickable-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
}

/* Container for vertical images with scrolling */
.image-container.vertical-image {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}

.image-container.vertical-image:active {
    cursor: grabbing;
}

/* Full image display mode - shows complete images */
.full-image-mode .image-container {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.full-image-mode .image-container.vertical-image {
    cursor: default;
    overflow: visible !important;
}

.full-image-mode .image-container img {
    width: 100%;
    height: auto !important;
    object-fit: initial !important;
}

/* Masonry layout using columns for full image mode */
.full-image-mode .menu-grid {
    column-count: auto;
    column-width: 280px;
    column-gap: 40px;
}

.full-image-mode .menu-item {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 40px;
    display: inline-block;
    width: 100%;
}

/* Custom scrollbar for vertical images */
.image-container.vertical-image::-webkit-scrollbar {
    width: 4px;
}

.image-container.vertical-image::-webkit-scrollbar-track {
    background: transparent;
}

.image-container.vertical-image::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

[data-theme="dark"] .image-container.vertical-image::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* Ensure vertical images maintain aspect ratio */
.image-container.vertical-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: top center;
    image-orientation: from-image;
    transform: none;
}

/* Image Display Toggle Button */
.image-display-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    padding: 10px 15px;
    background: var(--header-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    z-index: 999;
    display: none;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.edit-mode .image-display-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-display-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image-display-toggle svg {
    width: 18px;
    height: 18px;
}

.image-display-toggle.active {
    background: var(--category-active);
    color: white;
    border-color: var(--category-active);
}

[data-theme="dark"] .image-display-toggle {
    background: var(--header-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .image-display-toggle.active {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

.edit-mode .image-container {
    cursor: pointer;
}

.image-container img {
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    image-orientation: from-image;
    transform: none;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    color: var(--category-inactive);
    transition: all 0.3s;
}

.image-placeholder svg {
    opacity: 0.3;
    margin-bottom: 8px;
}

.image-placeholder p {
    font-size: 12px;
    opacity: 0.5;
    margin: 0;
}

.edit-mode .image-container:hover .image-placeholder {
    background: var(--header-bg);
}

.edit-mode .image-container:hover .image-placeholder svg {
    opacity: 0.5;
}

.edit-mode .image-container:hover .image-placeholder p {
    opacity: 0.7;
}

/* Image Loading State */
.image-container.loading {
    pointer-events: none;
}

.image-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

/* Loading text */
.image-container.loading .loading-text {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    z-index: 12;
    white-space: nowrap;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Saving Indicator */
.saving-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #2196F3;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    display: none;
    z-index: 10000;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    align-items: center;
    gap: 10px;
}

.saving-indicator.show {
    display: flex;
}

.saving-indicator::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.menu-item:hover {
    transform: translateY(-2px);
}

.edit-mode .menu-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.menu-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    cursor: grabbing !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.menu-item.drag-over {
    border: 2px dashed var(--category-active);
    background: rgba(139, 0, 0, 0.05);
    transform: scale(1.02);
}

[data-theme="dark"] .menu-item.drag-over {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
}

/* Add Item Button */
.add-item-btn {
    display: none;
    width: 100%;
    padding: 15px;
    margin: 20px 0;
    background: var(--header-bg);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.edit-mode .add-item-btn {
    display: block;
}

.add-item-btn:hover {
    background: var(--bg-color);
    border-color: var(--category-active);
    color: var(--category-active);
}

/* Delete Button */
.delete-item-btn {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f44336;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: opacity 0.3s;
}

.edit-mode .delete-item-btn {
    display: block;
}

.delete-item-btn:hover {
    opacity: 0.8;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.menu-item .menu-item-name,
.menu-item-header .menu-item-name {
    font-size: 18px;
    font-weight: 600;
    padding-top: 3px;
}

.menu-item .menu-item-price,
.menu-item-header .menu-item-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--price-color);
}

/* Ensure description has its own specific styles */
.menu-item > .menu-item-description,
.menu-item .menu-item-description,
div.menu-item-description {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--text-color) !important;
    opacity: 0.9 !important;
    font-weight: 400 !important;
    font-family: inherit !important;
    display: block !important;
}

/* Extra specificity to override any inheritance */
.menu-item-header + .menu-item-description,
.menu-item-header ~ .menu-item-description {
    font-weight: 400 !important;
    font-size: 14px !important;
}

/* Ensure name styles don't leak to siblings */
.menu-item-name + * {
    font-weight: initial;
}

/* Isolate menu-item-name styles completely */
.menu-item-name:not(.menu-item-description) {
    font-weight: 600 !important;
}

/* Double ensure description is never bold */
.menu-item div:not(.menu-item-name):not(.menu-item-price).menu-item-description {
    font-weight: 400 !important;
}

.menu-item .description {
    font-size: 14px !important;
    line-height: 1.5;
    color: var(--text-color);
    opacity: 0.9;
    font-weight: 400 !important;
    font-family: inherit;
}

.menu-item .price {
    font-size: 16px;
    color: var(--price-color);
    font-weight: 500;
    margin-top: 8px;
}

/* Fix h3 and p elements in menu items */
.menu-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-color);
}

.menu-item p {
    margin: 0;
    font-weight: 400 !important;
    font-family: inherit;
}

.menu-item p.description {
    margin-bottom: 8px;
    font-weight: 400 !important;
}

/* Override any bold inheritance and contenteditable styles */
.menu-item-description * {
    font-weight: inherit !important;
}

/* Force normal font weight for descriptions even when contenteditable */
[contenteditable="true"].menu-item-description,
[contenteditable="false"].menu-item-description,
.menu-item-description[contenteditable] {
    font-weight: 400 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* Ensure descriptions don't inherit title styles */
.menu-item .menu-item-description {
    font-weight: normal !important;
    font-size: 14px !important;
}

/* Reset any browser default contenteditable styles */
[contenteditable] {
    font-family: inherit;
}

/* Specific override for when JavaScript adds innerHTML */
.menu-item-header + .menu-item-description {
    font-weight: 400 !important;
    font-size: 14px !important;
}

/* Product Gallery Styles for item.php */
.image-gallery {
    width: 100%;
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image.active {
    opacity: 1;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-container:hover .gallery-prev,
.main-image-container:hover .gallery-next {
    opacity: 1;
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: var(--category-active);
}

.gallery-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}




















/* Video Link Input */
.video-link-input {
    margin-top: 12px;
    display: none;
}

.video-link-input input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 13px;
    transition: border-color 0.3s, background-color 0.3s;
    font-family: 'Georgia', serif;
}

.video-link-input input:focus {
    outline: none;
    border-color: var(--category-active);
    background-color: rgba(139, 0, 0, 0.02);
}

[data-theme="dark"] .video-link-input input {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

[data-theme="dark"] .video-link-input input:focus {
    background-color: rgba(255, 107, 107, 0.05);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 40px;
    text-align: center;
}

/* Social Section */
.social-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.social-icons {
    display: none;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-icons.show {
    display: flex;
}

.social-icons a {
    display: inline-block;
    width: 32px;
    height: 32px;
    color: var(--text-color);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.social-icons a:hover {
    opacity: 1;
}

.social-inputs {
    display: none;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: var(--header-bg);
    border-radius: 8px;
}

.edit-mode .social-inputs {
    display: block;
}

.social-input-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.social-input-group label {
    flex: 0 0 140px;
    text-align: right;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
}

.social-input-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
    font-family: inherit;
}

.social-input-group input:focus {
    outline: none;
    border-color: var(--category-active);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto 20px;
    padding: 0 20px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.contact-item {
    font-size: 14px;
    line-height: 1.6;
}

.contact-item span {
    color: var(--text-color);
}

.edit-mode .contact-item span[data-content] {
    padding: 4px 8px;
    border-radius: 4px;
    cursor: text;
}

.edit-mode .contact-item span[data-content]:hover {
    background: var(--header-bg);
}

.footer-credit {
    font-size: 12px;
    color: var(--category-inactive);
    margin-top: 20px;
}

.footer-link {
    color: inherit;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--header-bg);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    z-index: 1000;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

.dark-mode-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-color);
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* Edit Mode Button */
.edit-mode-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(200, 200, 200, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    z-index: 1000;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(100, 100, 100, 0.6);
    backdrop-filter: blur(5px);
}

.edit-mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(100, 100, 100, 0.8);
    border-color: rgba(200, 200, 200, 0.5);
}

[data-theme="dark"] .edit-mode-btn {
    background: rgba(40, 40, 40, 0.3);
    border-color: rgba(80, 80, 80, 0.3);
    color: rgba(200, 200, 200, 0.5);
}

[data-theme="dark"] .edit-mode-btn:hover {
    background: rgba(60, 60, 60, 0.4);
    color: rgba(200, 200, 200, 0.7);
    border-color: rgba(100, 100, 100, 0.5);
}

.edit-mode .edit-mode-btn {
    background: #f44336;
    border-color: #f44336;
    color: white;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-bottom: 20px;
    text-align: center;
}

#passwordInput {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 20px;
    background: var(--bg-color);
    color: var(--text-color);
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.modal-buttons button {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s;
}

#submitPassword {
    background: var(--category-active);
    color: white;
}

#submitPassword:hover {
    opacity: 0.9;
}

#cancelPassword {
    background: var(--header-bg);
    color: var(--text-color);
}

/* Admin bar for editing */
.admin-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 10px;
    z-index: 9999;
    display: none;
}

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

.admin-bar button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
}

.admin-bar button.logout-btn {
    background: #4CAF50 !important;
    color: white !important;
}

.admin-bar button.logout-btn:hover {
    background: #45a049 !important;
}

body.editing {
    padding-top: 50px;
}

/* Grid Layout Toggle Button */
.grid-toggle-btn {
    position: fixed !important;
    bottom: 140px !important;
    right: 20px !important;
    padding: 10px 15px;
    background: var(--header-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    z-index: 999;
    display: none;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    color: var(--text-color);
}

.edit-mode .grid-toggle-btn {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.grid-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.grid-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.grid-toggle-btn.three-columns {
    background: var(--category-active);
    color: white;
    border-color: var(--category-active);
}

[data-theme="dark"] .grid-toggle-btn {
    background: var(--header-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .grid-toggle-btn.three-columns {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

/* Edit mode styles */
.edit-mode [contenteditable="true"] {
    outline: 1px dashed rgba(139, 0, 0, 0.3);
    min-height: 20px;
    cursor: text;
}

.edit-mode [contenteditable="true"]:hover {
    outline-color: rgba(139, 0, 0, 0.5);
    background: rgba(255, 255, 240, 0.2);
}

.edit-mode [contenteditable="true"]:focus {
    outline: 2px solid var(--category-active);
    background: rgba(255, 255, 240, 0.3);
}

/* Notification */
.notification {
    position: fixed;
    top: 70px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    display: none;
    z-index: 10000;
    font-size: 14px;
}

.notification.show {
    display: block;
}

/* Notification types */
.notification.success {
    background: #4CAF50;
}

.notification.error {
    background: #f44336;
}

.notification.warning {
    background: #ff9800;
}

.notification.info {
    background: #2196F3;
}

/* Responsive - Mobile First Approach */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px 10px;
        margin: -10px -10px 20px -10px;
    }
    
    .logo {
        font-size: 32px;
    }
    
    .tagline {
        font-size: 10px;
        letter-spacing: 1.5px;
    }
    
    /* Store Navigation */
    .store-nav {
        padding: 10px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .store-nav .store-btn {
        font-size: 13px;
        padding: 8px 12px;
        white-space: nowrap;
    }
    
    /* Categories Navigation */
    .categories {
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 15px;
        margin-bottom: 20px;
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
        justify-content: center;  /* Keep centered on mobile */
    }
    
    .category-btn {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    /* Search Section */
    .search-section {
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    .search-container {
        padding: 6px 12px;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    /* Menu Grid - Single Column on Mobile */
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 10px;
    }
    
    /* Three column grid should also be single column on mobile */
    .menu-grid.three-columns {
        grid-template-columns: 1fr;
    }
    
    /* Menu Items */
    .menu-item {
        max-width: 100%;
        padding: 15px;
    }
    
    /* Product Images - Full Width on Mobile */
    .image-container {
        height: 250px;
    }
    
    .product-images {
        flex-direction: column;
    }
    
    .main-image-container {
        width: 100%;
        min-width: 100%;
        height: 250px;
    }
    
    .additional-images {
        flex-direction: row;
        width: 100%;
        gap: 10px;
        margin-top: 10px;
    }
    
    .small-image {
        flex: 1;
        height: 80px;
    }
    
    /* Item Text */
    .menu-item-name {
        font-size: 16px !important;
    }
    
    .menu-item-price {
        font-size: 15px !important;
    }
    
    .menu-item-description {
        font-size: 13px !important;
        line-height: 1.4 !important;
    }
    
    /* Share Buttons */
    .share-buttons {
        gap: 6px;
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
    }
    
    .share-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .footer-content {
        padding: 0 10px;
    }
    
    /* Dark mode toggle */
    .dark-mode-toggle {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }
    
    /* Grid toggle button */
    .grid-toggle-btn {
        bottom: 120px;
        right: 15px;
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .grid-toggle-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Hide category sections */
.category-section {
    display: none;
}

.category-section.active {
    display: block;
}
/* Category Management Styles */
.add-category-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    margin-left: 15px;
    display: none; /* Hidden by default, shown in edit mode */
    flex-shrink: 0;
    white-space: nowrap;
}

.edit-mode .add-category-btn {
    display: inline-block;
}

.add-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.remove-category-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4444;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s;
}

.edit-mode .category-btn {
    position: relative;
    padding-right: 25px;
}

.edit-mode .remove-category-btn {
    display: flex;
}

.remove-category-btn:hover {
    background: #ff0000;
    transform: scale(1.1);
}

.category-btn.active .remove-category-btn {
    display: none;
}

.share-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.share-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
}

.share-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-btn:active {
    transform: translateY(0);
}

.share-btn:nth-child(1):hover {
    background: #1877f2;
    border-color: #1877f2;
}

.share-btn:nth-child(1):hover svg {
    color: white;
}

.share-btn:nth-child(2):hover {
    background: #000000;
    border-color: #000000;
}

.share-btn:nth-child(2):hover svg {
    color: white;
}

.share-btn:nth-child(3):hover {
    background: #25D366;
    border-color: #25D366;
}

.share-btn:nth-child(3):hover svg {
    color: white;
}

.share-btn:nth-child(4):hover {
    background: var(--category-active);
    border-color: var(--category-active);
}

.share-btn:nth-child(4):hover svg {
    color: white;
    stroke: white;
}

/* Additional mobile improvements for very small screens */
@media (max-width: 480px) {
    .logo {
        font-size: 28px;
    }
    
    .tagline {
        font-size: 9px;
    }
    
    .store-nav .store-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .category-btn {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    .menu-item {
        padding: 12px;
    }
    
    .image-container {
        height: 200px;
    }
    
    .main-image-container {
        height: 200px;
    }
    
    /* Ensure images fill container properly on mobile */
    .image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }
    
    /* Carousel images on mobile */
    .carousel-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }
}

/* Item Detail Page */
.item-detail-page {
    max-width: 1200px;
    margin: 0 auto;
}

.back-link {
    position: absolute;
    top: 30px;
    right: 20px;
    display: flex;
    align-items: center;
    padding: 8px;
    background: transparent;
    color: #888;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.back-link:hover {
    opacity: 1;
    background: rgba(0,0,0,0.05);
}

.breadcrumb {
    padding: 20px;
    font-size: 14px;
    color: var(--category-inactive);
}

.breadcrumb a {
    color: var(--text-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
}

.item-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 40px 20px;
    align-items: start;
}

.item-image-section {
    position: sticky;
    top: 20px;
}

.item-main-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.no-image {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--header-bg);
    border-radius: 12px;
    color: var(--category-inactive);
}

.item-info-section {
    padding: 20px 0;
}

.item-category {
    font-size: 14px;
    color: var(--category-active);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.item-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.item-price {
    font-size: 28px;
    font-weight: 600;
    color: var(--category-active);
    margin-bottom: 30px;
}

.item-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 40px;
    white-space: pre-wrap;
}

.item-share-section {
    margin: 40px 0;
    padding: 30px;
    background: var(--header-bg);
    border-radius: 12px;
}

.item-share-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.back-to-store-btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--category-active);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.back-to-store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .item-detail {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px 15px;
    }
    
    .item-image-section {
        position: static;
    }
    
    .item-title {
        font-size: 28px;
    }
    
    .item-price {
        font-size: 24px;
    }
    
    .breadcrumb {
        padding: 15px;
        font-size: 12px;
    }
    
    .back-link {
        position: static;
        margin: 15px auto 0;
        width: fit-content;
    }
}

@keyframes highlight {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 0, 0, 0.6);
        transform: scale(1.02);
    }
}

[data-theme="dark"] @keyframes highlight {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.6);
        transform: scale(1.02);
    }
}

.store-nav {
    background: var(--header-bg);
    padding: 15px 0;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    position: relative;
}

/* Mobile scroll improvements for store nav */
@media (max-width: 768px) {
    .store-nav {
        justify-content: center;  /* Keep centered on mobile too */
        padding: 10px 15px;
    }
    
    /* Only left-align if content overflows */
    .store-nav.has-overflow {
        justify-content: flex-start;
    }
    
    .store-nav::-webkit-scrollbar {
        height: 4px;
    }
    
    .store-nav::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .store-nav::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 2px;
    }
}

.store-nav .store-btn {
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    letter-spacing: 0.5px;
}

.sub-categories {
    margin-top: 0;
    padding-top: 15px;
    background: var(--bg-color);
    justify-content: center !important;  /* Center sub-categories */
}

.sub-categories .category-btn {
    font-size: 14px;
}

/* CSV Import/Export Styles */
.csv-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.csv-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.csv-import-content {
    max-width: 600px;
    width: 90vw;
}

.csv-import-options {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.csv-import-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.csv-import-options label:hover {
    background: var(--hover-bg);
}

.csv-import-options input[type="radio"] {
    cursor: pointer;
}

.csv-instructions {
    background: var(--hover-bg);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.csv-instructions p {
    margin-bottom: 10px;
    font-weight: 600;
}

.csv-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.csv-instructions li {
    margin: 5px 0;
    line-height: 1.5;
}

.csv-instructions strong {
    color: var(--category-active);
}

.csv-preview {
    margin: 20px 0;
    padding: 15px;
    background: var(--hover-bg);
    border-radius: 8px;
}

.csv-preview h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-color);
}

.csv-preview-content table {
    width: 100%;
    border-collapse: collapse;
}

.csv-preview-content th,
.csv-preview-content td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.csv-preview-content th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--category-active);
}

.csv-preview-content tr:hover {
    background: var(--bg-color);
}

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

.primary-btn:hover {
    background: #4a69bd;
}

.success-btn {
    background: #27ae60;
    color: white;
}

.success-btn:hover {
    background: #229954;
}

#csvImportModal .modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

#csvImportModal .modal-buttons button {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

/* Dark theme CSV styles */
[data-theme="dark"] .csv-instructions {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .csv-preview {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .csv-preview-content th {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .csv-preview-content tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* CRITICAL: Force proper font weights for menu items - highest specificity */
body .menu-item .menu-item-description,
body .menu-item-description,
body div.menu-item-description,
body [class*="menu-item-description"] {
    font-weight: 400 !important;
    font-weight: normal !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Price should be slightly bold */
body .menu-item .menu-item-price,
body .menu-item-price {
    font-weight: 500 !important;
    font-size: 16px !important;
    color: var(--price-color) !important;
}

/* Name should be bold */
body .menu-item .menu-item-name,
body .menu-item-name {
    font-weight: 600 !important;
    font-size: 16px !important;
}

/* Mobile-specific image improvements */
@media (max-width: 768px) {
    /* Ensure images are centered and fully visible */
    .image-container img {
        object-position: center !important;
    }
    
    /* Carousel improvements for mobile */
    .carousel-prev,
    .carousel-next {
        opacity: 1 !important;
        background: rgba(0, 0, 0, 0.4);
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .carousel-dots {
        bottom: 5px;
        padding: 3px 6px;
    }
    
    .carousel-dots .dot {
        width: 6px;
        height: 6px;
    }
    
    /* Ensure vertical images don't overflow on mobile */
    .vertical-image {
        max-height: 250px !important;
        overflow: hidden !important;
    }
    
    /* Footer improvements */
    footer {
        padding-top: 20px;
        margin-top: 30px;
    }
    
    .social-section {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .contact-details {
        font-size: 13px;
    }
    
    .footer-credit {
        font-size: 11px;
        margin-top: 15px;
    }
}

/* Fix categories scrolling in edit mode */
.edit-mode .categories,
.editing .categories,
body.editing .categories {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    justify-content: center !important;  /* Keep centered in edit mode too */
    padding-left: 20px !important;
    padding-right: 20px !important;
    max-width: 100% !important;
    width: 100% !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-wrap: nowrap !important;
}

/* Only left-align when there are many categories that need scrolling */
.edit-mode .categories.has-many-items,
.editing .categories.has-many-items {
    justify-content: flex-start !important;
}

/* Ensure categories container takes full width */
.edit-mode main,
.editing main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Make sure category buttons are visible and scrollable */
.category-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    min-width: fit-content !important;
}

.edit-mode .category-btn,
.editing .category-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    min-width: fit-content !important;
}

/* Ensure the add category button stays visible */
.edit-mode .add-category-btn,
.editing .add-category-btn {
    margin-left: 15px !important;
    flex-shrink: 0 !important;
}

/* Ensure categories container has proper width */
.container .categories {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    width: calc(100% + 40px);
}

/* Better scrollbar visibility in edit mode */
.edit-mode .categories::-webkit-scrollbar,
.editing .categories::-webkit-scrollbar {
    height: 10px !important;
}

.edit-mode .categories::-webkit-scrollbar-thumb,
.editing .categories::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 5px !important;
}

.edit-mode .categories::-webkit-scrollbar-track,
.editing .categories::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 5px !important;
}
