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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #111827;
    color: #ffffff;
    min-height: auto;
}

/* Header */
.header {
    background-color: #000000;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #EAB308;
}

.admin-btn {
    background: none;
    border: none;
    color: #ffffff;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
}

.admin-btn:hover {
    background-color: #1F2937;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #D1D5DB;
}

/* Categories Grid */
.categories-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: #1F2937;
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: background-color 0.3s;
    cursor: pointer;
}

.category-card:hover {
    background-color: #374151;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #EAB308;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #9CA3AF;
    margin-bottom: 1rem;
}

.view-menu-btn {
    background-color: #EAB308;
    color: #000000;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.view-menu-btn:hover {
    background-color: #FBBF24;
}

/* Instagram Section */
.instagram-section {
    background-color: #1F2937;
    padding: 3rem 1rem;
    text-align: center;
}

.instagram-text {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.instagram-subtext {
    color: #9CA3AF;
    margin-bottom: 1.5rem;
}

.instagram-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(to right, #A855F7, #EC4899);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s;
}

.instagram-btn:hover {
    background: linear-gradient(to right, #9333EA, #DB2777);
}

/* Footer */
.footer {
    background-color: #000000;
    padding: 1.5rem 1rem;
    text-align: center;
    color: #9CA3AF;
}

.footer a {
    color: #EAB308;
    text-decoration: none;
}

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

/* Category View */
.category-header {
    background-color: #000000;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Category Header Navigation */
.category-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.category-header-nav .back-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    flex-shrink: 0;
}

.category-header-nav .back-btn:hover {
    background-color: #1F2937;
    color: #EAB308;
}

.category-header-nav .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #EAB308;
    margin: 0;
    white-space: nowrap;
    z-index: 10;
}

.header-spacer {
    width: 3.25rem;
    height: 3.25rem;
    flex-shrink: 0;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
}

.back-btn:hover {
    color: #EAB308;
}

#adminActions {
    display: flex;
    gap: 0.5rem;
}

.add-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #EAB308;
    color: #000000;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-btn:hover {
    background-color: #FBBF24;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #DC2626;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #B91C1C;
}

.category-title {
    text-align: center;
    padding: 3rem 1rem 2rem;
    margin-bottom: 0;
}

.category-title h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #EAB308;
    margin-bottom: 0.5rem;
}

.category-title p {
    color: #9CA3AF;
}

/* Sticky Navigation Container */
.sticky-nav-container {
    position: sticky;
    top: 0px;
    z-index: 40;
    background-color: #111827;
    border-bottom: 1px solid #1F2937;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
    width: 100%;
    margin-top: -2px;
    padding-top: 2px;
}

/* Subcategories */
.subcategories {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    background-color: transparent;
}

.subcategory-marquee {
    background-color: #1F2937;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #4B5563 #1F2937;
}

.subcategory-marquee::-webkit-scrollbar {
    height: 6px;
}

.subcategory-marquee::-webkit-scrollbar-track {
    background: #1F2937;
    border-radius: 3px;
}

.subcategory-marquee::-webkit-scrollbar-thumb {
    background: #4B5563;
    border-radius: 3px;
}

.subcategory-marquee::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

.subcategory-filters {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
    min-width: max-content;
    padding-bottom: 0.5rem;
}

.subcategory-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.875rem;
    border: 2px solid transparent;
}

.subcategory-btn.active {
    background-color: #EAB308;
    color: #000000;
    border-color: #FBBF24;
    transform: scale(1.05);
}

.subcategory-btn:not(.active) {
    background-color: #374151;
    color: #ffffff;
}

.subcategory-btn:not(.active):hover {
    background-color: #4B5563;
    transform: translateY(-2px);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .subcategory-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .subcategory-marquee {
        padding: 0.75rem;
    }
}

/* Items Section */
.items-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.items-header {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: transparent;
    border-top: 1px solid #1F2937;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-toggle {
    display: flex;
    background-color: #374151;
    border-radius: 0.5rem;
    padding: 0.25rem;
    gap: 0.25rem;
}

.view-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: #9CA3AF;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    color: #ffffff;
    background-color: #4B5563;
}

.view-btn.active {
    background-color: #EAB308;
    color: #000000;
}

.view-btn i {
    font-size: 1rem;
}

.search-container {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    min-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background-color: #374151;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
    background-color: #4B5563;
}

.search-input::placeholder {
    color: #9CA3AF;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    pointer-events: none;
}

.items-grid {
    display: grid;
    gap: 1.5rem;
}

