/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Six vertical color columns as background */
    background: linear-gradient(to right, #c44448 0%, #c44448 16.66%, #30845c 16.66%, #30845c 33.33%, #f0e848 33.33%, #f0e848 50%, #343074 50%, #343074 66.66%, #bc306c 66.66%, #bc306c 83.33%, #2874c4 83.33%, #2874c4 100%);
    min-height: 100vh;
    color: #f4f0e8;
    overflow-x: hidden;
}

.container {
    max-width: 100vw;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.store-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.store-header {
    position: relative;
    text-align: center;
    padding: 20px 0;
    background: transparent;
    color: white;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.store-header > * {
    position: relative;
    z-index: 1;
}

.store-header-billboard-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    background-image: var(--billboard-image);
    background-repeat: repeat;
    background-size: auto;
    background-position: left bottom;
}

.store-header.billboard-ready .store-header-billboard-overlay {
    opacity: 0;
}

.store-header.billboard-animate .store-header-billboard-overlay {
    animation: billboard-tile-traverse 8s linear infinite;
    opacity: 1;
}

@keyframes billboard-tile-traverse {
    0% {
        background-position: left bottom;
    }
    50% {
        background-position: right top;
    }
    100% {
        background-position: left bottom;
        opacity: 1;
    }
}

.store-header-link {
    text-decoration: none;
    color: inherit;
}

.store-header-link:hover {
    color: inherit;
    text-decoration: none;
}

.store-header-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
    min-height: 120px;
    width: 100%;
}

.store-header-flex > h1,
.store-header-flex > .store-header-animation {
    flex: 0 0 auto;
}

.store-header-flex > h1 {
    white-space: nowrap;
}

.store-header-animation {
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-header-animation img {
    display: block;
}

.store-header-img {
    max-height: 120px;
    width: auto;
}

.store-header h1 {
    margin: 0;
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    color: #f4f0e8;
    text-shadow: 
        0 0 10px #5da5b0,
        0 0 20px #5da5b0,
        2px 2px 0 #e6d8a5,
        4px 4px 0 #5da5b0,
        0 0 30px rgba(93, 165, 176, 0.5),
        0 0 40px rgba(93, 165, 176, 0.3);
    letter-spacing: 2px;
    text-transform: uppercase;
    filter: drop-shadow(0 0 8px rgba(230, 216, 165, 0.6));
    animation: y2k-glow 3s ease-in-out infinite alternate;
    position: relative;
    padding: 10px 20px;
    overflow: visible;
}

.store-header h1::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: 
        repeating-conic-gradient(from 0deg at 50% 50%, 
            #ff0007 0deg 36deg, 
            transparent 36deg 72deg,
            #0e00ff 72deg 108deg,
            transparent 108deg 144deg,
            #ff006d 144deg 180deg,
            transparent 180deg 216deg,
            #fff200 216deg 252deg,
            transparent 252deg 288deg,
            #00ff85 288deg 324deg,
            transparent 324deg 360deg
        ),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            #ff0007 20px,
            #ff0007 21px,
            transparent 21px,
            transparent 40px,
            #0e00ff 40px,
            #0e00ff 41px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 20px,
            #ff006d 20px,
            #ff006d 21px,
            transparent 21px,
            transparent 40px,
            #fff200 40px,
            #fff200 41px
        );
    background-size: 200px 200px, 80px 80px, 60px 60px;
    background-blend-mode: screen;
    border-radius: 8px;
    opacity: 0.7;
    z-index: -1;
    animation: fractal-move 20s linear infinite;
    mix-blend-mode: screen;
}

.store-header h1::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: 
        repeating-conic-gradient(from 45deg at 50% 50%, 
            #fff200 0deg 30deg, 
            transparent 30deg 60deg,
            #00ff85 60deg 90deg,
            transparent 90deg 120deg,
            #ff0007 120deg 150deg,
            transparent 150deg 180deg,
            #0e00ff 180deg 210deg,
            transparent 210deg 240deg,
            #ff006d 240deg 270deg,
            transparent 270deg 300deg,
            #fff200 300deg 330deg,
            transparent 330deg 360deg
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 15px,
            #00ff85 15px,
            #00ff85 16px,
            transparent 16px,
            transparent 30px,
            #ff0007 30px,
            #ff0007 31px
        );
    background-size: 150px 150px, 50px 50px;
    background-blend-mode: screen;
    border-radius: 6px;
    opacity: 0.6;
    z-index: -1;
    animation: fractal-move-secondary 15s linear infinite reverse;
    mix-blend-mode: screen;
}

@keyframes fractal-move {
    0% {
        background-position: 0 0, 0 0, 0 0;
        transform: rotate(0deg);
        opacity: 0.7;
    }
    25% {
        background-position: 200px 200px, 80px 80px, 60px -60px;
        transform: rotate(90deg);
        opacity: 0.8;
    }
    50% {
        background-position: 400px 400px, 160px 160px, 120px 120px;
        transform: rotate(180deg);
        opacity: 0.75;
    }
    75% {
        background-position: 600px 600px, 240px 240px, 180px -180px;
        transform: rotate(270deg);
        opacity: 0.8;
    }
    100% {
        background-position: 800px 800px, 320px 320px, 240px 240px;
        transform: rotate(360deg);
        opacity: 0.7;
    }
}

@keyframes fractal-move-secondary {
    0% {
        background-position: 0 0, 0 0;
        transform: rotate(0deg) scale(1);
        opacity: 0.6;
    }
    33% {
        background-position: -150px -150px, -50px -50px;
        transform: rotate(120deg) scale(1.1);
        opacity: 0.7;
    }
    66% {
        background-position: -300px -300px, -100px -100px;
        transform: rotate(240deg) scale(0.9);
        opacity: 0.65;
    }
    100% {
        background-position: -450px -450px, -150px -150px;
        transform: rotate(360deg) scale(1);
        opacity: 0.6;
    }
}

