:root {
    --bg-dark: #212121;
    --bg-light: #333333;
    --card-color: #424242;
    --text-light: #f5f5f5;
    --text-dark: #bdbdbd;
    --accent-red: #e53935;
    --font-family: 'Vazirmatn', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-family);
    min-height: 100vh;
}

.main-header {
    position: relative;
    height: 30vh;
    width: 100%;
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('/static/media/background.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.logo-container {
    text-align: center;
}

.logo {
    width: 200px;
    height: 200px;
}

.menu-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    background: white;
    height: 3px;
    width: 30px;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger::before {
    transform: translateY(-10px);
}

.hamburger::after {
    transform: translateY(7px);
}

/* --- Category Navigation (Scrollbar) --- */
.category-nav {
    position: relative;
    /* Crucial for positioning the arrow button */
    padding: 20px 50px;
}

.category-scroll-container {
    display: flex;
    gap: 15px;
    padding: 10px;
    overflow-x: scroll;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.category-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, and Opera */
}

.category-card {
    background-color: var(--card-color);
    border-radius: 15px;
    padding: 15px;
    min-width: 110px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    border: 1px solid transparent;
}

.category-card.active {
    background-color: #5a5a5a;
    border-color: #777;
}

.category-card:hover {
    background-color: #505050;
}

.category-card img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.category-card p {
    font-size: 1rem;
    font-weight: bold;
}

.new-badge {
    position: absolute;
    top: -5px;
    left: -10px;
    background-color: var(--accent-red);
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(66, 66, 66, 0.9);
    border: 1px solid #5e5e5e;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#scroll-left-btn {
    left: 5px;
}


/* --- Items Section --- */
.items-section {
    padding: 20px 40px;
}

.items-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.items-header h2 {
    font-size: 2rem;
    white-space: nowrap;
    padding-left: 20px;
}

.items-header-line {
    flex-grow: 1;
    height: 1px;
    background-color: var(--card-color);
}

.items-grid {
    display: flex;
    flex-direction: column;
    /* The 'gap' is removed from here to allow the border to span the full width */
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- NEW: This is the added rule for the separator line --- */
.items-grid .item-card:not(:last-child) {
    /* Adds space below the item content before the line */
    padding-bottom: 30px;
    /* The separator line itself */
    border-bottom: 1px solid var(--card-color);
    /* Adds space below the line before the next item starts */
    margin-bottom: 30px;
}


.item-info {
    text-align: right;
}

.item-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.item-info p {
    font-size: 1.2rem;
    color: var(--text-dark);
}

.item-card img {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header {
        height: 25vh;
    }

    .logo {
        width: 80px;
        height: 80px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .items-section {
        padding: 20px;
    }
}