/* Grid View */
.items-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* List View */
.items-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Grid Item Card */
.item-card.grid-item {
    background-color: #1F2937;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s;
}

.item-card.grid-item:hover {
    transform: scale(1.05);
}

.item-card.grid-item .item-image {
    height: 12rem;
    background-color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #6B7280;
}

.item-card.grid-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-card.grid-item .item-details {
    padding: 1rem;
}

/* List Item Card */
.item-card.list-item {
    background-color: #1F2937;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.3s;
}

.item-card.list-item:hover {
    background-color: #374151;
}

.item-image-list {
    width: 5rem;
    height: 5rem;
    background-color: #374151;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #6B7280;
    flex-shrink: 0;
}

.item-image-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.item-details-list {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-info {
    flex: 1;
}

/* Common Item Styles */
.item-name {
    font-weight: bold;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.item-subcategory {
    font-size: 0.875rem;
    color: #EAB308;
    margin-bottom: 0.5rem;
}

.item-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #EAB308;
}



.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.edit-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background-color: #2563EB;
    color: #ffffff;
    padding: 0.5rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.edit-btn:hover {
    background-color: #1D4ED8;
}

.delete-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background-color: #DC2626;
    color: #ffffff;
    padding: 0.5rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #B91C1C;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #1F2937;
    border-radius: 0.5rem;
    max-width: 28rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #374151;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #ffffff;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.input-field {
    width: 100%;
    background-color: #374151;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.input-field:focus {
    outline: 2px solid #EAB308;
}

.submit-btn {
    width: 100%;
    background-color: #EAB308;
    color: #000000;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background-color: #FBBF24;
}

.cancel-btn {
    width: 100%;
    background-color: #374151;
    color: #ffffff;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 0.5rem;
}

.cancel-btn:hover {
    background-color: #4B5563;
}

.form-actions {
    margin-top: 1.5rem;
}

.hint-text {
    font-size: 0.875rem;
    color: #9CA3AF;
    text-align: center;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .category-title h1 {
        font-size: 2rem;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .category-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .category-header-nav .logo {
        position: static;
        transform: none;
        font-size: 1.25rem;
    }
    
    .category-header-nav {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-spacer {
        display: none;
    }

    .sticky-nav-container {
     position: sticky;
    top: 0px;
    z-index: 40;
    background-color: #111827;
    border-bottom: 1px solid #1F2937;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
    width: 100%;
    margin-top: -2px;
    padding-top: 2px;
    }   
    
    .subcategories {
        padding: 0.75rem 1rem;
    }
    
    .items-header {
        padding: 0.75rem 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
    }
    
    .items-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
    }
    
    .view-toggle {
        flex-shrink: 0;
    }
    
    .search-container {
        flex: 1;
        min-width: 0;
    }
    
    .search-input-wrapper {
        min-width: auto;
        width: 100%;
    }
    
    .view-btn {
        padding: 0.4rem 0.6rem;
    }
    
    .view-btn i {
        font-size: 0.875rem;
    }
    
    .search-input {
        padding: 0.6rem 2.5rem 0.6rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .search-icon {
        right: 0.75rem;
    }
    
    .items-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .item-card.list-item {
        flex-direction: row;
        text-align: left;
        gap: 0.75rem;
        align-items: center;
    }
    
    .item-details-list {
        flex-direction: row;
        gap: 0.75rem;
        text-align: left;
        align-items: center;
    }
    
    .item-info {
        flex: 1;
        min-width: 0;
    }
    
    .item-image-list {
        align-self: center;
        width: 4rem;
        height: 4rem;
    }
    
    .item-name {
        font-size: 1rem;
        margin-bottom: 0.125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .item-subcategory {
        font-size: 0.75rem;
        margin-bottom: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .item-price {
        font-size: 1rem;
        flex-shrink: 0;
        white-space: nowrap;
    }
}


/* Welcome Popup Styles */
.welcome-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.welcome-popup-overlay.active {
    opacity: 1;
}

.welcome-popup {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.welcome-popup-overlay.active .welcome-popup {
    transform: scale(1);
}

.welcome-popup-content {
    margin-bottom: 1.5rem;
}

.welcome-popup-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.welcome-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

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

@media (max-width: 768px) {
    .welcome-popup {
        padding: 1.5rem;
        max-width: 95%;
    }
    
    .welcome-popup-content p {
        font-size: 1rem !important;
    }
    
    .welcome-popup-btn {
        padding: 0.875rem;
        font-size: 1rem;
    }
}
