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

body {
    font-family: 'Vazir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
}

.container-full {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.products-page {
    padding: 0;
}

.products-page .container-full {
    width: 100%;
}

.card-full {
    border-radius: 0;
    margin: 0;
    min-height: 100vh;
    padding: 20px;
}

.card {
    background: white;
    border-radius: 4px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.header {
    margin-bottom: 24px;
}

.header h1 {
    color: #212121;
    font-size: 20px;
    margin-bottom: 6px;
    font-weight: 500;
}

.products-page .header h1 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

.subtitle {
    color: #757575;
    font-size: 13px;
}

.products-page .subtitle {
    font-size: 16px;
}

.alert {
    padding: 10px 12px;
    border-radius: 3px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: #424242;
    font-weight: 400;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}


.form-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
    direction: ltr;
    text-align: left;
    background: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: #666;
    background: white;
}

.form-group input::placeholder {
    color: #bbb;
}

.form-group small {
    color: #757575;
    font-size: 11px;
    margin-top: -2px;
}

.btn-submit {
    background: #212121;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}

.btn-submit:hover {
    background: #424242;
}

.btn-submit:active {
    background: #212121;
}

/* Success Page Styles */
.success-card {
    text-align: center;
}


.success-card h1 {
    color: #212121;
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 500;
}

.success-message {
    color: #757575;
    font-size: 13px;
    margin-bottom: 24px;
}

.validation-messages {
    margin-bottom: 24px;
}

.validation-success {
    color: #2e7d32;
    background: #e8f5e9;
    padding: 8px 12px;
    border-radius: 3px;
    border: 1px solid #c8e6c9;
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
}

.validation-success:last-child {
    margin-bottom: 0;
}

.info-box {
    background: #fafafa;
    border-radius: 3px;
    padding: 16px;
    margin: 20px 0;
    text-align: right;
    border: 1px solid #e0e0e0;
}

.info-box h3 {
    color: #424242;
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 500;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    color: #616161;
    font-size: 12px;
    font-weight: 500;
}

.info-item span {
    color: #212121;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.masked {
    color: #9e9e9e !important;
}

.actions {
    margin-top: 20px;
}

.btn-secondary {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    color: #424242;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 400;
    transition: background 0.2s;
    font-size: 13px;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #eeeeee;
}

/* Transfer Options */
.transfer-options {
    margin: 30px 0;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.transfer-options h3 {
    color: #212121;
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 500;
}

.transfer-subtitle {
    color: #757575;
    font-size: 13px;
    margin-bottom: 20px;
}

.option-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.option-box {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    text-align: center;
    display: block;
}

.option-box:hover {
    background: #f5f5f5;
    border-color: #212121;
    transform: translateY(-2px);
}

.option-box.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.option-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.option-title {
    color: #212121;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
}

.option-desc {
    color: #757575;
    font-size: 12px;
}

/* Categories List */
.categories-list {
    margin: 24px 0;
}

.select-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.products-page .select-actions {
    margin-bottom: 30px;
    padding-bottom: 24px;
    gap: 16px;
}

.btn-select-all,
.btn-deselect-all {
    background: #212121;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.products-page .btn-select-all,
.products-page .btn-deselect-all {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-select-all:hover,
.btn-deselect-all:hover {
    background: #424242;
}

.btn-deselect-all {
    background: #757575;
}

.btn-deselect-all:hover {
    background: #616161;
}

.category-item {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 0;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.products-page .category-item {
    margin-bottom: 20px;
    border-radius: 6px;
}

.category-item:hover {
    background: #f5f5f5;
    border-color: #bdbdbd;
}

.category-checkbox-label {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    cursor: pointer;
    margin: 0;
    gap: 12px;
}

.products-page .category-checkbox-label {
    padding: 24px;
    gap: 20px;
}

.product-item .category-checkbox-label {
    align-items: center;
}

.product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 3px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-page .product-image {
    width: 150px;
    height: 150px;
}

.product-images-gallery {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    width: 150px;
}

.products-page .product-images-gallery {
    width: 200px;
}

.product-image-main {
    width: 100%;
    height: 150px;
    position: relative;
}

.products-page .product-image-main {
    height: 200px;
}

.product-image-thumb {
    width: 60px;
    height: 60px;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.2s;
}

.product-image-thumb:hover {
    transform: scale(1.05);
}

.products-page .product-image-thumb {
    width: 70px;
    height: 70px;
}

.product-images-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.gallery-count {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 11px;
    background: #f0f0f0;
}

.category-checkbox {
    margin-top: 2px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.products-page .category-checkbox {
    width: 22px;
    height: 22px;
}

.category-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.category-name {
    color: #212121;
    font-size: 15px;
    font-weight: 500;
}

.products-page .category-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-desc {
    color: #616161;
    font-size: 13px;
    line-height: 1.5;
}

.products-page .category-desc {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.product-description {
    color: #757575;
    font-size: 12px;
    line-height: 1.6;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.products-page .product-description {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 12px;
    padding-top: 12px;
}

.product-tags {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #616161;
}

.products-page .product-tags {
    font-size: 14px;
    margin-top: 12px;
    padding-top: 12px;
}

.product-tags strong {
    color: #424242;
    margin-left: 6px;
}

.tags-list {
    color: #757575;
}

.product-seo {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #616161;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 3px;
}

.products-page .product-seo {
    font-size: 14px;
    padding: 16px;
    margin-top: 12px;
    padding-top: 12px;
}

.product-seo strong {
    color: #424242;
    margin-left: 6px;
}

.seo-item {
    margin-top: 6px;
    padding: 4px 0;
    line-height: 1.5;
}

.seo-item:first-child {
    margin-top: 0;
}

.seo-item strong {
    color: #555;
    font-weight: 500;
}

.category-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #757575;
    margin-top: 4px;
}

.products-page .category-meta {
    font-size: 14px;
    gap: 24px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #757575;
    font-size: 14px;
}

.selected-count {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 3px;
    padding: 12px 16px;
    margin: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #1976d2;
}

.selected-count #selectedCount {
    font-weight: 600;
}

.transfer-button-container {
    margin: 20px 0;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-transfer {
    background: #212121;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.btn-transfer:hover:not(:disabled) {
    background: #424242;
}

.btn-transfer:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
}

/* Transfer Result Styles */
.success-section,
.error-section {
    margin: 20px 0;
    padding: 20px;
    border-radius: 3px;
}

.success-section {
    background: #f1f8e9;
    border: 1px solid #c8e6c9;
}

.error-section {
    background: #ffebee;
    border: 1px solid #ffcdd2;
}

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

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
}

.success-item {
    border-right: 3px solid #4caf50;
}

.error-item {
    border-right: 3px solid #f44336;
}

.result-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.success-item .result-icon {
    color: #4caf50;
}

.error-item .result-icon {
    color: #f44336;
}

.result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-info strong {
    color: #212121;
    font-size: 14px;
}

.result-id {
    color: #757575;
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

.error-message {
    color: #c62828;
    font-size: 12px;
    margin-top: 4px;
}

.result-status {
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.success-status {
    background: #c8e6c9;
    color: #2e7d32;
}

.error-status {
    background: #ffcdd2;
    color: #c62828;
}

/* Settings Page Styles */
.settings-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    color: #212121;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #424242;
    padding: 8px;
    border-radius: 3px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f5f5f5;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    flex: 1;
}

.settings-actions {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Accordion Styles */
.accordion-container {
    margin: 20px 0;
}

.accordion-item {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    margin-bottom: 12px;
    overflow: hidden;
}

.products-page .accordion-item {
    margin-bottom: 20px;
    border-radius: 6px;
}

.accordion-header {
    background: #f5f5f5;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #e0e0e0;
}

.products-page .accordion-header {
    padding: 20px 24px;
}

.accordion-header:hover {
    background: #eeeeee;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #212121;
}

.products-page .accordion-title {
    font-size: 18px;
    font-weight: 600;
    gap: 12px;
}

.accordion-icon {
    font-size: 12px;
    transition: transform 0.2s;
    color: #757575;
    width: 20px;
    display: inline-block;
}

.accordion-count {
    color: #757575;
    font-size: 13px;
    font-weight: 400;
    margin-right: auto;
}

.accordion-content {
    padding: 16px;
    background: white;
    animation: slideDown 0.3s ease-out;
}

.products-page .accordion-content {
    padding: 24px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.accordion-content .categories-list {
    margin: 0;
}

.accordion-content .category-item {
    margin-bottom: 8px;
}

.accordion-content .category-item:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }

    .card {
        padding: 16px;
    }

    .header h1 {
        font-size: 18px;
    }

    .form-group input {
        padding: 8px 10px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
