/* ==================== GLOBAL ==================== */
html, body {
    height: 100%;
    margin: 0;
    background-color: #0d0d0d;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
    font-family: Arial, sans-serif;
}

/* ==================== HEADER ==================== */
header {
    background: #0a0a0a;
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #222;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #39ff88;
    text-decoration: none;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 15px;
}

.btn-login {
    background: transparent;
    color: white;
    border: 2px solid #39ff88;
}

.btn-login:hover {
    background: #39ff88;
    color: black;
}

.btn-register {
    background: #39ff88;
    color: black;
}

.btn-register:hover {
    background: #2be674;
}

/* ==================== PROFILE DROPDOWN ==================== */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-btn {
    background: #222;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.profile-btn:hover {
    background: #39ff88;
    color: black;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #1a1a1a;
    min-width: 190px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
    margin-top: 2px;
}

.dropdown-content a {
    color: white;
    padding: 12px 18px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background: #39ff88;
    color: black;
}

.profile-dropdown:hover .dropdown-content {
    display: block;
}

/* ==================== MAIN LAYOUT ==================== */
.main-content {
    display: flex;
    gap: 25px;
    padding: 20px;
}

.sidebar-categories {
    background: #151515;
    padding: 18px;
    border-radius: 12px;
    width: 230px;
    height: fit-content;
    flex-shrink: 0;
}

.category-item {
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.category-item:hover,
.category-item.active {
    background: #39ff88;
    color: black;
}

.products-container {
    flex: 1;
}

/* ==================== PRODUCT GRID ==================== */
.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.card {
    background: #151515;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    background: #0a0a0a;
    padding: 6px;
    box-sizing: border-box;
    display: block;
}

.info {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.title {
    font-size: 15px;
    margin-bottom: 6px;
    flex-grow: 1;
}

.price {
    color: #39ff88;
    font-weight: bold;
    margin-bottom: 8px;
}

.buy {
    width: 100%;
    padding: 9px;
    background: #39ff88;
    color: black;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-top: auto;
}

/* ==================== MODALS ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #151515;
    padding: 20px;
    border-radius: 10px;
    width: 320px;
    text-align: center;
    position: relative;
}

.modal-content img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
}

.modalPrice {
    color: #39ff88;
    font-size: 18px;
    font-weight: bold;
}

/* ==================== PAGINATION ==================== */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: #222;
    color: white;
    border-radius: 6px;
    text-decoration: none;
}

.pagination a.current {
    background: #39ff88;
    color: black;
}

/* ==================== FOOTER ==================== */
footer {
    background: #0a0a0a;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #222;
    margin-top: auto;
}