/*
Theme Name: Anieli Shop Theme
Theme URI: https://anielishop.com
Author: Parsa
Version: 1.1.4
Description: قالب اختصاصی فروشگاهی پوشاک آنی اِلی همراه با فراموشی رمز عبور ایجکس
Text Domain: anieli-theme
*/

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

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

body {
    font-family: 'Vazirmatn', sans-serif !important;
    direction: rtl;
    text-align: right;
    background-color: #fafafa;
    color: #222;
    line-height: 1.6;
}

/* هدر طلایی */
.anieli-gold-header {
    background: linear-gradient(135deg, #e3be53 0%, #ecd88a 50%, #c99e28 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 9999;
    padding: 8px 0;
    width: 100%;
}

.anieli-header-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    width: 100%;
}

/* سمت راست: لوگو و منوی دسکتاپ */
.header-col-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.anieli-brand-icon {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.anieli-brand-icon:hover {
    transform: scale(1.03);
}

.anieli-logo-img {
    height: 48px !important;
    width: auto !important;
    display: block;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.anieli-desktop-nav .anieli-menu-list {
    display: flex;
    list-style: none;
    gap: 14px;
    margin: 0;
    padding: 0;
    align-items: center;
    white-space: nowrap;
}

.anieli-desktop-nav .anieli-menu-list > li {
    position: relative;
}

.anieli-desktop-nav .anieli-menu-list > li > a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 14.5px;
    padding: 8px 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.anieli-desktop-nav .anieli-menu-list > li:hover > a {
    color: #000;
}

.menu-item-has-children .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    min-width: 200px;
    list-style: none;
    padding: 8px 0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 10000;
    border-top: 3px solid #1a1a1a;
}

.menu-item-has-children:hover .sub-menu {
    display: block;
}

.menu-item-has-children .sub-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 13.5px;
    padding: 9px 16px;
    display: block;
    transition: all 0.2s ease;
}

.menu-item-has-children .sub-menu li a:hover {
    background-color: #f7f7f7;
    color: #c99e28;
    padding-right: 20px;
}

/* نوار سرچ در دسکتاپ */
.header-col-center-search {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 420px;
    margin: 0 20px;
}

.anieli-header-search {
    width: 100%;
}

.anieli-search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 30px;
    padding: 3px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    width: 100%;
}

.anieli-search-field {
    border: none;
    background: transparent;
    padding: 5px 8px;
    font-size: 13.5px;
    font-family: 'Vazirmatn', sans-serif !important;
    outline: none;
    width: 100%;
    color: #222;
}

.search-btn-icon {
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #555;
    padding: 0;
}

/* دکمه‌های چپ در دسکتاپ */
.header-col-left-desktop {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    justify-content: flex-end;
}

.anieli-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    background: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.anieli-action-btn:hover {
    background: #1a1a1a;
    color: #e3be53;
}

.anieli-cart-badge-wrap {
    position: absolute;
    top: -4px;
    left: -4px;
}

.anieli-cart-count {
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #ecd88a;
}

/* --- نوار ناوبری پایین صفحه مخصوص موبایل (Bottom Nav) --- */
.anieli-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -3px 20px rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(227, 190, 83, 0.35);
    z-index: 99998;
    padding: 6px 10px 8px;
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: #666;
    text-decoration: none;
    font-family: 'Vazirmatn', sans-serif !important;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: all 0.2s ease;
}

.bottom-nav-item svg {
    transition: transform 0.2s ease;
}

.bottom-nav-item:hover,
.bottom-nav-item.is-active {
    color: #b88a1b;
}

.bottom-nav-item:active svg {
    transform: scale(0.9);
}

.bottom-nav-cart-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-cart-wrap .anieli-cart-badge-wrap {
    top: -6px;
    left: -8px;
}

/* دراور کشویی دسته‌بندی‌ها در موبایل */
.anieli-cat-drawer {
    position: fixed;
    inset: 0;
    z-index: 999999;
    visibility: hidden;
    transition: visibility 0.3s ease;
}

.anieli-cat-drawer.is-open {
    visibility: visible;
}

.cat-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.anieli-cat-drawer.is-open .cat-drawer-overlay {
    opacity: 1;
}

.cat-drawer-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 75vh;
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
    overflow-y: auto;
}

.anieli-cat-drawer.is-open .cat-drawer-content {
    transform: translateY(0);
}

.cat-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.cat-drawer-header h3 {
    font-size: 16px;
    font-weight: 800;
}

.cat-drawer-close {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.cat-drawer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cat-drawer-list li {
    border-bottom: 1px solid #f7f7f7;
}

.cat-drawer-list li a {
    display: block;
    padding: 12px 6px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

/* --- استایل پاپ‌آپ لاگین/عضویت/فراموشی رمز --- */
.anieli-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.anieli-modal.is-open {
    display: flex;
}

.anieli-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 20, 0.65);
    backdrop-filter: blur(8px);
}