@keyframes static-flicker {
    0% {
        opacity: 0.5;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        opacity: 0.9;
        transform: translate(3px, -3px) scale(1.02) rotate(0.5deg);
    }
    50% {
        opacity: 0.4;
        transform: translate(-4px, 2px) scale(0.98) rotate(-0.5deg);
    }
    75% {
        opacity: 0.85;
        transform: translate(2px, 4px) scale(1.01) rotate(0.3deg);
    }
    100% {
        opacity: 0.5;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

@keyframes y2k-glow {
    0% {
        text-shadow: 
            0 0 10px #5da5b0,
            0 0 20px #5da5b0,
            2px 2px 0 #e6d8a5,
            4px 4px 0 #5da5b0,
            0 0 30px rgba(93, 165, 176, 0.5),
            0 0 40px rgba(93, 165, 176, 0.3);
    }
    100% {
        text-shadow: 
            0 0 15px #5da5b0,
            0 0 25px #5da5b0,
            2px 2px 0 #e6d8a5,
            4px 4px 0 #5da5b0,
            0 0 35px rgba(93, 165, 176, 0.7),
            0 0 50px rgba(230, 216, 165, 0.5),
            0 0 60px rgba(93, 165, 176, 0.4);
    }
}

.staff-portal-header {
    background: transparent;
    box-shadow: none;
    text-align: center;
    padding: 30px 0 10px;
}

.staff-portal-header .store-header-flex {
    justify-content: flex-start;
}
.staff-portal-header h1 {
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}


.staff-portal-header .store-header-img {
    max-height: 80px;
}

/* Item Portal Styles */
.item-portal-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Bulk Edit Styles */
.bulk-edit-dropdown {
    min-width: 150px;
}

.bulk-edit-dropdown .dropdown-toggle {
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem;
}

.bulk-edit-dropdown .dropdown-toggle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.item-checkbox {
    cursor: pointer;
    margin: 0;
}

.item-checkbox:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.select-all-checkbox {
    cursor: pointer;
    margin: 0;
}

.select-all-checkbox:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.table th:first-child,
.table td:first-child {
    width: 40px;
    text-align: center;
}

.item-form-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.item-form-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

.item-form-card .card-header h5 {
    margin: 0;
    font-weight: 600;
    color: #ffffff;
}

.item-table {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.item-table .card-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

.item-table .table {
    margin-bottom: 0;
}

.item-table .table th {
    border-top: none;
    font-weight: 600;
    color: #000000;
    background-color: #f8f9fa;
}

.item-table .table td {
    vertical-align: middle;
}

.item-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #dee2e6;
}

.item-thumbnail-placeholder {
    width: 50px;
    height: 50px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.75rem;
}

.inventory-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Image Management Styles */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease;
}

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

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

.image-card .card-body {
    padding: 15px;
}

.image-order-badge {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Form Styles */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    color: #000000 !important;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Ensure form labels in item portal are black */
.item-portal-container .form-label,
.item-portal-container .card-header h5 {
    color: #000000 !important;
}

/* Override Bootstrap's default label color */
label.form-label {
    color: #000000 !important;
}

.card-header h5 {
    color: #000000 !important;
    font-weight: 600;
}

/* Ensure card headers in item portal are black */
.item-portal-container .card-header h5 {
    color: #000000 !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

.btn-outline-primary:hover {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
}

/* Modal Styles */
.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
    border-radius: 10px 10px 0 0;
    border: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .store-header h1 {
        font-size: 2rem;
    }
    
    .store-header-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* Drag and Drop Styles */
.sortable-ghost {
    opacity: 0.5;
    background: #f8f9fa;
    border: 2px dashed #667eea;
}

.sortable-chosen {
    transform: rotate(5deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Navigation Styles */
.navbar {
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    color: #667eea !important;
}

.nav-link {
    color: #495057 !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #667eea !important;
}

.dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 8px 16px;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

/* Store Grid */
.store-grid {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    min-height: 0;
    height: auto;
    overflow: visible;
}

/* Grid Navigation Container */
.grid-navigation-container {
    display: flex;
    align-items: stretch;
    min-height: 0;
    gap: 2px;
    overflow: visible;
}

/* Grid Navigation Buttons */
.grid-nav-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80px;
    background: rgba(102, 126, 234, 0.9);
    color: #f4f0e8;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    padding: 20px 10px;
    position: sticky;
    top: 0;
    height: calc(100vh - 120px);
    min-height: 200px;
    z-index: 10;
}

.grid-nav-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: scale(1.05);
}

.grid-nav-btn.disabled {
    background: rgba(150, 150, 150, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
}

.grid-nav-btn.disabled:hover {
    background: rgba(150, 150, 150, 0.5);
    transform: none;
}

.nav-arrow {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.nav-text {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Make grid items square and use fewer columns for larger images */
.items-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Fewer columns for larger items */
    gap: 0;
    margin: 0;
    flex: 1;
    min-height: 0;
}

/* Item Cards */
.item-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Fallback for browsers without aspect-ratio */
    height: auto;
    padding-bottom: 0;
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s ease;
    border: 1.5px solid transparent;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.item-card:hover {
    border: 2.5px solid #d48ca6; /* dull pink */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    /* Remove any previous transform or shadow effects */
}

.item-card > * {
    position: static;
    width: 100%;
    height: auto;
}

.item-image-container {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image Carousel */
.image-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.125s ease, transform 0.2s ease;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.5);
    border: none;
    border-radius: 50% / 50%;
    width: 32px;
    height: 64px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.carousel-btn:hover {
    background: rgba(255,255,255,0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.prev-btn {
    left: 2px;
}

.next-btn {
    right: 2px;
}

/* Price Overlay */
.price-overlay {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: #f4f0e8;
    padding: 4px 8px;
    border-radius: 14px;
    font-weight: bold;
    font-size: 0.95rem;
    z-index: 7;
    opacity: 0.95;
}

.price {
    color: #4CAF50;
    font-size: 0.98em;
}

/* Item Info */
.item-info {
    padding: 4px;
    height: auto;
    min-height: 30px;
    max-height: 45px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-shrink: 0;
    padding-top: 2px;
}

.item-name {
    font-size: 0.9rem;
    margin-bottom: 1px;
    color: #f4f0e8;
    font-weight: 600;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 0;
}

.item-description {
    font-size: 0.7rem;
    color: #f4f0e8;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* Page Info */
.page-info {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: transparent;
    border-top: none;
}

.current-page {
    padding: 8px 10px 6px 10px;
    background: none;
    border-radius: 0;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    font-weight: 300;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: #f4f0e8;
    text-align: left;
    text-shadow:
        -1px -1px 0 #ffff99,
         1px -1px 0 #ffff99,
        -1px  1px 0 #ffff99,
         1px  1px 0 #ffff99,
         0px  2px 4px rgba(255,255,153,0.18);
    border-bottom: 2px solid #ffff99;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No Items State */
.no-items {
    text-align: center;
    padding: 60px 20px;
    color: #f4f0e8;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.no-items h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Specific rule for 480x360 monitors */
@media (max-width: 480px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
    }
    
    /* Adjust button positions for mobile */
    .cart-banner-btn {
        bottom: 22px !important;
        right: 8px !important;
        top: auto !important;
        left: auto !important;
        padding: 10px 16px !important;
        font-size: 1.4rem !important;
    }
    
    .checkout-banner-btn {
        bottom: 22px !important;
        left: 8px !important;
        top: auto !important;
        right: auto !important;
        padding: 10px 16px !important;
        font-size: 1.4rem !important;
    }
    
    /* Cart page button adjustments for mobile */
    .cart-main .checkout-banner-btn {
        bottom: 8px !important;
        right: 8px !important;
        top: auto !important;
        left: auto !important;
        padding: 10px 16px !important;
        font-size: 1.4rem !important;
    }
    
    html body .cart-main .checkout-banner-btn {
        top: auto !important;
        right: 8px !important;
        bottom: 8px !important;
        left: auto !important;
    }
    
    .cart-page-checkout {
        right: 8px !important;
        bottom: 8px !important;
    }
    
    .cart-return-btn {
        bottom: 22px !important;
        left: 8px !important;
        padding: 10px 16px !important;
        font-size: 1.4rem !important;
    }
    
    .checkout-return-btn {
        bottom: 22px !important;
        left: 8px !important;
        padding: 10px 16px !important;
        font-size: 1.4rem !important;
        min-height: 44px !important; /* Minimum height for mobile */
    }
    
    .checkout-store-btn {
        bottom: 22px !important;
        right: 8px !important;
        padding: 10px 16px !important;
        font-size: 1.4rem !important;
        min-height: 44px !important; /* Minimum height for mobile */
    }
    
    /* Cart page store button mobile positioning */
    .cart-main .checkout-store-btn {
        bottom: 22px !important;
        left: 8px !important;
        right: auto !important;
    }
    
    html body .cart-main .checkout-store-btn {
        bottom: 22px !important;
        left: 8px !important;
        right: auto !important;
    }
    
    .cart-page-store {
        bottom: 22px !important;
        left: 8px !important;
        right: auto !important;
    }
    
    /* Larger store icon for mobile */
    .checkout-store-btn .cart-icon,
    .cart-page-store .cart-icon {
        font-size: 1.3em !important;
    }
}

/* Force 3x4 grid for small screens */
@media (max-width: 500px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
    }
    
    .store-header h1 {
        font-size: 1.2rem;
    }
    
    .store-header {
        padding: 3px 0;
    }
    
    .grid-nav-btn {
        width: 35px;
    }
    
    .nav-arrow {
        font-size: 1.3rem;
    }
    
    .nav-text {
        font-size: 0.5rem;
    }
    
    .item-info {
        padding: 1px;
        min-height: 20px;
        max-height: 30px;
        justify-content: flex-start;
        padding-top: 0px;
    }
    
    .item-name {
        font-size: 0.7rem;
        line-height: 1.0;
        margin-bottom: 0;
        margin-top: 0;
    }
    
    .item-description {
        font-size: 0.6rem;
        line-height: 1.0;
        margin-top: 0;
    }
}

/* Ultra-specific rule for 480x360 */
@media (max-width: 480px) and (max-height: 360px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
    }
}

/* Responsive Design - Simple and Effective */
@media (max-width: 1200px) and (min-width: 901px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        grid-auto-rows: 1fr !important;
    }
}

/* Specific rule for 1024x768 monitors */
@media (max-width: 1024px) and (min-width: 901px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        grid-auto-rows: 1fr !important;
    }
}

/* Force 4x3 grid for medium screens */
@media (max-width: 1200px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) and (min-width: 601px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-auto-rows: 1fr !important;
    }
}

@media (max-width: 600px) {
    .items-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .store-header h1 {
        font-size: 1.5rem;
    }
    
    .store-header {
        padding: 5px 0;
    }
    
    .grid-nav-btn {
        width: 40px;
    }
    
    .nav-arrow {
        font-size: 1.5rem;
    }
    
    .nav-text {
        font-size: 0.6rem;
    }
    
    .item-info {
        padding: 2px;
        min-height: 25px;
        max-height: 35px;
        justify-content: flex-start;
        padding-top: 1px;
    }
    
    .item-name {
        font-size: 0.8rem;
        line-height: 1.0;
        margin-bottom: 0;
        margin-top: 0;
    }
    
    .item-description {
        font-size: 0.6rem;
        line-height: 1.0;
        margin-top: 0;
    }
}

@media (max-width: 400px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-nav-btn {
        width: 30px;
    }
    
    .nav-arrow {
        font-size: 1.2rem;
    }
    
    .nav-text {
        font-size: 0.5rem;
    }
    
    .item-info {
        padding: 0px;
        min-height: 18px;
        max-height: 25px;
        justify-content: flex-start;
        padding-top: 0px;
    }
    
    .item-name {
        font-size: 0.6rem;
        line-height: 1.0;
        margin-bottom: 0;
        margin-top: 0;
    }
    
    .item-description {
        font-size: 0.5rem;
        line-height: 1.0;
        margin-top: 0;
    }
    
    /* Adjust button positions for very small screens */
    .cart-banner-btn {
        bottom: 19px !important;
        right: 5px !important;
        top: auto !important;
        left: auto !important;
        padding: 8px 12px !important;
        font-size: 1.2rem !important;
    }
    
    .checkout-banner-btn {
        bottom: 19px !important;
        left: 5px !important;
        top: auto !important;
        right: auto !important;
        padding: 8px 12px !important;
        font-size: 1.2rem !important;
    }
    
    /* Cart page button adjustments for very small screens */
    .cart-main .checkout-banner-btn {
        bottom: 5px !important;
        right: 5px !important;
        top: auto !important;
        left: auto !important;
        padding: 8px 12px !important;
        font-size: 1.2rem !important;
    }
    
    html body .cart-main .checkout-banner-btn {
        top: auto !important;
        right: 5px !important;
        bottom: 5px !important;
        left: auto !important;
    }
    
    .cart-page-checkout {
        right: 5px !important;
        bottom: 5px !important;
    }
    
    .cart-return-btn {
        bottom: 19px !important;
        left: 5px !important;
        padding: 8px 12px !important;
        font-size: 1.2rem !important;
    }
    
    .checkout-return-btn {
        bottom: 19px !important;
        left: 5px !important;
        padding: 8px 12px !important;
        font-size: 1.2rem !important;
        min-height: 40px !important; /* Minimum height for small screens */
    }
    
    .checkout-store-btn {
        bottom: 19px !important;
        right: 5px !important;
        padding: 8px 12px !important;
        font-size: 1.2rem !important;
        min-height: 40px !important; /* Minimum height for small screens */
    }
    
    /* Cart page store button small screen positioning */
    .cart-main .checkout-store-btn {
        bottom: 19px !important;
        left: 5px !important;
        right: auto !important;
    }
    
    html body .cart-main .checkout-store-btn {
        bottom: 19px !important;
        left: 5px !important;
        right: auto !important;
    }
    
    .cart-page-store {
        bottom: 19px !important;
        left: 5px !important;
        right: auto !important;
    }
    
    /* Larger store icon for small screens */
    .checkout-store-btn .cart-icon,
    .cart-page-store .cart-icon {
        font-size: 1.2em !important;
    }
}

/* CRITICAL: Force 3x4 grid for 480x360 monitors - highest specificity */
@media (max-width: 480px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
        grid-auto-rows: 1fr !important;
    }
}

/* CRITICAL: Ultra-specific rule for exact 480x360 resolution */
@media (max-width: 480px) and (max-height: 360px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
        grid-auto-rows: 1fr !important;
    }
}

/* CRITICAL: Override any conflicting rules for small screens */
@media (max-width: 500px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
        grid-auto-rows: 1fr !important;
    }
}

/* CRITICAL: Exact viewport targeting for 480x360 */
@media screen and (width: 480px) and (height: 360px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
        grid-auto-rows: 1fr !important;
    }
}

