.ads-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ad-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.1s;
    cursor: pointer;
    position: relative;
}
.ad-card:active { transform: scale(0.98); }
.ad-card.viewed .photo-container { opacity: 0.6; }
.photo-container {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #e0e0e0;
}
.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.viewed-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}
.favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: none;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.favorite-btn.inactive { color: #ccc; }
.favorite-btn.active { color: #e91e63; }
.ad-info { padding: 10px; }
.ad-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ad-address {
    font-size: 14px;
    color: #757575;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ad-price {
    font-weight: 700;
    color: #009688;
}
.ad-price.free { color: #4caf50; }
.ad-detail {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.detail-photo {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 16px;
}
.detail-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}
.detail-price {
    font-size: 20px;
    font-weight: 700;
    color: #009688;
    margin-bottom: 16px;
}
.detail-price.free { color: #4caf50; }
.detail-address { color: #757575; margin-bottom: 16px; }
.detail-description {
    line-height: 1.5;
    white-space: pre-wrap;
    margin-bottom: 24px;
}
.detail-photos-carousel {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 15px;
    scroll-snap-type: x mandatory;
}
.detail-photo-item {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    scroll-snap-align: start;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.detail-photo-item:hover { transform: scale(1.02); }
.ad-detail .favorite-button {
    background: #f0f0f0;
    border: none;
    border-radius: 24px;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-right: 10px;
}
.ad-detail .favorite-button.active { color: #e91e63; background: #fce4ec; }
.ad-detail .favorite-button.inactive { color: #757575; }
.ad-detail .share-btn {
    background: #009688;
    border: none;
    border-radius: 24px;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.ad-detail .share-btn:hover { background: #00796b; }
.detail-contact-btn {
    background: #0088cc;
    border: none;
    border-radius: 24px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background 0.2s;
    width: 100%;
    justify-content: center;
    margin: 15px 0;
}
.back-btn-top, .back-btn-bottom {
    background: #f0f0f0;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 18px;
    cursor: pointer;
    margin: 10px 0;
    width: 100%;
    text-align: center;
    font-weight: 500;
}
.section-divider {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}
.leave-review-btn {
    background: #ffb74d;
    border: none;
    border-radius: 24px;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin: 15px 0;
    font-weight: 500;
    color: #333;
}
.action-row {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    align-items: center;
}
.action-row .favorite-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.action-row .share-btn {
    flex: 1;
    background: #009688;
    border: none;
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 16px;
    cursor: pointer;
    color: white;
    text-align: center;
}
.detail-contact-btn:hover { background: #0077b5; }
.delivery-options, .ad-category { margin: 10px 0; font-size: 14px; color: #333; }
.ad-tags {
    margin: 10px 0;
    font-size: 14px;
    color: #009688;
}
.favorite-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.favorite-button .favorite-count {
    background: #e91e63;
    color: white;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 2px;
}
.categories { margin: 10px 0; font-size: 14px; color: #666; }
.already-reviewed {
    background: #e0e0e0;
    border-radius: 24px;
    padding: 12px 24px;
    margin: 10px 0;
    text-align: center;
    color: #666;
}