/* ============================================================
   PROFILE.CSS — ЛИЧНЫЙ КАБИНЕТ
   Стилизован в едином стиле с main.css
   ============================================================ */

:root {
    --profile-primary: #8b5a2b;
    --profile-primary-light: #d4a574;
    --profile-bg: #faf7f2;
    --profile-card: #ffffff;
    --profile-border: #f0e6d8;
    --profile-text: #3e2e1f;
    --profile-text-muted: #7a6852;
    --profile-shadow: 0 4px 16px rgba(0,0,0,0.06);
    --profile-radius: 16px;
}

.profile-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 32px 32px 28px;
    background: var(--profile-card);
    border-radius: var(--profile-radius);
    border: 1px solid var(--profile-border);
    box-shadow: var(--profile-shadow);
    margin-bottom: 28px;
}

.avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.avatar-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--profile-primary-light);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.15);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--profile-card);
    border: 2px solid var(--profile-primary-light);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--profile-text-muted);
}

.avatar-upload-btn:hover {
    background: var(--profile-primary-light);
    color: white;
}

.avatar-upload-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.profile-info h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--profile-text);
    margin: 0 0 2px;
    font-family: 'Playfair Display', Georgia, serif;
}

.profile-info .welcome-text {
    font-size: 1rem;
    color: var(--profile-text-muted);
    margin: 0;
    font-weight: 300;
}

.profile-stats {
    display: flex;
    gap: 48px;
    padding: 16px 0 20px;
    padding-left: 24px;
    border-bottom: 1px solid var(--profile-border);
    margin-bottom: 28px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--profile-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--profile-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--profile-border);
    margin-bottom: 28px;
}

.tab-btn {
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--profile-text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.tab-btn:hover {
    color: var(--profile-text);
}

.tab-btn.active {
    color: var(--profile-primary);
    border-bottom-color: var(--profile-primary);
}

.tab-content {
    display: none;
    animation: profileFade 0.25s ease;
}

.tab-content.active {
    display: block;
}

@keyframes profileFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- ЗАКАЗЫ ---------- */
.order-card {
    background: var(--profile-card);
    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.order-card:hover {
    box-shadow: var(--profile-shadow);
}

.order-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--profile-border);
    margin-bottom: 14px;
}

.order-number {
    font-weight: 600;
    font-size: 1rem;
    color: var(--profile-text);
}

.order-date {
    font-size: 0.9rem;
    color: var(--profile-text-muted);
}

.order-total {
    font-weight: 600;
    font-size: 1rem;
    color: var(--profile-primary);
}

.status-badge {
    font-size: 0.7rem;
    padding: 3px 14px;
    border-radius: 40px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: var(--profile-border);
    color: var(--profile-text-muted);
}

.status-paid {
    background: #e6f0e6;
    color: #2a5e2a;
}

.status-completed {
    background: #e6edf0;
    color: #2a4e5e;
}

/* ---------- ТОВАРЫ В ЗАКАЗЕ ---------- */
.order-items-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-item-mini {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--profile-border);
}

.order-item-mini:last-child {
    border-bottom: none;
}

.order-item-img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 1px solid var(--profile-border);
}

.order-item-body {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.order-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.order-item-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--profile-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-item-meta {
    font-size: 0.85rem;
    color: var(--profile-text-muted);
}

/* ============================================================
   КНОПКИ — КОМПАКТНО СПРАВА, В ОДНУ СТРОКУ
   ============================================================ */
.order-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.download-link {
    font-size: 0.7rem;
    color: var(--profile-text-muted);
    text-decoration: none;
    border: 1px solid var(--profile-border);
    padding: 3px 14px;
    border-radius: 40px;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    line-height: 1;
    background: var(--profile-card);
}

.download-link:hover {
    border-color: var(--profile-primary-light);
    color: var(--profile-primary);
}

.write-review-btn {
    background: var(--profile-card);
    border: 1px solid var(--profile-border);
    padding: 3px 14px;
    border-radius: 40px;
    font-size: 0.7rem;
    cursor: pointer;
    color: var(--profile-text-muted);
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    line-height: 1;
}

.write-review-btn:hover {
    border-color: var(--profile-primary-light);
    color: var(--profile-primary);
}

/* ---------- ИЗБРАННОЕ ---------- */
#tab-wishlist .product-card {
    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);
    background: var(--profile-card);
    overflow: hidden;
    transition: all 0.25s ease;
}