/* CRITICAL: Maximum specificity override */
@media (max-width: 480px) {
    .store-grid .grid-navigation-container .items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
        grid-auto-rows: 1fr !important;
    }
}

@media (max-width: 1400px) {
    .items-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}
@media (max-width: 1100px) {
    .items-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
@media (max-width: 900px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .items-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Remove any padding/margin from grid children */
.items-grid > * {
    margin: 0 !important;
    padding: 0 !important;
}

.item-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    padding: 8px 10px 6px 10px;
    background: none;
    color: #f4f0e8;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    font-weight: 300;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    text-align: left;
    z-index: 6;
    pointer-events: none;
    text-shadow:
        -1px -1px 0 #ffff99,
         1px -1px 0 #ffff99,
        -1px  1px 0 #ffff99,
         1px  1px 0 #ffff99,
         0px  2px 4px rgba(255,255,153,0.18);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

/* Remove old item-info and item-name block styles if not used elsewhere */
/* Only hide item-name in the store grid, not in the item portal table */
.store-grid .item-info, .store-grid .item-name {
    display: none !important;
}

/* Cart button on item */
.cart-btn-form {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 20;
}
.cart-btn {
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    font-size: 1.2rem;
    padding: 0;
}
.cart-btn:hover {
    background: #ffe4ec;
    box-shadow: 0 4px 12px rgba(212,140,166,0.18);
}
.cart-icon {
    font-size: 1.2em;
    color: #d48ca6;
}
/* Cart icon in banner */
.cart-banner-btn {
    position: fixed !important;
    bottom: 24px !important; /* Move to bottom right - 14px higher */
    right: 10px !important;
    top: auto !important;
    left: auto !important;
    z-index: 1000 !important;
    background: #343074 !important; /* Purple */
    color: #f4f0e8 !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    padding: 12px 22px !important;
    border-radius: 32px !important;
    border: 2px solid #000 !important; /* Black border */
    text-decoration: none !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10) !important;
    transition: background 0.2s, color 0.2s, border 0.2s !important;
    cursor: pointer !important;
    letter-spacing: 0.03em !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.cart-banner-btn:hover {
    background: #f0e848 !important; /* Yellow */
    color: #000 !important;
    border-color: #000 !important; /* Keep black border */
}

/* Checkout Button */
.checkout-banner-btn {
    position: fixed !important;
    bottom: 24px !important; /* Move to bottom left - 14px higher */
    left: 10px !important;
    top: auto !important;
    right: auto !important;
    z-index: 1000 !important;
    background: #343074 !important; /* Purple */
    color: #f4f0e8 !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    padding: 12px 22px !important;
    border-radius: 32px !important;
    border: 2px solid #000 !important; /* Black border */
    text-decoration: none !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10) !important;
    transition: background 0.2s, color 0.2s, border 0.2s !important;
    cursor: pointer !important;
    letter-spacing: 0.03em !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.checkout-banner-btn:hover {
    background: #f0e848 !important; /* Yellow */
    color: #000 !important;
    border-color: #000 !important; /* Keep black border */
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    background: transparent;
    color: #f4f0e8;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.cart-table th, .cart-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f4f0e8;
    text-align: center;
    background: rgba(255,255,255,0.85);
    color: #000;
    font-weight: bold;
}
.cart-table th {
    font-size: 1.5rem;
    color: #f4f0e8;
    font-weight: 600;
    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
    background: rgba(255,255,255,0.15);
}
.cart-table td {
    color: #000;
    font-weight: bold;
    background: rgba(255,255,255,0.85);
}
.cart-table .cart-btn {
    background: #000;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 10px 28px;
    border-radius: 32px;
    border: 2px solid #000;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s, border 0.2s;
    cursor: pointer;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    min-width: 120px;
}
.cart-table .cart-btn:hover {
    background: #333;
    color: #f0e848;
    border-color: #333;
}
.cart-empty {
    color: #f4f0e8;
    font-size: 1.1rem;
    margin: 32px 0;
    text-align: center;
}
.cart-continue {
    color: #f0e848;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    display: inline-block;
    margin-top: 24px;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.cart-continue:hover {
    color: #bc306c;
    text-decoration: underline;
}

.cart-return-btn {
    position: fixed;
    bottom: 24px; /* 14px higher from bottom */
    left: 10px; /* Reduced margin from left */
    top: auto;
    right: auto;
    z-index: 1000;
    background: #343074; /* Purple */
    color: #f4f0e8;
    font-size: 1.6rem;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 32px;
    border: 2px solid #000; /* Black border */
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s, border 0.2s;
    cursor: pointer;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Checkout page return to cart button */
.checkout-return-btn {
    position: fixed;
    bottom: 24px; /* Position at bottom left corner - 14px higher */
    left: 10px;
    top: auto;
    right: auto;
    z-index: 1000;
    background: #343074; /* Purple */
    color: #f4f0e8;
    font-size: 1.6rem;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 32px;
    border: 2px solid #000; /* Black border */
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s, border 0.2s;
    cursor: pointer;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px; /* Minimum height to match store button */
    line-height: 1; /* Consistent line height */
}

.checkout-return-btn:hover {
    background: #f0e848; /* Yellow */
    color: #000;
    border-color: #000; /* Keep black border */
}

/* Checkout page go to store button */
.checkout-store-btn {
    position: fixed;
    bottom: 24px; /* Position at bottom right corner - 14px higher */
    right: 10px;
    top: auto;
    left: auto;
    z-index: 1000;
    background: #343074; /* Purple */
    color: #f4f0e8;
    font-size: 1.6rem;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 32px;
    border: 2px solid #000; /* Black border */
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s, border 0.2s;
    cursor: pointer;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px; /* Minimum height to match return button */
    line-height: 1; /* Consistent line height */
}

/* Make store icon larger to match other button sizes */
.checkout-store-btn .cart-icon {
    font-size: 1.4em; /* Larger store icon */
}

.checkout-store-btn:hover {
    background: #f0e848; /* Yellow */
    color: #000;
    border-color: #000; /* Keep black border */
}

/* Cart page specific checkout button positioning */
.cart-main .checkout-banner-btn {
    position: fixed !important;
    bottom: 24px !important; /* 14px higher from bottom */
    right: 10px !important; /* Reduced margin from right */
    top: auto !important;
    left: auto !important;
    z-index: 1000 !important;
}

/* Override store page positioning for cart page */
body .cart-main .checkout-banner-btn {
    top: auto !important;
    right: 10px !important;
    bottom: 24px !important;
    left: auto !important;
}

/* Maximum specificity override for cart page checkout button */
html body .cart-main .checkout-banner-btn {
    top: auto !important;
    right: 10px !important;
    bottom: 24px !important;
    left: auto !important;
    position: fixed !important;
    z-index: 1000 !important;
}

/* Cart page specific checkout button - highest specificity */
.cart-page-checkout {
    position: fixed !important;
    top: auto !important;
    right: 10px !important;
    bottom: 24px !important;
    left: auto !important;
    z-index: 1000 !important;
}

/* Cart page specific store button positioning */
.cart-main .checkout-store-btn {
    position: fixed !important;
    bottom: 24px !important; /* Position at bottom left */
    left: 10px !important; /* Position on left side */
    top: auto !important;
    right: auto !important;
    z-index: 1000 !important;
}

/* Maximum specificity override for cart page store button */
html body .cart-main .checkout-store-btn {
    position: fixed !important;
    bottom: 24px !important;
    left: 10px !important;
    top: auto !important;
    right: auto !important;
    z-index: 1000 !important;
}

/* Cart page specific store button - highest specificity */
.cart-page-store {
    position: fixed !important;
    bottom: 24px !important;
    left: 10px !important;
    top: auto !important;
    right: auto !important;
    z-index: 1000 !important;
}

/* Make store icon larger on cart page to match other button sizes */
.cart-page-store .cart-icon {
    font-size: 1.4em !important; /* Larger store icon */
}

.cart-btn.in-cart {
    background: #30845c !important;
    color: #f4f0e8 !important;
    border: 2px solid #f0e848 !important;
}

.cart-table tr:nth-child(even) td {
    background: rgba(255,255,255,0.65);
}
.cart-table tr:nth-child(odd) td {
    background: rgba(240,240,240,0.45);
}

/* Checkout form styling to match cart table */
.checkout-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    background: transparent;
    color: #f4f0e8;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Add bottom margin to checkout form to clear navigation buttons */
.cart-main .checkout-form {
    margin-bottom: 100px;
}

.checkout-table th, .checkout-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f4f0e8;
    text-align: left;
    background: rgba(255,255,255,0.85);
    color: #000;
    font-weight: bold;
}

.checkout-table th {
    font-size: 1.5rem;
    color: #f4f0e8;
    font-weight: 600;
    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
    background: rgba(255,255,255,0.15);
    text-align: center;
}

.checkout-table td {
    color: #000;
    font-weight: bold;
    background: rgba(255,255,255,0.85);
}

.checkout-table td:first-child {
    font-weight: 600;
    color: #000;
    background: rgba(255,255,255,0.9);
    width: 30%;
}

/* Style for the total price row */
.checkout-table .summary-row td {
    padding: 18px 8px; /* Match the height of rows with form fields */
    vertical-align: middle;
}

.checkout-table .summary-row td:last-child {
    color: #000;
    font-family: Georgia, serif;
    font-size: 1.2rem;
}

.checkout-table input[type="text"],
.checkout-table input[type="email"],
.checkout-table select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    color: #000;
    transition: border-color 0.2s;
}

.checkout-table input[type="text"]:focus,
.checkout-table input[type="email"]:focus,
.checkout-table select:focus {
    outline: none;
    border-color: #30845c;
    box-shadow: 0 0 5px rgba(48, 132, 92, 0.3);
}

.checkout-table .field-error {
    color: #c44448;
    font-size: 0.9rem;
    margin-top: 4px;
    font-weight: normal;
}

.cart-checkout-btn {
    background: #343074; /* Purple */
    color: #f4f0e8;
    font-size: 1.6rem;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 32px;
    border: 2px solid #000; /* Black border */
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s, border 0.2s;
    cursor: pointer;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    min-width: 200px;
    margin: 0 auto;
}

.cart-checkout-btn:hover {
    background: #f0e848; /* Yellow */
    color: #000;
    border-color: #000; /* Keep black border */
}

/* Responsive styling for checkout table */
@media (max-width: 600px) {
    .checkout-table th, .checkout-table td {
        padding: 8px 6px;
        font-size: 0.9rem;
    }
    
    .checkout-table th {
        font-size: 1.2rem;
    }
    
    .checkout-table input[type="text"],
    .checkout-table input[type="email"],
    .checkout-table select {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
    
    .cart-checkout-btn {
        font-size: 1.4rem;
        padding: 10px 24px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .checkout-table th, .checkout-table td {
        padding: 6px 4px;
        font-size: 0.8rem;
    }
    
    .checkout-table th {
        font-size: 1.1rem;
    }
    
    .checkout-table input[type="text"],
    .checkout-table input[type="email"],
    .checkout-table select {
        padding: 4px 6px;
        font-size: 0.8rem;
    }
    
    .cart-checkout-btn {
        font-size: 1.2rem;
        padding: 8px 20px;
        min-width: 160px;
    }
}

/* Authentication Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.auth-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    color: #333;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #343074;
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #343074;
    box-shadow: 0 0 8px rgba(52, 48, 116, 0.3);
}

.auth-btn {
    width: 100%;
    background: #343074;
    color: #f4f0e8;
    border: 2px solid #000;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.auth-btn:hover {
    background: #f0e848;
    color: #000;
    transform: scale(1.02);
}

.auth-links {
    text-align: center;
    margin-top: 25px;
}

.auth-links a {
    color: #343074;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #f0e848;
}

.messages {
    margin-bottom: 20px;
}

.message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: bold;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.error {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
}

.profile-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
}

.profile-info p {
    margin: 8px 0;
    color: #333;
}

/* Responsive design for auth forms */
@media (max-width: 600px) {
    .auth-form {
        padding: 25px;
        margin: 10px;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }
} 

.login-btn {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 1001;
    background: #343074;
    color: #f4f0e8;
    border: 2px solid #000;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, color 0.2s, border 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}

.login-btn:hover {
    background: #f0e848;
    color: #000;
    border-color: #000;
    transform: scale(1.04);
}

.login-btn .cart-icon {
    font-size: 1.2em;
}

.login-text {
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .login-btn {
        padding: 8px 12px;
        font-size: 0.95rem;
        top: 8px;
        left: 8px;
    }
    .login-btn .cart-icon {
        font-size: 1em;
    }
} 

.login-btn, .login-btn * {
    font-family: 'Orbitron', Arial, Helvetica, sans-serif !important;
}

.store-home-btn {
    top: 18px;
    left: calc(18px + 200px);
}

@media (max-width: 600px) {
    .store-home-btn {
        left: calc(8px + 150px);
        top: 8px;
    }
}

.staff-btn, .staff-btn * {
    font-family: 'Orbitron', Arial, Helvetica, sans-serif !important;
} 

.save-info-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1001;
}
.save-info-label {
    cursor: pointer;
}
.save-info-btn {
    background: #343074;
    color: #f4f0e8;
    border: 2px solid #000;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background 0.2s, color 0.2s, border 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}
.save-info-custom-checkbox {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border: 2px solid #000;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}
.save-info-check {
    display: none;
    font-size: 1.2em;
    color: #343074;
    line-height: 1;
}
.save-info-label input[type="checkbox"] {
    display: none;
}
.save-info-label input[type="checkbox"]:checked + .save-info-btn .save-info-custom-checkbox {
    background: #f0e848;
    border-color: #000;
}
.save-info-label input[type="checkbox"]:checked + .save-info-btn .save-info-check {
    display: block;
}
.save-info-label input[type="checkbox"]:checked + .save-info-btn {
    background: #f0e848;
    color: #000;
    border-color: #000;
    transform: scale(1.04);
}
@media (max-width: 600px) {
    .save-info-container {
        top: 8px;
        right: 8px;
    }
    .save-info-btn {
        padding: 8px 12px;
        font-size: 0.95rem;
    }
} 

/* Item Modal Styles */
.item-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    width: 1200px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.modal-body {
    display: flex;
    height: 100%;
    max-height: 90vh;
}

.modal-image-section {
    flex: 1;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-width: 0;
}

.modal-image-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.modal-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.modal-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-carousel-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev-btn {
    left: 10px;
}

.modal-next-btn {
    right: 10px;
}

.modal-image-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    max-width: 100%;
}

.modal-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modal-thumbnail:hover {
    border-color: rgba(102, 126, 234, 0.6);
    transform: scale(1.05);
}

.modal-thumbnail.active {
    border-color: rgba(102, 126, 234, 1);
    transform: scale(1.1);
}

.modal-info-section {
    flex: 1;
    padding: 40px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 300px;
    max-width: 400px;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #30845c;
    margin-bottom: 20px;
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}

.modal-item-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}

.modal-size {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}

.modal-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    flex-grow: 1;
}

.modal-cart-form {
    margin-top: auto;
}

.modal-cart-btn {
    width: 100%;
    padding: 15px 20px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}

.modal-cart-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.modal-cart-btn.in-cart {
    background: #30845c;
}

.modal-cart-btn.in-cart:hover {
    background: #2a7a52;
}

.modal-cart-btn .cart-icon {
    font-size: 1.2rem;
}

.modal-cart-btn .cart-text {
    font-size: 1.1rem;
}

/* Responsive Modal Design */
@media (max-width: 1024px) {
    .modal-content {
        width: 95vw;
        max-height: 95vh;
    }
    
    .modal-body {
        flex-direction: column;
        max-height: 95vh;
    }
    
    .modal-image-section {
        flex: none;
        height: 50vh;
        min-height: 300px;
    }
    
    .modal-info-section {
        flex: none;
        max-width: none;
        padding: 20px;
    }
    
    .modal-price {
        font-size: 2rem;
    }
    
    .modal-item-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 98vw;
        height: 98vh;
        max-height: 98vh;
    }
    
    .modal-body {
        height: 98vh;
    }
    
    .modal-image-section {
        height: 40vh;
        min-height: 250px;
        padding: 10px;
    }
    
    .modal-image-carousel {
        height: 300px;
        margin-bottom: 10px;
    }
    
    .modal-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .modal-info-section {
        padding: 15px;
        height: 60vh;
        overflow-y: auto;
    }
    
    .modal-price {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .modal-item-name {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .modal-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .modal-cart-btn {
        padding: 12px 16px;
        font-size: 1.1rem;
    }
    
    .modal-thumbnail {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .modal-image-section {
        height: 35vh;
        min-height: 200px;
    }
    
    .modal-image-carousel {
        height: 250px;
    }
    
    .modal-info-section {
        height: 65vh;
        padding: 12px;
    }
    
    .modal-price {
        font-size: 1.6rem;
    }
    
    .modal-item-name {
        font-size: 1.2rem;
    }
    
    .modal-description {
        font-size: 0.95rem;
    }
    
    .modal-cart-btn {
        padding: 10px 14px;
        font-size: 1rem;
    }
    
    .modal-thumbnail {
        width: 50px;
        height: 50px;
    }
} 

/* Checkout Cancel Page Styles */
.cancel-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
}

.cancel-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cancel-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.cancel-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #c44448;
    margin-bottom: 20px;
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}

.cancel-message {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
}

.cancel-submessage {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.4;
}

.cancel-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.cancel-actions .grid-nav-btn {
    width: auto;
    min-width: 200px;
    height: auto;
    min-height: 80px;
    padding: 20px 30px;
    border-radius: 8px;
}

/* Responsive Design for Cancel Page */
@media (max-width: 768px) {
    .cancel-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .cancel-title {
        font-size: 2rem;
    }
    
    .cancel-message {
        font-size: 1.1rem;
    }
    
    .cancel-actions {
        align-items: center;
    }
    
    .cancel-actions .grid-nav-btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .cancel-container {
        padding: 25px 15px;
    }
    
    .cancel-title {
        font-size: 1.8rem;
    }
    
    .cancel-message {
        font-size: 1rem;
    }
    
    .cancel-submessage {
        font-size: 0.9rem;
    }
    
    .cancel-actions .grid-nav-btn {
        font-size: 1rem;
        padding: 15px 20px;
    }
} 

/* Order Button Styling */
.btn.btn-outline-purple {
    color: #6f42c1 !important;
    border-color: #6f42c1 !important;
    background-color: transparent !important;
}

.btn.btn-outline-purple:hover,
.btn.btn-outline-purple:focus {
    color: #fff !important;
    background-color: #6f42c1 !important;
    border-color: #6f42c1 !important;
}

.text-purple {
    color: #6f42c1 !important;
}

/* Order Modal Styling */
.order-modal {
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.order-modal-content {
    background: rgba(0, 0, 0, 0.95);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.order-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.order-modal-header h3 {
    color: #f4f0e8;
    margin: 0;
    font-size: 1.5rem;
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}

.order-modal-close {
    color: #f4f0e8;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.order-modal-close:hover {
    color: #6f42c1;
}

.order-modal-body {
    padding: 20px 30px;
}

.order-modal-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.order-modal-footer .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-purple {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: #fff;
}

.btn-purple:hover {
    background-color: #5a32a3;
    border-color: #5a32a3;
    color: #fff;
}

.selected-items-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.selected-item {
    padding: 5px 10px;
    margin: 2px 0;
    background: rgba(111, 66, 193, 0.2);
    border-radius: 4px;
    color: #f4f0e8;
    font-size: 0.9rem;
}

/* Spinning icon for loading states */
.spin {
    animation: spin 1s linear infinite;
}

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

.direct-links-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.direct-links-section h3 {
    color: #f4f0e8;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}

.direct-links-section a {
    color: #30845c;
    text-decoration: none;
    display: block;
    padding: 8px 0;
    font-size: 0.9rem;
    word-break: break-all;
    transition: color 0.3s ease;
}

.direct-links-section a:hover {
    color: #2a6b4a;
    text-decoration: underline;
}

/* Staff Button Styles */
.staff-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1001;
    background: #343074;
    color: #f4f0e8;
    border: 2px solid #000;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, color 0.2s, border 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
}

/* Position multiple staff buttons */
.staff-btn:hover {
    background: #f0e848;
    color: #000;
    border-color: #000;
    transform: scale(1.04);
}

.staff-btn .cart-icon {
    font-size: 1.2em;
}

.staff-text {
    font-family: 'Orbitron', Arial, Helvetica, sans-serif;
    letter-spacing: 1px;
}

.past-orders-btn {
    right: 230px;
}

@media (max-width: 600px) {
    .auth-form {
        padding: 20px;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .staff-btn {
        padding: 8px 12px;
        font-size: 0.95rem;
        top: 8px;
        right: 8px;
    }
    .staff-btn .cart-icon {
        font-size: 1em;
    }
    
    .past-orders-btn {
        top: 60px;
        right: 8px;
    }
}

/* Bulk Inventory Management Modal Styles */
#bulkInventoryModal .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
    margin: 0.5rem auto;
}

#bulkInventoryModal .modal-content {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#bulkInventoryModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

#bulkInventoryModal .modal-title {
    font-weight: 600;
    color: white;
}

#bulkInventoryModal .modal-body {
    padding: 1.5rem;
}

#bulkInventoryModal .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

#bulkInventoryModal .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#bulkInventoryModal .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#bulkInventoryModal .form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

#bulkInventoryModal .alert-info {
    background-color: #e3f2fd;
    border-color: #90caf9;
    color: #1565c0;
    border-radius: 8px;
    padding: 1rem;
}

#bulkInventoryModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

#bulkInventoryModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}

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

#bulkInventoryModal .btn-secondary {
    background: #6c757d;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

#bulkInventoryModal .btn-secondary:hover {
    background: #5a6268;
}

/* Dropdown menu enhancements for inventory management */
.dropdown-menu .dropdown-divider {
    margin: 0.5rem 0;
    border-color: #dee2e6;
}

.dropdown-menu .dropdown-header {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
    color: #495057;
    transition: all 0.2s ease;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
    transform: translateX(2px);
}

/* Responsive design for inventory modal */
@media (max-width: 768px) {
    #bulkInventoryModal .modal-dialog {
        margin: 1rem;
    }
    
    #bulkInventoryModal .modal-body {
        padding: 1rem;
    }
    
    #bulkInventoryModal .modal-footer {
        padding: 1rem;
    }
    
    #bulkInventoryModal .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #bulkInventoryModal .modal-title {
        font-size: 1.1rem;
    }
    
    #bulkInventoryModal .form-control {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    #bulkInventoryModal .alert-info {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Category Management Styles */
