* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f6f7f9;
    color: #111;
}

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

.topbar {
    background: #fff;
    border-bottom: 1px solid #e7e7e7;
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo {
    font-weight: 700;
}

.admin-link {
    text-decoration: none;
    color: #111;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
}

.title {
    margin: 24px 0 14px;
    font-size: 22px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

@media (max-width: 1000px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #efefef;
    position: relative;
}

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

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #111;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
}

.card-body {
    padding: 14px 14px 16px;
}

.card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.card-desc {
    margin: 8px 0 12px;
    font-size: 13px;
    color: #444;
    line-height: 1.35;
    min-height: 34px;
}

.card-price {
    font-weight: 800;
}

.empty {
    padding: 22px;
    background: #fff;
    border: 1px dashed #cfcfcf;
    border-radius: 16px;
    color: #555;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

.modal {
    width: 100%;
    max-width: 920px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e7e7e7;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 34px;
}

.modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 820px) {
    .modal-content {
        grid-template-columns: 1fr;
    }
}

.modal-image {
    background: #efefef;
    min-height: 360px;
}

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

.modal-info {
    padding: 18px 18px 20px;
}

.modal-badge {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    margin-bottom: 10px;
}

.modal-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.modal-price {
    font-weight: 900;
    margin-bottom: 12px;
    font-size: 18px;
}

.modal-desc {
    color: #444;
    line-height: 1.45;
    white-space: pre-wrap;
    margin-bottom: 16px;
}

.buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    background: #111;
    color: #fff;
    font-weight: 800;
    border: 1px solid #111;
}