#tab-wishlist .product-card:hover {
    transform: translateY(-4px);
    border-color: var(--profile-primary-light);
    box-shadow: var(--profile-shadow);
}

#tab-wishlist .product-price {
    font-size: 1.1rem;
}
#tab-wishlist .product-title {
    font-size: 0.85rem;
}

/* ---------- ОТЗЫВЫ ---------- */
.review-card {
    background: var(--profile-card);
    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);
    padding: 18px 22px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}

.review-card:hover {
    box-shadow: var(--profile-shadow);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.review-product {
    font-weight: 600;
    color: var(--profile-text);
    font-size: 1rem;
}

.review-rating {
    color: #d4a574;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.review-text {
    font-size: 0.95rem;
    color: var(--profile-text-muted);
    line-height: 1.6;
    margin: 6px 0 8px;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--profile-border);
}

.review-date {
    font-size: 0.75rem;
    color: var(--profile-text-muted);
}

.review-actions {
    display: flex;
    gap: 16px;
}

.review-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--profile-text-muted);
    padding: 0;
    font-family: inherit;
    transition: color 0.2s;
}

.review-actions button:hover {
    color: var(--profile-primary);
}

.pending-badge {
    font-size: 0.7rem;
    color: #856404;
    background: #fff3cd;
    padding: 2px 14px;
    border-radius: 40px;
}

/* ---------- НАСТРОЙКИ ---------- */
.settings-form {
    background: var(--profile-card);
    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);
    padding: 28px 32px;
    box-shadow: var(--profile-shadow);
}

.settings-form .form-group {
    margin-bottom: 18px;
}

.settings-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--profile-text-muted);
    margin-bottom: 4px;
}

.settings-form input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--profile-bg);
    color: var(--profile-text);
    transition: all 0.2s;
    font-family: inherit;
}

.settings-form input:focus {
    outline: none;
    border-color: var(--profile-primary-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
}

.settings-form .form-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--profile-text-muted);
    margin-top: 4px;
}

.settings-form hr {
    border: none;
    border-top: 1px solid var(--profile-border);
    margin: 24px 0;
}