.category-management {
    margin-top: 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    position: static !important;
    width: 100%;
    min-height: 100%;
}

/* Let Bootstrap handle all tab visibility naturally */

/* Ensure tab content container has proper positioning */
#itemPortalTabContent {
    position: relative !important;
    overflow: visible !important;
}

/* Ensure hidden tabs don't take up space */
.tab-pane {
    display: none;
}

.tab-pane.show.active {
    display: block !important;
}

/* Clean slate - no special CSS for Edit Fields tab */

.category-management h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.category-list h5 {
    color: #333;
    margin-bottom: 1rem;
}

.category-list {
    margin-top: 2rem;
}

.hierarchical-categories {
    max-height: 600px;
    overflow-y: auto;
}

.category-tree-item {
    margin-bottom: 0.5rem;
}

.category-tree-node {
    margin-bottom: 0.5rem;
}

.category-tree-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.category-tree-content:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.category-tree-content.drag-over {
    border: 2px dashed #007bff;
    background: rgba(0, 123, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}

.category-tree-content.drag-over::before {
    content: "📷 Drop image here to update category image";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
}

.category-tree-info {
    flex: 1;
    margin-right: 1rem;
}

.category-tree-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-image-container {
    position: relative;
    display: inline-block;
}

.category-image {
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.category-image:hover {
    transform: scale(1.05);
}

.category-image:hover .image-overlay {
    opacity: 1;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.edit-icon {
    color: white;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.drag-drop-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.category-image.drag-over {
    border: 2px dashed #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.category-tree-name {
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-indent {
    color: #6c757d;
    font-weight: normal;
    color: #6c757d;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.category-item-count {
    font-weight: normal;
    color: #6c757d;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.category-tree-description {
    font-size: 0.875rem;
    color: #000;
    margin-bottom: 0.25rem;
}

.category-tree-actions {
    display: flex;
    gap: 0.5rem;
}

.category-tree-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.category-tree-children {
    margin-left: 2rem;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid #e9ecef;
}

.category-tree-children .category-tree-content {
    background: #fafbfc;
}

.category-tree-children .category-tree-content:hover {
    background: #f1f3f4;
}

/* Level-specific styling */
.category-tree-node.level-0 .category-tree-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.category-tree-node.level-0 .category-tree-content:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.category-tree-node.level-0 .category-tree-name,
.category-tree-node.level-0 .category-item-count {
    color: white;
}

.category-tree-node.level-1 .category-tree-content {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    color: white;
    border-color: #764ba2;
}

.category-tree-node.level-1 .category-tree-content:hover {
    background: linear-gradient(135deg, #6a4190 0%, #e085e8 100%);
}

.category-tree-node.level-1 .category-tree-name,
.category-tree-node.level-1 .category-item-count {
    color: white;
}

.category-tree-node.level-2 .category-tree-content {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: #f093fb;
}

.category-tree-node.level-2 .category-tree-content:hover {
    background: linear-gradient(135deg, #e085e8 0%, #e04a5f 100%);
}

.category-tree-node.level-2 .category-tree-name,
.category-tree-node.level-2 .category-item-count {
    color: white;
}

.category-tree-node.level-3 .category-tree-content {
    background: linear-gradient(135deg, #f5576c 0%, #ff9a9e 100%);
    color: white;
    border-color: #f5576c;
}

.category-tree-node.level-3 .category-tree-content:hover {
    background: linear-gradient(135deg, #e04a5f 0%, #ff8a8e 100%);
}

.category-tree-node.level-3 .category-tree-name,
.category-tree-node.level-3 .category-item-count {
    color: white;
}

/* Category Image Modal Styles */
.category-image-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.category-image-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

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

.category-image-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.category-image-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    line-height: 1;
}

.category-image-modal-close:hover {
    color: #333;
}

.category-image-modal-body {
    margin-bottom: 1.5rem;
}

.category-image-preview {
    text-align: center;
    margin-bottom: 1.5rem;
}

.category-image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-image-upload {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-image-upload:hover {
    border-color: #007bff;
    background: #e7f3ff;
}

.category-image-upload.drag-over {
    border-color: #007bff;
    background: #e7f3ff;
}

.category-image-upload input[type="file"] {
    display: none;
}

.category-image-upload-text {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.category-image-upload-icon {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.category-image-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Category Edit Modal Styles */
.category-edit-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.category-edit-modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

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

.category-edit-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.category-edit-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    line-height: 1;
}

.category-edit-modal-close:hover {
    color: #333;
}

.category-edit-modal-body {
    margin-bottom: 1.5rem;
}

.category-edit-modal-body .form-group {
    margin-bottom: 1.5rem;
}

.category-edit-modal-body .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.category-edit-modal-body .form-control {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
}

.category-edit-modal-body .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.category-edit-image-section {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.category-edit-image-preview {
    flex-shrink: 0;
    text-align: center;
}

.category-edit-image-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-edit-image-upload {
    flex: 1;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.category-edit-image-upload:hover {
    border-color: #007bff;
    background: #e7f3ff;
}

.category-edit-image-upload.drag-over {
    border-color: #007bff;
    background: #e7f3ff;
}

.category-edit-image-upload input[type="file"] {
    display: none;
}

.category-edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Responsive Design for Category Edit Modal */
@media (max-width: 768px) {
    .category-edit-modal-content {
        margin: 5% auto;
        padding: 1.5rem;
        width: 95%;
    }
    
    .category-edit-image-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .category-edit-image-preview img {
        max-width: 120px;
        max-height: 120px;
    }
    
    .category-edit-image-upload {
        min-height: 120px;
        padding: 1rem;
    }
}

/* Filter and Sort Controls */
.filter-sort-controls {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.filter-sort-controls .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.filter-sort-controls .form-control {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.filter-sort-controls .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-sort-controls .btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.filter-sort-controls .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

#filterResults {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Table Enhancements for Filtering */
#itemsTable {
    border-collapse: separate;
    border-spacing: 0;
}

#itemsTable thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #333;
    padding: 1rem 0.75rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

#itemsTable tbody tr {
    transition: all 0.2s ease;
}

#itemsTable tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#itemsTable tbody tr[style*="display: none"] {
    display: none !important;
}

/* Ensure text in Item Portal table is black for visibility */
#itemsTable .item-name,
#itemsTable .item-price,
#itemsTable td {
    color: #333 !important;
}

#itemsTable .item-name strong {
    color: #333 !important;
}

#itemsTable .item-name small {
    color: #6c757d !important;
}

/* Responsive Design for Filter Controls */
@media (max-width: 768px) {
    .filter-sort-controls .row > div {
        margin-bottom: 1rem;
    }
    
    .filter-sort-controls .row > div:last-child {
        margin-bottom: 0;
    }
    
    #filterResults {
        display: block;
        margin-top: 0.5rem;
        margin-left: 0 !important;
    }
}

/* Nested Category Widget Styles */
.nested-categories-widget {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background: #f8f9fa;
    max-height: 300px;
    overflow-y: auto;
}

.nested-category-item {
    margin-bottom: 0.5rem;
}

.nested-category-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.nested-category-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.nested-category-checkbox {
    margin: 0;
    cursor: pointer;
}

.nested-category-indent {
    color: #6c757d;
    font-weight: bold;
}

.nested-category-name {
    font-weight: 500;
    color: #333;
}

.nested-category-toggle {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.nested-category-toggle:hover {
    background-color: #e9ecef;
    color: #333;
}

.nested-category-toggle.collapsed .nested-toggle-icon {
    transform: rotate(-90deg);
}

.nested-toggle-icon {
    transition: transform 0.2s ease;
    display: inline-block;
}

.nested-category-children {
    margin-left: 1rem;
    border-left: 2px solid #e9ecef;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.nested-category-children .nested-category-item:last-child {
    margin-bottom: 0;
}

/* Level-specific styling */
.nested-category-item.level-0 {
    border-left: 3px solid #007bff;
}

.nested-category-item.level-1 {
    border-left: 3px solid #28a745;
}

.nested-category-item.level-2 {
    border-left: 3px solid #ffc107;
}

.nested-category-item.level-3 {
    border-left: 3px solid #dc3545;
}

/* Simplified and more direct hover effects for nested categories */
.nested-categories-widget .nested-category-row {
    transition: background-color 0.2s ease;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem 0;
}

.nested-categories-widget .nested-category-row:hover {
    background-color: #e7f3ff !important;
}

/* Ensure the label covers the full width */
.nested-categories-widget .nested-category-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex: 1;
    margin: 0;
    padding: 0.25rem 0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: 100%;
}

.nested-categories-widget .nested-category-label:hover {
    background-color: #e7f3ff !important;
}

/* Ensure text remains visible on hover */
.nested-categories-widget .nested-category-row:hover .nested-category-name,
.nested-categories-widget .nested-category-row:hover .nested-category-indent {
    color: #333 !important;
}

/* Remove any conflicting hover effects */
.nested-categories-widget .nested-category-item:hover .nested-category-row {
    background-color: transparent !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .nested-categories-widget {
        max-height: 250px;
        padding: 0.75rem;
    }
    
    .nested-category-children {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }
    
    .nested-category-row {
        gap: 0.25rem;
    }
}

/* Checkbox styling */
.nested-category-checkbox:checked + .nested-category-indent + .nested-category-name {
    font-weight: 600;
    color: #007bff;
}

/* Featured Categories Section */
.featured-categories {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.featured-categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.featured-categories-header {
    text-align: center;
    margin-bottom: 2rem;
}

.featured-categories-header h2 {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    font-family: 'Orbitron', monospace;
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    animation: wave 3s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-3px) rotate(-1deg);
    }
}

.featured-categories-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.featured-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    max-width: 150px;
    text-decoration: none;
    color: inherit;
}

.featured-category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.featured-category-item.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.featured-category-item.active:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.featured-category-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.featured-category-item:hover .featured-category-image {
    border-color: #007bff;
}

.featured-category-item.active .featured-category-image {
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.featured-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-category-item:hover .featured-category-image img {
    transform: scale(1.1);
}

.featured-category-name {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    transition: color 0.3s ease;
    color: black; /* Black for unselected categories */
}

.featured-category-item.active .featured-category-name {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive design for featured categories */
@media (max-width: 768px) {
    .featured-categories {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .featured-categories-header h2 {
        font-size: 1.5rem;
    }
    
    .featured-categories-grid {
        gap: 1rem;
    }
    
    .featured-category-item {
        min-width: 100px;
        max-width: 120px;
        padding: 0.75rem;
    }
    
    .featured-category-image {
        width: 60px;
        height: 60px;
        margin-bottom: 0.5rem;
    }
    
    .featured-category-name {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .featured-categories-grid {
        gap: 0.75rem;
    }
    
    .featured-category-item {
        min-width: 80px;
        max-width: 100px;
        padding: 0.5rem;
    }
    
    .featured-category-image {
        width: 50px;
        height: 50px;
        margin-bottom: 0.4rem;
    }
    
    .featured-category-name {
        font-size: 0.75rem;
    }
}
/* Item ID field styling */
#id_id {
    font-family: monospace;
    letter-spacing: 1px;
}

#id_id::placeholder {
    color: #6c757d;
    font-style: italic;
    opacity: 1;
}

#id_id:focus::placeholder {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#id_id:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#id_id:valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Show deleted checkbox styling */
.form-check-input:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

.form-check-label {
    font-weight: 500;
    color: #dc3545;
}

/* Deleted items styling */
.deleted-item {
    opacity: 0.6;
    background-color: #f8f9fa !important;
}

.deleted-item td {
    text-decoration: line-through;
    color: #6c757d;
}

.deleted-item .btn {
    opacity: 0.8;
}

/* Show deleted checkbox styling */
#showDeletedCheckbox {
    margin-right: 8px;
}

#showDeletedCheckbox:checked + label {
    font-weight: bold;
    color: #dc3545;
}

/* Store Filtering Styles */
.store-filters {
    background: transparent;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.filter-row {
    margin-bottom: 1.5rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

/* Category Search Row */
.category-search-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-search-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    flex: 1 1 320px;
}

.category-search-animation {
    position: absolute;
    top: -16px;
    left: -46px;
    width: 64px;
    transform: rotate(-14deg);
    transform-origin: bottom left;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.25));
}

.category-search-animation img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .category-search-animation {
        top: -14px;
        left: -34px;
        width: 48px;
        transform: rotate(-12deg);
    }
}

@media (max-width: 480px) {
    .category-search-animation {
        top: -12px;
        left: -24px;
        width: 40px;
        transform: rotate(-10deg);
    }
}

.category-search-input {
    width: 100%;
    padding: 12px 40px 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.category-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #c82333;
    transform: translateY(-50%) scale(1.1);
}

.clear-category-btn {
    padding: 12px 22px;
    background: #0e00ff;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 14px rgba(102, 126, 234, 0.25);
    flex-shrink: 0;
    white-space: nowrap;
}

.clear-category-btn:hover {
    background: #0b00d1;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(85, 99, 214, 0.3);
}

.clear-category-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(14, 0, 255, 0.2);
}

@media (max-width: 576px) {
    .category-search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .clear-category-btn {
        width: 100%;
    }
}

/* Category Icons Row */
.category-icons-row {
    overflow: hidden;
}

.category-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.category-scroll-btn {
    background: rgba(102, 126, 234, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.category-scroll-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: scale(1.1);
}

.category-icons-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    flex: 1;
    padding: 10px 0;
}

.category-icons-container::-webkit-scrollbar {
    height: 6px;
}

.category-icons-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.category-icons-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.category-icon-item {
    min-width: 100px;
    max-width: 100px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.category-icon-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.category-icon-item.selected,
.category-icon-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.category-icon-image {
    width: 70px;
    height: 70px;
    margin: 0 auto 8px;
    border-radius: 0;
    overflow: hidden;
    border: none;
    transition: all 0.3s ease;
}

.category-icon-item.selected .category-icon-image,
.category-icon-item.active .category-icon-image {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.category-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-icon-name {
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
}

.category-icon-item.selected .category-icon-name,
.category-icon-item.active .category-icon-name {
    color: white;
}

.category-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}

.category-icon-item.selected .category-remove-btn {
    display: flex;
}

.category-remove-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.35);
}

/* Attribute Filters Row */
.attribute-filters-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.attribute-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 100%;
}