.anieli-modal-content {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 430px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 24px 20px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 2;
    direction: rtl;
    text-align: right;
    border: 1px solid rgba(227, 190, 83, 0.3);
    animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
    0% { opacity: 0; transform: scale(0.92) translateY(15px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    border: none;
    background: #f4f4f6;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.auth-modal-head {
    text-align: center;
    margin-bottom: 18px;
}

.auth-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #faf8f3;
    border: 1px solid #ebd89f;
    padding: 8px 18px;
    border-radius: 14px;
    margin-bottom: 12px;
}

.auth-logo-badge img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.auth-tabs {
    display: flex;
    background: #f4f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-top: 10px;
    gap: 4px;
}

.auth-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 13.5px;
    font-weight: 700;
    font-family: 'Vazirmatn', sans-serif !important;
    color: #666;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.auth-tab-btn.is-active {
    background: #ffffff;
    color: #111;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-tab-pane {
    display: none;
    animation: fadeInTab 0.25s ease;
}

.auth-tab-pane.is-active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-tab-description {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

.auth-back-to-login {
    text-align: center;
    margin-top: 15px;
}

.back-to-login-btn {
    background: none;
    border: none;
    color: #c99e28;
    font-weight: 700;
    font-size: 13px;
    font-family: 'Vazirmatn', sans-serif !important;
    cursor: pointer;
    transition: color 0.2s;
}

.back-to-login-btn:hover {
    color: #111;
    text-decoration: underline;
}

.anieli-auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-row-2col {
    display: flex;
    gap: 10px;
}

.auth-row-2col .auth-field-group {
    flex: 1;
}

.auth-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-field-group label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.auth-field-group label .required {
    color: #e74c3c;
}

.field-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-control {
    width: 100% !important;
    height: 42px;
    background: #f9f9fb;
    border: 1.5px solid #eaeaea;
    border-radius: 10px;
    padding: 0 36px 0 12px;
    font-family: 'Vazirmatn', sans-serif !important;
    font-size: 13px;
    color: #222;
    outline: none;
    transition: all 0.25s ease;
}

.field-password-wrap .auth-input-control {
    padding-left: 38px !important;
}

.auth-input-control:focus {
    background: #ffffff;
    border-color: #c99e28;
    box-shadow: 0 0 0 3px rgba(201, 158, 40, 0.12);
}

.field-with-icon .input-icon {
    position: absolute;
    right: 10px;
    color: #999;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.auth-input-control:focus + .input-icon,
.field-with-icon:focus-within .input-icon {
    color: #c99e28;
}

.toggle-password-btn {
    position: absolute;
    left: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    padding: 4px;
}

#reg_phone {
    letter-spacing: 1px;
}

.auth-remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    cursor: pointer;
}

.custom-checkbox input {
    accent-color: #c99e28;
    width: 15px;
    height: 15px;
}

.forgot-pass-link-btn {
    background: none;
    border: none;
    color: #888;
    font-family: 'Vazirmatn', sans-serif !important;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.forgot-pass-link-btn:hover {
    color: #c99e28;
    text-decoration: underline;
}

.auth-terms-group {
    margin: 2px 0;
}

.auth-terms-group .custom-checkbox {
    font-size: 11.5px;
    line-height: 1.5;
}

.terms-link {
    color: #c99e28;
    text-decoration: underline;
    font-weight: 600;
}

.anieli-auth-submit-btn {
    margin-top: 4px;
    height: 44px;
    background: linear-gradient(135deg, #1f1f1f 0%, #0a0a0a 100%);
    color: #f7e7b4;
    border: 1px solid #d4af37;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Vazirmatn', sans-serif !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.anieli-auth-submit-btn:hover {
    background: linear-gradient(135deg, #d4af37 0%, #b88a1b 100%);
    color: #111;
    box-shadow: 0 8px 20px rgba(201, 158, 40, 0.3);
}

.anieli-auth-submit-btn.reg-btn {
    background: linear-gradient(135deg, #d4af37 0%, #b88a1b 100%);
    color: #111;
}

/* کادر پیام خطا و موفقیت */
.anieli-alert-box {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: right;
    animation: fadeInTab 0.25s ease;
}

.anieli-alert-box.alert-error {
    background-color: #fff2f2;
    color: #d63031;
    border: 1px solid #fab1a0;
}

.anieli-alert-box.alert-success {
    background-color: #e8f8f0;
    color: #27ae60;
    border: 1px solid #a3e4d7;
}

/* ساید کارت */
.anieli-side-cart {
    position: fixed;
    inset: 0;
    z-index: 999999;
    visibility: hidden;
    transition: visibility 0.3s ease;
}

.anieli-side-cart.is-open {
    visibility: visible;
}

.side-cart-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.anieli-side-cart.is-open .side-cart-overlay {
    opacity: 1;
}

.side-cart-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 360px;
    max-width: 85%;
    height: 100%;
    background: #fff;
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.anieli-side-cart.is-open .side-cart-content {
    transform: translateX(0);
}

.side-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.side-cart-close {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

/* استایل‌های موبایل */
@media (max-width: 900px) {
    body {
        padding-bottom: 70px;
    }

    .anieli-header-full {
        padding: 0 12px;
        gap: 10px;
    }

    .anieli-desktop-nav,
    .header-col-left-desktop {
        display: none !important;
    }

    .header-col-right {
        gap: 0;
    }

    .anieli-logo-img {
        height: 40px !important;
    }

    .header-col-center-search {
        flex: 1;
        max-width: none;
        margin: 0;
        display: flex;
        justify-content: flex-end;
    }

    .anieli-search-form {
        padding: 2px 10px;
        border-radius: 20px;
    }

    .anieli-search-field {
        font-size: 12px;
        padding: 4px 6px;
    }

    .anieli-bottom-nav {
        display: block;
    }
}