* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 10px;
    min-height: 100vh;
    background-color: #f5f7fa;
    color: #2d3436;
}

h1 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 15px;
    color: #0984e3;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choices {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.choice-btn, .pagination-btn {
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.reset-filter-btn {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #e17055, #d63031);
    color: white;
}

.choice-btn:active, .pagination-btn:active, .reset-filter-btn:active {
    transform: scale(0.95);
}

.content {
    display: none;
}

.content.active {
    display: block;
}

.spinner, .error-message {
    text-align: center;
    font-size: 14px;
    padding: 15px;
    color: #636e72;
}

.error-message {
    color: #d63031;
}

.error-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.error-actions button {
    padding: 8px;
    font-size: 13px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #0984e3, #00cec9);
    color: white;
}

.item-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.item-card p {
    margin-bottom: 6px;
    font-size: 13px;
}

.item-card .title {
    font-weight: 600;
    color: #0984e3;
}

.item-card a {
    color: #0984e3;
    text-decoration: none;
}

.item-card a:hover {
    text-decoration: underline;
}

.item-card .phone-display {
    margin-top: 8px;
    font-size: 13px;
    color: #0984e3;
}

.item-card .phone-link {
    color: #0984e3;
    text-decoration: underline;
    cursor: pointer;
}

.photos {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.photos img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    position: relative;
}

.carousel-image {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px;
    font-size: 18px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    z-index: 1001;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: #0984e3;
    color: white;
}

@media (max-width: 400px) {
    body { padding: 8px; }
    h1 { font-size: 20px; }
    .choice-btn, .pagination-btn { padding: 6px 12px; font-size: 12px; min-width: 80px; }
    .reset-filter-btn { padding: 5px 8px; font-size: 11px; }
    .item-card { padding: 10px; }
    .item-card p { font-size: 12px; }
    .item-card .phone-display { font-size: 12px; }
    .item-card .phone-link { font-size: 12px; }
    .photos img { width: 50px; height: 50px; }
    .carousel-prev, .carousel-next { padding: 8px; font-size: 16px; }
}