/* ===== کانتینر اصلی ===== */
.sgf-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'IRANSans', 'Tahoma', Arial, sans-serif;
}

.sgf-title {
    text-align: center;
    color: #2d3748;
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 700;
}

/* ===== سوالات ===== */
.sgf-question {
    margin-bottom: 25px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    border: 2px solid #edf2f7;
    transition: border-color 0.3s ease;
}

.sgf-question:hover {
    border-color: #cbd5e0;
}

.sgf-question label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
    margin-bottom: 12px;
}

.sgf-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.sgf-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
    font-size: 14px;
    margin: 0;
}

.sgf-options label:hover {
    border-color: #667eea;
    background: #ebf4ff;
}

.sgf-options input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

.sgf-options input[type="radio"]:checked + label {
    border-color: #667eea;
    background: #ebf4ff;
}

/* ===== دکمه ===== */
#sgf-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#sgf-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.35);
}

#sgf-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== لودر ===== */
#sgf-loader {
    text-align: center;
    padding: 20px;
    color: #4a5568;
    font-size: 15px;
}

#sgf-loader span {
    display: inline-block;
    animation: sgf-pulse 1.5s ease-in-out infinite;
}

@keyframes sgf-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== خطا ===== */
#sgf-error {
    background: #fff5f5;
    color: #e53e3e;
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    border: 1px solid #feb2b2;
    display: none;
}

/* ===== نتایج ===== */
#sgf-results {
    margin-top: 30px;
    display: none;
}

.sgf-results-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #edf2f7;
}

.sgf-results-count {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.sgf-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.sgf-product-item {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sgf-product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.sgf-product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f7fafc;
}

.sgf-no-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    color: #a0aec0;
    font-size: 14px;
}

.sgf-product-info {
    padding: 15px;
}

.sgf-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.sgf-product-name a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sgf-product-name a:hover {
    color: #667eea;
}

.sgf-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #48bb78;
    margin: 5px 0;
}

.sgf-product-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0;
}

.sgf-attr-tag {
    background: #edf2f7;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: #4a5568;
}

.sgf-product-excerpt {
    font-size: 13px;
    color: #718096;
    margin: 8px 0;
    line-height: 1.6;
}

.sgf-view-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background: #667eea;
    color: #ffffff !important;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.sgf-view-btn:hover {
    background: #5a67d8;
    color: #ffffff !important;
}

.sgf-no-results {
    text-align: center;
    padding: 40px;
    background: #f7fafc;
    border-radius: 12px;
    color: #718096;
    font-size: 16px;
}

/* ===== واکنش‌گرا ===== */
@media (max-width: 768px) {
    .sgf-container {
        padding: 20px;
        margin: 15px;
    }
    
    .sgf-title {
        font-size: 22px;
    }
    
    .sgf-options {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .sgf-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .sgf-container {
        padding: 15px;
        margin: 10px;
    }
    
    .sgf-options {
        grid-template-columns: 1fr 1fr;
    }
    
    .sgf-results-grid {
        grid-template-columns: 1fr;
    }
    
    .sgf-question {
        padding: 15px;
    }
}
/* ===== خطا در سوالات ===== */
.sgf-question.sgf-error {
    border-color: #fc8181 !important;
    background: #fff5f5 !important;
}

.sgf-question.sgf-error .sgf-question-label {
    color: #e53e3e !important;
}

.sgf-no-questions {
    text-align: center;
    padding: 40px;
    color: #a0aec0;
}
/* ===== تگ‌های دسته‌بندی ===== */
.sgf-product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0;
    justify-content: center;
}

.sgf-cat-tag {
    background: #ebf8ff;
    color: #2b6cb0;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    border: 1px solid #bee3f8;
}