:root {
    --instagram-primary: #0095f6;
    --instagram-border: #dbdbdb;
    --instagram-bg: #fafafa;
    --instagram-text: #262626;
    --instagram-text-light: #8e8e8e;
}

.instagram-post {
    background-color: white;
    border: 1px solid var(--instagram-border);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.instagram-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-left: 12px;
    object-fit: cover;
}

.username {
    font-weight: 600;
    font-size: 14px;
}

.more-options {
    margin-right: auto;
    font-size: 18px;
    cursor: pointer;
}

.post-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.post-actions {
    padding: 8px 16px;
    display: flex;
    align-items: center;
}

.action-icon {
    font-size: 24px;
    cursor: pointer;
    color: var(--instagram-text);
}

.action-icon:first-child {
    margin-left: 0;
}

.save-icon {
    margin-right: auto;
}

.post-likes {
    padding: 0 16px 8px;
    font-weight: 600;
    font-size: 14px;
}

.post-caption {
    padding: 0 16px 8px;
    font-size: 14px;
    position: relative;
}

.caption-text {
    margin-bottom: 5px;
}

.caption-username {
    font-weight: 600;
    margin-left: 4px;
}

.post-comments {
    padding: 0 16px 8px;
    color: var(--instagram-text-light);
    font-size: 14px;
}

.post-time {
    padding: 0 16px 16px;
    color: var(--instagram-text-light);
    font-size: 10px;
    text-transform: uppercase;
}

.add-comment {
    display: flex;
    align-items: center;
    padding: 16px;
    border-top: 1px solid #efefef;
}

.comment-input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px;
}

.post-button {
    color: var(--instagram-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.3;
}

.post-button.active {
    opacity: 1;
}

/* سیستم جستجوی پیشرفته */
.search-container {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--instagram-border);
    padding: 20px;
    margin-bottom: 20px;
}

.search-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.search-input-group {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid var(--instagram-border);
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--instagram-primary);
    box-shadow: 0 0 0 2px rgba(0, 149, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--instagram-text-light);
}

.advanced-search-toggle {
    background: none;
    border: 1px solid var(--instagram-primary);
    color: var(--instagram-primary);
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.advanced-search-toggle:hover {
    background: var(--instagram-primary);
    color: white;
}

.advanced-search-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.advanced-search-panel.active {
    max-height: 800px;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--instagram-text);
}

.filter-select, .filter-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--instagram-border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-select:focus, .filter-input:focus {
    border-color: var(--instagram-primary);
    box-shadow: 0 0 0 2px rgba(0, 149, 246, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary {
    background: var(--instagram-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #0081d6;
    transform: translateY(-1px);
}

.btn-outline {
    background: none;
    border: 1px solid var(--instagram-border);
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--instagram-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: var(--instagram-primary);
    color: var(--instagram-primary);
}

/* نتایج جستجو */
.search-results-info {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--instagram-border);
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-count {
    font-weight: 600;
    color: var(--instagram-text);
}

.results-stats {
    color: var(--instagram-text-light);
    font-size: 14px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid var(--instagram-border);
    border-radius: 6px;
    font-size: 14px;
}

/* قیمت */
.price-display {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-tag {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    margin: 15px 16px 0;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 14px;
    opacity: 0.9;
}

.price-amount {
    font-size: 18px;
    direction: ltr;
}

.price-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* پیام عدم یافتن نتیجه */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--instagram-border);
}

.no-results-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-results-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--instagram-text);
}

.no-results-message {
    color: var(--instagram-text-light);
    margin-bottom: 20px;
}

/* استایل‌های موبایل */
@media (max-width: 768px) {
    .search-header {
        flex-direction: column;
    }

    .search-input-group {
        width: 100%;
    }

    .advanced-search-toggle {
        width: 100%;
        justify-content: center;
    }

    .search-filters {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .search-results-info {
        flex-direction: row;
        gap: 15px;
        text-align: center;
    }
}

.features-section {
    padding: 15px;
    border-top: 1px solid #eee;
}

.features-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.features-title i {
    margin-left: 8px;
    color: #3498db;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.feature-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.feature-name {
    color: #555;
}

.feature-value {
    font-weight: bold;
    color: #2c3e50;
}

.boolean-true {
    color: #27ae60;
}

.boolean-false {
    color: #e74c3c;
}

.add-comment {
    padding: 15px;
    border-top: 1px solid #eee;
}