.filter-dropdown {
    min-width: 150px;
    position: relative;
}

.filter-dropdown select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.filter-dropdown select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-dropdown label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.25);
}

.filter-dropdown.sort-dropdown label {
    color: #000;
    background: #fff;
    border-color: #000;
}

/* Clear All Filters Button */
.clear-all-filters-btn {
    padding: 10px 20px;
    background: #ff0007;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 0 0 auto;
}

.clear-all-filters-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.clear-all-filters-btn:active {
    transform: translateY(0);
}

/* Sort By Row */
.sort-by-row {
    text-align: center;
}

.sort-by-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sort-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.sort-select {
    padding: 8px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.sort-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Loading Indicator */
.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    margin-bottom: 2rem;
}

.loading-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-indicator p {
    margin-top: 1rem;
    color: #667eea;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .store-filters {
        padding: 1rem;
    }
    
    .category-icon-item {
        min-width: 80px;
        max-width: 80px;
    }
    
    .category-icon-image {
        width: 50px;
        height: 50px;
    }
    
    .category-icon-name {
        font-size: 0.75rem;
    }
    
    .attribute-filters-container {
        gap: 10px;
    }
    
    .filter-dropdown {
        min-width: 120px;
    }
    
    .sort-by-container {
        flex-direction: column;
        padding: 10px 15px;
    }
}
