/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #ffffff;
    --secondary-bg: #fafafa;
    --sidebar-bg: #ffffff;
    --border-color: #e0e0e0;
    --text-primary: #000000;
    --text-secondary: #666666;
    --accent-color: #000000;
    --hover-bg: #f5f5f5;
    --selected-bg: #000000;
    --selected-text: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Top Navigation */
.top-nav {
    background: var(--primary-bg);
    background-image: url('G6XafJXWkAAHouk.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 80px;
}

.top-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.nav-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.vendor-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
}

.vendor-link:hover .site-title {
    text-decoration: underline;
}

.site-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.site-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

.site-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 13px;
    color: #f0f0f0;
    white-space: nowrap;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.5);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 600px;
    position: relative;
    z-index: 2;
}

/* Clock Widget */
.clock-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    background: #ffffff;
    backdrop-filter: blur(12px);
    border: 3px solid #000000;
    border-radius: 8px;
    min-width: 110px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.clock-widget.trading-open {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.6), 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.clock-widget.trading-closed {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.6), 0 0 0 2px rgba(239, 68, 68, 0.3);
}

.clock-time {
    font-size: 16px;
    font-weight: 800;
    color: #000000;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.clock-widget.trading-open .clock-time {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.clock-widget.trading-closed .clock-time {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.clock-status {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 3px;
    color: #333333;
}

.clock-widget.trading-open .clock-status {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.clock-widget.trading-closed .clock-status {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.store-hours {
    font-size: 10px;
    font-weight: 700;
    color: #333333;
    margin-top: 4px;
    text-align: center;
    letter-spacing: 0.5px;
}

.clock-widget.trading-open .store-hours {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.clock-widget.trading-closed .store-hours {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.search-input {
    flex: 1;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.15s;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-input:focus {
    outline: none;
    border-color: #000000;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.trade-btn {
    padding: 8px 18px;
    background: #000000;
    color: #ffffff;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.trade-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}



/* Disclaimer */
.disclaimer {
    margin-top: 40px;
    padding: 18px 24px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
}

.disclaimer-top {
    margin-top: 0;
    margin-bottom: 28px;
}

.disclaimer p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.last-updated-time {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 8px !important;
}

/* Main Layout */
.main-content-wrapper {
    max-width: 1920px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    padding: 32px 48px;
    max-width: 100%;
}

.content-header {
    margin-bottom: 28px;
}

.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.stats-inline {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stats-inline span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Category Selector */
.category-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selector-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-select {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--secondary-bg);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.category-select:hover {
    border-color: var(--text-secondary);
}

.category-select:focus {
    outline: none;
    border-color: var(--text-primary);
    background: var(--primary-bg);
}

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

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

.breadcrumb-separator {
    color: var(--text-secondary);
}

.content-body {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 600px;
    overflow: hidden;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Items Table */
.items-table {
    width: 100%;
    overflow-x: auto;
}

.items-table table {
    width: 100%;
    border-collapse: collapse;
}

.items-table thead {
    background: var(--secondary-bg);
    border-bottom: 2px solid var(--text-primary);
}

.items-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.items-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.items-table th.sortable:hover {
    color: var(--text-primary);
}

.sort-icon {
    font-size: 10px;
    opacity: 0.5;
    margin-left: 4px;
}

.items-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.items-table tbody tr:hover {
    background: var(--hover-bg);
}

/* Category Header Rows */
.items-table tbody tr.category-header-row {
    background: var(--secondary-bg);
    border-bottom: 2px solid var(--border-color);
    border-top: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.items-table tbody tr.category-header-row:hover {
    background: var(--secondary-bg);
}

.items-table tbody tr.category-header-row.category-highlight {
    background: var(--selected-bg);
    animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
    0% {
        background: var(--selected-bg);
    }
    50% {
        background: rgba(0, 0, 0, 0.1);
    }
    100% {
        background: var(--secondary-bg);
    }
}

.category-header {
    padding: 16px 24px !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.category-name {
    color: var(--text-primary);
}

.category-count {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
    margin-left: 8px;
    text-transform: none;
    letter-spacing: 0;
}

.items-table td {
    padding: 20px 24px;
    font-size: 16px;
}

.item-cell {
    display: flex;
    align-items: center;
    gap: 16px;
}

.item-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-icon img {
    max-width: 56px;
    max-height: 56px;
    object-fit: contain;
}

.item-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 16px;
}

.price-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 18px;
}

/* Loading */
.loading, .loading-small {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.loading-small {
    padding: 20px;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 16px 20px;
    }

    .header-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .cart-modal {
        right: 10px;
        left: 10px;
        width: auto;
    }
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .nav-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .subtitle {
        border-left: none;
        padding-left: 0;
    }

    .nav-right {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .clock-widget {
        order: -1;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 12px;
    }

    .clock-time {
        font-size: 13px;
    }

    .clock-status {
        font-size: 9px;
    }

    .site-title {
        font-size: 14px;
    }

    .sidebar {
        padding: 16px;
    }

    .sidebar-header h2 {
        font-size: 20px;
    }

    .main-content {
        padding: 16px;
    }

    .items-table {
        font-size: 13px;
    }

    .items-table th,
    .items-table td {
        padding: 12px 16px;
    }

    .item-icon {
        width: 40px;
        height: 40px;
    }

    .item-icon img {
        max-width: 32px;
        max-height: 32px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 12px 16px;
    }

    .sidebar {
        padding: 12px;
    }

    .main-content {
        padding: 16px 16px;
    }

    .disclaimer {
        padding: 14px 16px;
        margin-top: 24px;
    }

    .disclaimer-top {
        margin-bottom: 16px;
    }

    .content-header {
        margin-bottom: 16px;
    }

    .content-body {
        border-radius: 6px;
    }

    .items-table th,
    .items-table td {
        padding: 14px 12px;
    }

    .category-select {
        padding: 10px 14px;
    }

    .clock-widget {
        min-width: auto;
        padding: 6px 10px;
    }

    .clock-time {
        font-size: 12px;
    }

    .clock-status {
        font-size: 8px;
    }

    .stats-boxes {
        gap: 8px;
    }

    .stat-box {
        padding: 12px;
    }

    .stat-number {
        font-size: 24px;
    }
}