.settings-form h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--profile-text);
    margin: 0 0 16px;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-save {
    background: var(--profile-primary-light);
    color: var(--profile-text);
    border: none;
    padding: 10px 32px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-save:hover {
    background: #c48b56;
    color: white;
}

.btn-secondary {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    margin-left: 8px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.logout-link {
    margin-top: 28px;
    text-align: center;
}

.logout-link a {
    color: var(--profile-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.logout-link a:hover {
    color: #c0392b;
}

/* ---------- ПОДТВЕРЖДЕНИЕ EMAIL (ОСНОВНОЙ БЛОК) ---------- */
.email-verification-form {
    background: var(--profile-bg);
    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.email-verification-form h4 {
    margin: 0 0 4px;
    font-weight: 600;
    color: var(--profile-text);
    font-family: inherit;
}

.email-verification-form p {
    margin: 0 0 16px;
    color: var(--profile-text-muted);
    font-size: 0.9rem;
}

.email-verification-form .form-group {
    margin-bottom: 14px;
}

/* ---------- ПОДТВЕРЖДЕНИЕ СМЕНЫ EMAIL — ОТДЕЛЬНЫЙ БЛОК (как на регистрации) ---------- */
.email-verification-block {
    background: #faf7f2;
    border: 1px solid #ebe5dd;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.email-verification-block .verification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.email-verification-block .verification-header .verification-icon {
    font-size: 1.6rem;
}

.email-verification-block .verification-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3e2e1f;
    margin: 0;
    font-family: inherit;
}

.email-verification-block .verification-text {
    font-size: 0.95rem;
    color: #5a4a3a;
    margin: 0 0 4px 0;
}

.email-verification-block .verification-hint {
    font-size: 0.8rem;
    color: #7a6852;
    margin: 0 0 18px 0;
}

.email-verification-block .verification-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 4px;
}

.email-verification-block .btn-save {
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 10px 32px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.email-verification-block .btn-save:hover {
    background: #1e2a36;
}

.email-verification-block .btn-secondary {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 40px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.email-verification-block .btn-secondary:hover {
    background: #e0e0e0;
}

.email-verification-block .resend-block {
    margin-top: 16px;
    text-align: center;
}

.email-verification-block .timer-text {
    font-size: 0.85rem;
    color: #7a6852;
}

.email-verification-block .btn-resend-code {
    background: transparent;
    border: none;
    color: #8b6b4d;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 8px;
    font-family: inherit;
}

.email-verification-block .btn-resend-code:hover {
    color: #5a3e2b;
}

.email-verification-block .form-group {
    margin-bottom: 16px;
}

.email-verification-block .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a3727;
    margin-bottom: 4px;
}

.email-verification-block .form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s;
    font-family: inherit;
}

.email-verification-block .form-group input:focus {
    outline: none;
    border-color: #b8955c;
    box-shadow: 0 0 0 3px rgba(184, 149, 92, 0.15);
}

/* ---------- ПУСТЫЕ СОСТОЯНИЯ ---------- */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: var(--profile-card);
    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);
    box-shadow: var(--profile-shadow);
}

.empty-state .empty-icon {
    display: block;
    font-size: 2.8rem;
    color: #d0c8c0;
    margin-bottom: 8px;
    font-style: normal;
}

.empty-state p {
    color: var(--profile-text-muted);
    margin: 0 0 16px;
    font-size: 0.95rem;
}

.empty-state .btn {
    background: var(--profile-primary-light);
    color: var(--profile-text);
    padding: 8px 24px;
    border-radius: 40px;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.empty-state .btn:hover {
    background: #c48b56;
    color: white;
}

/* ---------- АЛЕРТЫ ---------- */
.alert-success,
.alert-error {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #e6f0e6;
    color: #2a5e2a;
    border-color: #c8dcc8;
}

.alert-error {
    background: #f0e6e6;
    color: #5e2a2a;
    border-color: #dcc8c8;
}

/* ---------- МОДАЛКА ОТЗЫВА ---------- */
.review-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.review-modal.active {
    display: flex;
}

.review-modal-content {
    background: var(--profile-card);
    border-radius: var(--profile-radius);
    width: 90%;
    max-width: 440px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: profileModalIn 0.25s ease;
}

@keyframes profileModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.review-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.review-modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: var(--profile-text);
    font-family: inherit;
}

.review-modal-close {
    background: transparent;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--profile-text-muted);
    transition: color 0.2s;
}

.review-modal-close:hover {
    color: var(--profile-text);
}

.review-modal-product {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px;
    background: var(--profile-bg);
    border-radius: 10px;
}

.review-modal-product img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--profile-border);
}

.review-modal-product span {
    font-weight: 500;
    color: var(--profile-text);
    font-size: 0.95rem;
}

.review-modal-rating label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--profile-text-muted);
    display: block;
    margin-bottom: 6px;
}

.rating-stars {
    display: flex;
    gap: 6px;
    margin: 6px 0 16px;
}

.rating-stars span {
    font-size: 1.8rem;
    cursor: pointer;
    color: #ddd;
    transition: color 0.15s;
}

.rating-stars span.active {
    color: #d4a574;
}

.rating-stars span:hover {
    transform: scale(1.05);
}

.review-modal-text label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--profile-text-muted);
    display: block;
    margin-bottom: 6px;
}

.review-modal-text textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--profile-border);
    border-radius: 10px;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
    min-height: 100px;
    background: var(--profile-bg);
    transition: border-color 0.2s;
}

.review-modal-text textarea:focus {
    outline: none;
    border-color: var(--profile-primary-light);
    background: white;
}

.review-modal-submit {
    background: var(--profile-primary-light);
    color: var(--profile-text);
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 16px;
    transition: all 0.2s;
    font-family: inherit;
}

