/* Sales Page Styles */

/* Category Buttons */
.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.category-btn:hover {
    border-color: #818cf8;
    background-color: #f5f3ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.category-btn.active {
    border-color: #6366f1;
    background-color: #eef2ff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.category-btn span:first-child {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-btn span:nth-child(2) {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.category-btn span:last-child {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Filter Selects */
.filter-select {
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25rem;
}

.filter-select:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.filter-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* View Toggle Buttons */
.view-btn {
    padding: 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.view-btn.active {
    background-color: #6366f1;
    border-color: #6366f1;
    color: white;
}

/* Primary Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.btn-primary svg {
    margin-right: 0.5rem;
}

/* Listing Card */
.listing-card {
    background-color: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.listing-card img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.listing-card:hover img {
    transform: scale(1.05);
}

/* Favorite Button */
.favorite-btn {
    padding: 0.5rem;
    background-color: white;
    border: none;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    background-color: #f3f4f6;
    transform: scale(1.1);
}

.favorite-btn.active svg {
    fill: #ef4444;
    stroke: #ef4444;
}

/* Line Clamp Utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .category-btn {
        padding: 1rem 0.5rem;
    }
    
    .category-btn span:first-child {
        font-size: 1.5rem;
    }
    
    .filter-select {
        width: 100%;
        min-width: 0;
    }
    
    .listing-card img {
        height: 10rem;
    }
}

/* Pagination Styles */
nav button,
nav span {
    min-width: 2.5rem;
    text-align: center;
}

/* Sticky Filter Bar Animation */
.sticky {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading State */
.listing-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-state svg {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

/* Badge Styles */
.badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    color: white;
}

.badge-sale {
    background-color: #10b981;
}

.badge-buy {
    background-color: #f59e0b;
}

.badge-rent {
    background-color: #3b82f6;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* ============================================
   CREATE AD FORM STYLES
   ============================================ */

/* Progress Steps */
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.step-number {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-title {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.step.active .step-title {
    color: #4f46e5;
    font-weight: 600;
}

.step.completed .step-number {
    background-color: #10b981;
    color: white;
}

.step.completed .step-title {
    color: #059669;
}

.step-line {
    height: 2px;
    background-color: #e5e7eb;
    flex: 1;
    margin: 0 1rem;
    margin-top: -2rem;
    transition: all 0.3s ease;
}

.step.completed + .step-line {
    background-color: #10b981;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Cards */
.category-card {
    cursor: pointer;
    display: block;
}

.category-card .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    background-color: white;
    transition: all 0.3s ease;
    min-height: 100px;
}

.category-card:hover .card-content {
    border-color: #818cf8;
    background-color: #f5f3ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.category-card input:checked + .card-content {
    border-color: #6366f1;
    background-color: #eef2ff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.category-card input:checked + .card-content::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: #6366f1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
}

.category-card {
    position: relative;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* Photo Upload Area */
.photo-upload-area {
    margin-bottom: 1rem;
}

.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: #6366f1;
    background-color: #f5f3ff;
}

.upload-zone.dragover {
    border-color: #4f46e5;
    background-color: #eef2ff;
    transform: scale(1.02);
}

/* Photo Preview */
.photo-preview-item {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #f3f4f6;
    aspect-ratio: 1;
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-item .remove-photo {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.photo-preview-item:hover .remove-photo {
    opacity: 1;
}

.photo-preview-item .remove-photo:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.photo-preview-item .main-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background-color: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Buttons */
.btn-next,
.btn-prev {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-next {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-prev {
    background-color: #e5e7eb;
    color: #374151;
}

.btn-prev:hover {
    background-color: #d1d5db;
}

/* Checkbox Styling */
input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* Contact Method Inputs */
label.flex.items-center input[type="checkbox"]:not(:checked) ~ input.form-input {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .step-title {
        font-size: 0.75rem;
    }
    
    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .step-line {
        margin: 0 0.5rem;
    }
    
    label.flex.items-center {
        flex-wrap: wrap;
    }
    
    label.flex.items-center input.form-input {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}