/* Customer Portal & "وول‌وولک‌های من" Styles */

/* Registration & Portal Hero */
.portal-hero {
    padding: 24px 0 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .portal-hero {
        padding: 40px 0 24px;
        margin-bottom: 32px;
    }
}

.portal-header-flex {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

@media (min-width: 640px) {
    .portal-header-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }
}

.user-badge {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
}

.user-badge-name {
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Guest Action Group */
.guest-action-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.guest-action-group .btn {
    width: 100%;
    min-height: 48px;
}

.guest-action-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

@media (min-width: 640px) {
    .guest-action-group {
        flex-direction: row;
        align-items: center;
    }
    .guest-action-group .btn {
        width: auto;
        min-height: 42px;
    }
    .guest-action-desc {
        text-align: right;
    }
}

/* Register Serial Form Card */
.register-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .register-card {
        padding: 24px;
        margin-bottom: 40px;
    }
}

.register-card-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}

@media (min-width: 640px) {
    .register-card-title {
        font-size: 17px;
        margin-bottom: 8px;
    }
}

.register-card-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

@media (min-width: 640px) {
    .register-card-desc {
        font-size: 13px;
        margin-bottom: 18px;
    }
}

.serial-form-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.serial-form-row .btn {
    width: 100%;
    min-height: 48px;
}

@media (min-width: 640px) {
    .serial-form-row {
        flex-direction: row;
    }
    .serial-form-row .btn {
        width: auto;
        min-height: 44px;
    }
}

.serial-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-en), var(--font-fa);
    font-size: 16px; /* Prevents auto-zoom on iOS */
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: #fff;
    text-align: center;
}

@media (min-width: 640px) {
    .serial-input {
        flex: 1;
        width: auto;
        min-width: 220px;
        text-align: right;
    }
}

.serial-input:focus {
    outline: none;
    border-color: var(--text-main);
}

/* Alerts */
.alert-box {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 14px;
    display: none;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
}

.alert-danger {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger);
}

/* وول‌وولک‌های من - Section */
.my-woolwoolaks-section {
    padding-bottom: 40px;
}

.section-head-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.woolwoolaks-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .woolwoolaks-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* Filter bar for وول‌وولک‌های من */
.my-woolwoolaks-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}

@media (min-width: 640px) {
    .my-woolwoolaks-filter-bar {
        flex-direction: row;
        width: auto;
        margin-top: 0;
    }
}

.filter-search-input {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
}

@media (min-width: 640px) {
    .filter-search-input {
        width: 240px;
        min-height: 38px;
        font-size: 13px;
    }
}

.filter-category-select {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
}

@media (min-width: 640px) {
    .filter-category-select {
        width: 150px;
        min-height: 38px;
        font-size: 13px;
    }
}

/* B2B Banner */
.b2b-banner {
    border: 1px solid var(--line);
    padding: 20px 16px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fff;
}

.b2b-banner .btn {
    width: 100%;
    min-height: 44px;
}

@media (min-width: 640px) {
    .b2b-banner {
        padding: 32px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }
    .b2b-banner .btn {
        width: auto;
    }
}


.woolwoolak-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}

.woolwoolak-card:hover {
    border-color: var(--line-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.card-product-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.card-title-group h4 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.card-batch {
    font-size: 12px;
    color: var(--text-muted);
}

.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 12px;
}

.serial-pill {
    font-family: var(--font-en);
    font-weight: 800;
    letter-spacing: 1.5px;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 3px 8px;
    border-radius: 4px;
}

.channel-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.channel-tag-web {
    background: #eef2ff;
    color: #4338ca;
}

.channel-tag-sms {
    background: #f0fdf4;
    color: #15803d;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 14px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #fff;
    width: calc(100% - 24px);
    max-width: 420px;
    border-radius: var(--radius-md);
    padding: 22px 18px;
    margin: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

@media (min-width: 640px) {
    .modal-card {
        padding: 28px;
        width: 100%;
        margin: 0;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 17px;
    font-weight: 800;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
}

@media (min-width: 640px) {
    .form-input {
        min-height: 40px;
        font-size: 14px;
    }
}

.form-input:focus {
    outline: none;
    border-color: var(--text-main);
}

/* Footer Social Media Channels */
.footer-social-wrapper {
    margin-top: 14px;
}

.footer-social-title {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-social-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.social-btn svg {
    shrink: 0;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.social-btn.instagram:hover {
    color: #e1306c;
    border-color: #fbcfe8;
    background: #fdf2f8;
}

.social-btn.telegram:hover {
    color: #0284c7;
    border-color: #bae6fd;
    background: #f0f9ff;
}

.social-btn.youtube:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

.social-btn.pinterest:hover {
    color: #e60023;
    border-color: #fecdd3;
    background: #fff1f2;
}

.social-btn.x-twitter:hover {
    color: #0f172a;
    border-color: #cbd5e1;
    background: #f8fafc;
}

.social-btn.linkedin:hover {
    color: #0a66c2;
    border-color: #bfdbfe;
    background: #eff6ff;
}