.review-modal-submit:hover {
    background: #c48b56;
    color: white;
}

/* ---------- МОДАЛКА КАДРИРОВАНИЯ ---------- */
.crop-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 20000;
    align-items: center;
    justify-content: center;
}

.crop-modal.active {
    display: flex;
}

.crop-modal-content {
    background: white;
    border-radius: var(--profile-radius);
    max-width: 92%;
    width: 560px;
    padding: 24px 24px 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
}

.crop-modal-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.crop-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--profile-text-muted);
    transition: color 0.2s;
    padding: 0 4px;
}

.crop-modal-close:hover {
    color: var(--profile-text);
}

.crop-modal-body {
    text-align: center;
}

.crop-modal-body img {
    max-width: 100%;
    max-height: 50vh;
    border-radius: 8px;
}

.crop-modal-footer {
    margin-top: 16px;
    text-align: center;
}

.crop-modal-footer .btn-save {
    padding: 10px 48px;
}

/* ============================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================================ */

@media (max-width: 768px) {
    .profile-container {
        padding: 0 16px;
        margin: 20px auto;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 24px 20px 20px;
    }

    .avatar-img {
        width: 72px;
        height: 72px;
    }

    .avatar-upload-btn {
        width: 26px;
        height: 26px;
        bottom: 0;
        right: 0;
    }

    .avatar-upload-btn svg {
        width: 12px;
        height: 12px;
    }

    .profile-info h1 {
        font-size: 1.5rem;
    }
    .profile-info .welcome-text {
        font-size: 0.9rem;
    }

    .profile-stats {
        gap: 24px;
        justify-content: center;
        padding: 12px 0 16px;
    }

    .stat-value {
        font-size: 1.4rem;
    }
    .stat-label {
        font-size: 0.75rem;
    }

    .profile-tabs {
        overflow-x: auto;
        gap: 0;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .order-card {
        padding: 14px 16px;
    }

    .order-header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 4px 8px;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .order-number {
        font-size: 0.9rem;
        font-weight: 600;
    }
    .order-date {
        font-size: 0.8rem;
        color: var(--profile-text-muted);
    }
    .order-total {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--profile-primary);
    }
    .status-badge {
        font-size: 0.6rem;
        padding: 2px 10px;
    }

    .order-item-mini {
        flex-wrap: nowrap;
        gap: 12px;
        padding: 6px 0;
    }

    .order-item-img {
        width: 44px;
        height: 44px;
    }

    .order-item-body {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .order-item-info {
        flex: 1;
        min-width: 0;
    }

    .order-item-name {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .order-item-meta {
        font-size: 0.7rem;
    }

    .order-item-actions {
        display: flex;
        gap: 6px;
        align-items: center;
        flex-shrink: 0;
        margin-left: auto;
    }

    .download-link,
    .write-review-btn {
        font-size: 0.6rem;
        padding: 2px 10px;
        height: 24px;
        white-space: nowrap;
    }

    .settings-form {
        padding: 16px 18px;
    }

    .settings-form label {
        font-size: 0.8rem;
    }

    .settings-form input {
        font-size: 0.95rem;
        padding: 7px 12px;
    }

    .settings-form h3 {
        font-size: 0.9rem;
    }

    .btn-save {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 0.9rem;
    }

    .btn-secondary {
        font-size: 0.8rem;
        padding: 6px 16px;
    }

    .review-card {
        padding: 14px 16px;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-product {
        font-size: 0.95rem;
    }
    .review-text {
        font-size: 0.9rem;
    }

    .review-actions {
        gap: 12px;
    }
    .review-actions button {
        font-size: 0.75rem;
    }

    .review-date {
        font-size: 0.7rem;
    }

    .empty-state {
        padding: 30px 16px;
    }

    .empty-state .empty-icon {
        font-size: 2rem;
    }
    .empty-state p {
        font-size: 0.85rem;
    }

    .review-modal-content {
        padding: 20px;
    }
    .review-modal-header h3 {
        font-size: 1rem;
    }
    .review-modal-product span {
        font-size: 0.85rem;
    }
    .review-modal-text textarea {
        font-size: 0.85rem;
    }
    .review-modal-submit {
        font-size: 0.85rem;
    }

    .crop-modal-content {
        padding: 16px;
        width: 96%;
    }
    .crop-modal-close {
        font-size: 24px;
    }

    #tab-wishlist .product-price {
        font-size: 0.95rem;
    }
    #tab-wishlist .product-title {
        font-size: 0.8rem;
    }

    .email-verification-block {
        padding: 20px 16px;
    }
    .email-verification-block .verification-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .email-verification-block .btn-save,
    .email-verification-block .btn-secondary {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 0 12px;
        margin: 12px auto;
    }

    .profile-header {
        padding: 18px 14px 16px;
        gap: 12px;
    }

    .avatar-img {
        width: 64px;
        height: 64px;
        border-width: 2px;
    }

    .profile-info h1 {
        font-size: 1.3rem;
    }
    .profile-info .welcome-text {
        font-size: 0.8rem;
    }

    .profile-stats {
        gap: 16px;
        padding: 8px 0 12px;
    }

    .stat-value {
        font-size: 1.2rem;
    }
    .stat-label {
        font-size: 0.7rem;
    }

    .tab-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .order-card {
        padding: 10px 12px;
    }

    .order-number {
        font-size: 0.8rem;
    }
    .order-date {
        font-size: 0.7rem;
    }
    .order-total {
        font-size: 0.8rem;
    }
    .status-badge {
        font-size: 0.55rem;
        padding: 1px 8px;
    }

    .order-item-img {
        width: 36px;
        height: 36px;
    }

    .order-item-name {
        font-size: 0.7rem;
    }

    .order-item-meta {
        font-size: 0.6rem;
    }

    .order-item-actions {
        gap: 4px;
    }

    .download-link,
    .write-review-btn {
        font-size: 0.55rem;
        padding: 1px 8px;
        height: 22px;
    }

    .settings-form {
        padding: 12px 14px;
    }

    .settings-form h3 {
        font-size: 0.75rem;
    }
    .settings-form label {
        font-size: 0.75rem;
    }
    .settings-form input {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    .btn-save {
        font-size: 0.8rem;
        padding: 8px;
    }
    .btn-secondary {
        font-size: 0.7rem;
        padding: 6px 14px;
    }

    .review-card {
        padding: 10px 12px;
    }

    .review-product {
        font-size: 0.85rem;
    }
    .review-rating {
        font-size: 0.7rem;
    }
    .review-text {
        font-size: 0.8rem;
    }
    .review-date {
        font-size: 0.6rem;
    }
    .review-actions button {
        font-size: 0.65rem;
    }
    .pending-badge {
        font-size: 0.6rem;
        padding: 1px 10px;
    }

    .email-verification-form {
        padding: 14px 16px;
    }
    .email-verification-form h4 {
        font-size: 0.9rem;
    }
    .email-verification-form p {
        font-size: 0.75rem;
    }

    .logout-link a {
        font-size: 0.75rem;
    }

    .review-modal-content {
        padding: 16px;
        max-width: 95%;
    }
    .review-modal-header h3 {
        font-size: 0.95rem;
    }
    .review-modal-product {
        padding: 8px 12px;
        gap: 10px;
    }
    .review-modal-product img {
        width: 40px;
        height: 40px;
    }
    .review-modal-product span {
        font-size: 0.8rem;
    }
    .rating-stars span {
        font-size: 1.5rem;
    }
    .review-modal-text textarea {
        font-size: 0.8rem;
        padding: 8px 10px;
        min-height: 80px;
    }
    .review-modal-submit {
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .crop-modal-content {
        padding: 12px;
    }
    .crop-modal-close {
        font-size: 22px;
    }

    .empty-state .empty-icon {
        font-size: 1.8rem;
    }
    .empty-state p {
        font-size: 0.8rem;
    }
    .empty-state .btn {
        font-size: 0.75rem;
        padding: 6px 18px;
    }

    #tab-wishlist .product-price {
        font-size: 0.85rem;
    }
    #tab-wishlist .product-title {
        font-size: 0.7rem;
    }
}