/* ============================================
   PAZAR YERI - COMMON & GUEST STYLES
   ============================================ */

:root {
    --bg: #0a0a0a;
    --bg2: #141414;
    --card: #1c1c1e;
    --card-hover: #252527;
    --elevated: #2c2c2e;
    --border: rgba(255, 255, 255, 0.07);
    --border-l: rgba(255, 255, 255, 0.12);
    --text: #f0f0f0;
    --text2: #8e8e93;
    --text3: #48484a;
    --white: #ffffff;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    --tr: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --tab-h: 58px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 12px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Vazirmatn', 'Inter', 'Tahoma', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.4;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Vazirmatn', 'Inter', 'Tahoma', sans-serif;
}

a {
    color: var(--text2);
    text-decoration: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 1rem;
}

.hidden {
    display: none !important;
}

/* ===== AUTH SCREENS (Login / Register) ===== */
.auth-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 40px 28px;
    animation: slideUp 0.4s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
    background: var(--elevated);
    border-radius: var(--r-md);
    border: 1px solid var(--border-l);
}

.auth-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text2);
    font-size: 0.88rem;
    margin-top: 4px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text3);
}

.auth-link a {
    color: var(--text);
    font-weight: 600;
}

.auth-footer {
    text-align: left;
    margin-top: 14px;
}

.forgot-link {
    font-size: 0.85rem;
    color: #0a84ff;
    text-decoration: none;
    transition: var(--tr);
}

.forgot-link.never-hover {
    text-decoration: underline;
    color: #409fff;
}

.auth-link a.never-hover {
    text-decoration: underline;
    color: var(--white);
}

.auth-support {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: var(--text3);
    font-size: 0.82rem;
    font-weight: 500;
    transition: var(--tr);
    opacity: 0.7;
}

.support-btn.never-hover {
    color: var(--white);
    opacity: 1;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text2);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg2);
    border: 1px solid var(--border-l);
    border-radius: var(--r-sm);
    color: var(--text);
    outline: none;
    transition: var(--tr);
    appearance: none;
    -webkit-appearance: none;
}

.form-group input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.form-group.terms-group label {
    display: inline-block !important;
    margin-bottom: 0 !important;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

input[type="password"],
input[type="tel"],
.password-wrap input {
    direction: ltr !important;
    text-align: left !important;
}

.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input {
    padding-right: 48px !important;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    transition: var(--tr);
}

.password-toggle.never-hover {
    color: var(--white);
}

.form-group textarea {
    resize: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 22px center;
    background-size: 18px;
    padding-right: 48px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: var(--white);
    color: #000;
    border: none;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--tr);
}

.btn-primary.never-hover {
    opacity: 0.9;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    background: var(--elevated);
    color: var(--text);
    border: 1px solid var(--border-l);
    border-radius: var(--r-sm);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--tr);
}

.btn-full {
    width: 100%;
}

/* ===== GUEST LANDING APP LAYOUT ===== */
.app-screen {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
}

.app-header {
    padding: 10px 20px 8px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text2);
    transition: var(--tr);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.icon-btn.never-hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: translateY(-1px);
}

.icon-btn.primary {
    background: var(--white);
    color: #000;
    border-color: var(--white);
}

.icon-btn.primary.never-hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

#headerTitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.3px;
}

.header-sub {
    font-size: 0.78rem;
    color: var(--text2);
    display: block;
    margin-top: 1px;
}

.pages-wrap {
    flex: 1;
    padding-bottom: 20px;
}

.logged-in .pages-wrap {
    padding-bottom: calc(var(--tab-h) + 20px);
}

/* ===== SLIDER & SCROLLS (INLINE WRAPPED OR FLEX) ===== */
.slider-container {
    width: 100%;
    overflow: hidden;
    border-radius: var(--r-md);
    margin-bottom: 16px;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    height: 120px;
}

.slide {
    min-width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    box-sizing: border-box;
}

.slide h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.slide p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.categories-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 16px 6px;
    margin-bottom: 8px;
}

.disc-pill {
    min-width: 64px !important;
}
.disc-pill .category-icon {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.05rem !important;
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
}
.category-item.active.disc-pill .category-icon {
    background: var(--white) !important;
    color: #000 !important;
    border-color: var(--white) !important;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.35) !important;
}
.disc-pill span {
    width: 64px !important;
    font-size: 0.72rem !important;
    margin-top: 6px !important;
}

.shops-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

/* ===== CATEGORY & SHOP ITEMS ===== */
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 76px;
    padding: 4px 2px;
    border-radius: var(--r-md);
    background: transparent;
    cursor: pointer;
    transition: var(--tr);
}

.shop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 76px;
    padding: 8px;
    border-radius: var(--r-md);
    background: transparent;
    cursor: pointer;
    transition: var(--tr);
}

.category-item.never-hover,
.shop-item.never-hover {
    transform: translateY(-2px);
}

.category-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    transition: var(--tr);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.shop-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    transition: var(--tr);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-item.never-hover .category-icon,
.shop-item.never-hover .shop-avatar {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--card-hover);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.category-item.active .category-icon {
    background: var(--white);
    color: #000;
    border-color: var(--white);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

.category-item span,
.shop-item span {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text2);
    margin-top: 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 76px;
    transition: var(--tr);
}

.category-item.never-hover span,
.shop-item.never-hover span {
    color: var(--white);
}

.category-item.active span {
    color: var(--white);
    font-weight: 600;
}

.page {
    display: none;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

.page.active {
    display: block;
}

.section-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    margin-bottom: 8px;
    padding: 0 4px;
}

/* ===== PRODUCT GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 8px 4px;
}

.product-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--tr);
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.4s ease-out backwards;
}

.product-img {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 5px;
    background: var(--bg2);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-image-placeholder {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
}

.no-image-placeholder.small {
    font-size: 0.72rem;
    letter-spacing: 0.3px;
}

/* ===== QTY SELECTOR & ACTION ROW ===== */
.action-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    width: 100%;
}

.qty-selector {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 3px;
    height: 46px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.qty-selector:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.03);
}

.qty-selector button {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.qty-selector button.never-hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.qty-selector button:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.15);
}

.qty-selector input {
    width: 48px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
    pointer-events: none;
    outline: none;
}

.product-img img {
    border-radius: 8px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.2rem;
    line-height: 1.1rem;
}

.product-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--white);
    margin-top: auto;
}

.product-footer {
    margin-top: 6px;
    font-size: 0.62rem;
    color: var(--text3);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== SCROLLING PRODUCT ROWS ===== */
.products-row-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    overflow: hidden;
    padding: 4px 0;
}

.products-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
    width: 100%;
}

.products-row::-webkit-scrollbar {
    display: none;
}

/* Row 1: large cards (3 visible) */
.product-card-r1 {
    min-width: 140px;
    max-width: 140px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--tr);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    flex-shrink: 0;
}

.product-card-r1.never-hover {
    /* fare uzerine gelince hicbir sey yapmasin */
}

.product-card-r1 .product-img {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    padding: 4px;
}

.product-card-r1 .product-body {
    padding: 8px 10px 10px;
}

.product-card-r1 .product-title {
    font-size: 0.75rem;
    height: auto;
    -webkit-line-clamp: 1;
    line-height: 1.2;
    margin-bottom: 4px;
}

.product-card-r1 .product-price {
    font-size: 0.82rem;
}

.product-card-r1 .product-footer {
    font-size: 0.6rem;
    margin-top: 4px;
    padding-top: 4px;
}

/* Row 2: medium cards (4 visible) */
.product-card-r2 {
    min-width: 115px;
    max-width: 115px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--tr);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    flex-shrink: 0;
}

.product-card-r2.never-hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.product-card-r2 .product-img {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    padding: 3px;
}

.product-card-r2 .product-body {
    padding: 6px 8px 8px;
}

.product-card-r2 .product-title {
    font-size: 0.7rem;
    height: auto;
    -webkit-line-clamp: 1;
    line-height: 1.2;
    margin-bottom: 3px;
}

.product-card-r2 .product-price {
    font-size: 0.75rem;
}

.product-card-r2 .product-footer {
    font-size: 0.55rem;
    margin-top: 3px;
    padding-top: 3px;
}

/* Row 3: small cards (5 visible) */
.product-card-r3 {
    min-width: 92px;
    max-width: 92px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--tr);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    flex-shrink: 0;
}

.product-card-r3.never-hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.product-card-r3 .product-img {
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    padding: 3px;
}

.product-card-r3 .product-body {
    padding: 5px 6px 7px;
}

.product-card-r3 .product-title {
    font-size: 0.62rem;
    height: auto;
    -webkit-line-clamp: 1;
    line-height: 1.2;
    margin-bottom: 2px;
}

.product-card-r3 .product-price {
    font-size: 0.68rem;
}

.product-card-r3 .product-footer {
    font-size: 0.5rem;
    margin-top: 2px;
    padding-top: 2px;
}





/* ===== BOTTOM SHEET ===== */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 80;
    animation: fadeIn 0.2s ease-out;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    width: 100%;
    max-width: 480px;
    background: var(--bg2);
    border: 1px solid var(--border-l);
    border-bottom: none;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding: 12px 24px 32px;
    z-index: 90;
    transform: translateX(-50%) translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.bottom-sheet.open {
    transform: translateX(-50%) translateY(0);
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--text3);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.bottom-sheet h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
}

/* ===== TOAST ===== */
.toast-wrap {
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 95%;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--r-md);
    font-size: 0.9rem;
    font-weight: 600;
    animation: toastIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    width: 100%;
    text-align: center;
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}

.toast-success {
    background: rgba(52, 199, 89, 0.15);
    border: 1px solid rgba(52, 199, 89, 0.25);
    color: #34c759;
}

.toast-error {
    background: rgba(255, 69, 58, 0.15);
    border: 1px solid rgba(255, 69, 58, 0.25);
    color: #ff453a;
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* ===== DESKTOP CENTERING ===== */
@media (min-width: 481px) {
    .app-screen {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
}

/* ===== TAB BAR ===== */
.app-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--tab-h);
    background: rgba(20, 20, 20, 0.92);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 70;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text3);
    font-size: 0.65rem;
    font-weight: 400;
    transition: var(--tr);
    position: relative;
}

.tab.active {
    color: var(--white);
}

.tab.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--white);
    border-radius: 0 0 2px 2px;
}

.tab-icon {
    position: relative;
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
}

.tab-icon svg {
    width: 18px;
    height: 18px;
}

.tab-text {
    letter-spacing: 0.2px;
}

.badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #ff453a;
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--bg);
    z-index: 5;
    padding: 0 3px;
}

/* ===== CART SHEET ITEMS ===== */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-title {
    font-weight: 600;
    color: var(--white);
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--text3);
    margin-top: 2px;
}

.cart-item-actions button {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.cart-total span:first-child {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text2);
}

.cart-total span:last-child {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
}

/* ===== BANK CARD STYLES ===== */
.profile-header.bank-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1.58 / 1;
    border-radius: 20px;
    background: linear-gradient(135deg, #151518 0%, #202028 50%, #111113 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255,255,255,0.12);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    overflow: hidden;
    margin-bottom: 28px;
    text-align: left;
    box-sizing: border-box;
}

.profile-header.bank-card .card-glass {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
    z-index: 1;
}

.profile-header.bank-card .card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    margin-bottom: 4px;
}

.profile-header.bank-card .card-chip {
    display: block;
}

.profile-header.bank-card .card-brand {
    opacity: 0.95;
    display: flex;
    align-items: center;
}

.profile-header.bank-card .card-number-section {
    margin: 6px 0 12px;
    z-index: 2;
}

.profile-header.bank-card .card-number {
    font-family: 'SF Mono', 'Courier New', Courier, monospace;
    font-size: 1.55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    letter-spacing: 3.5px;
    text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.8);
}

.profile-header.bank-card .card-balance-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    z-index: 2;
    margin-top: 8px;
}

.profile-header.bank-card .card-balance-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.profile-header.bank-card .card-balance-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.profile-header.bank-card .card-holder-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    z-index: 2;
}

.profile-header.bank-card .profile-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.profile-header.bank-card .role-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 0;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.settings-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 24px 20px;
}

/* ===== SHOP STATS ===== */
.shop-stats {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 18px;
}

.stat-card {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--white);
    margin-top: 4px;
}

/* ===== SEARCH BAR ===== */
.search-bar {
    margin: 20px 0;
    position: relative;
    width: 100%;
}

.search-bar input {
    width: 100%;
    height: 48px;
    padding: 12px 16px 12px 46px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: var(--white);
    font-size: 0.92rem;
    font-weight: 500;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.search-bar input:focus {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.02);
    transform: translateY(-1px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}

.header-search-wrap {
    margin-top: 12px;
    animation: slideDownSearch 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    width: 100%;
}

@keyframes slideDownSearch {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-search-wrap .search-bar {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.header-search-wrap .search-bar input {
    flex: 1;
}

.search-close-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--tr);
}

.search-close-btn.never-hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.search-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   ORDER STATUS TIMELINE
   ============================================ */
.order-timeline {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 0 16px; /* Bottom padding for absolute step labels */
    flex: 1;
    height: 20px;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 20px;
    height: 20px;
}

.step-dot {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
}

/* Tiny bullet dot for inactive state, no outer borders */
.step-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text3);
    transition: all 0.3s ease;
}

.step-dot svg {
    position: absolute;
    width: 12px;
    height: 12px;
    stroke-width: 4px;
    stroke: var(--text3);
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.3s ease;
}

.timeline-step.active .step-dot::before {
    opacity: 0;
    transform: scale(0);
}

.timeline-step.active .step-dot svg {
    opacity: 1;
    transform: scale(1);
    stroke: #30d158;
    filter: drop-shadow(0 0 4px rgba(48, 209, 88, 0.4));
}

.step-label {
    position: absolute;
    top: 24px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text2);
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Align labels relative to their step dot positions */
.timeline-step:first-child .step-label {
    left: 0;
}
.timeline-step:last-child .step-label {
    right: 0;
}
.timeline-step:not(:first-child):not(:last-child) .step-label {
    left: 50%;
    transform: translateX(-50%);
}

.timeline-step.active .step-label {
    color: var(--white);
}

.timeline-line {
    flex: 1;
    height: 2px;
    border-top: 2px dashed var(--border-l);
    z-index: 1;
}

.timeline-line.active {
    border-top-style: solid;
    border-top-color: #30d158;
}

/* ===== CUSTOM SELECT DROPDOWN ===== */
.custom-address-option.never-hover {
    background: rgba(255, 255, 255, 0.04) !important;
}
.custom-address-option.selected {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--white) !important;
}

/* ============================================
   RTL SUPPORT (Dari / فارسی)
   ============================================ */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .auth-footer {
    text-align: right;
}

html[dir="rtl"] .profile-header.bank-card {
    text-align: right;
}

html[dir="rtl"] .profile-header.bank-card .card-balance-section {
    align-items: flex-end;
    text-align: left !important;
}

html[dir="rtl"] .profile-header.bank-card .card-number,
html[dir="rtl"] .profile-header.bank-card .card-number-section {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="rtl"] .profile-header.bank-card .card-holder-section {
    direction: ltr;
}

html[dir="rtl"] .profile-header.bank-card .profile-name {
    text-align: left;
}


html[dir="rtl"] .form-group select {
    background-position: left 22px center;
    padding-right: 16px;
    padding-left: 48px;
}

html[dir="rtl"] .search-bar input {
    padding: 12px 46px 12px 16px;
    background-position: right 16px center;
}

html[dir="rtl"] .search-bar input:focus {
    background-position: right 16px center;
}

html[dir="rtl"] .badge {
    right: auto;
    left: -8px;
}

html[dir="rtl"] .timeline-step:first-child .step-label {
    left: auto;
    right: 0;
}

html[dir="rtl"] .timeline-step:last-child .step-label {
    right: auto;
    left: 0;
}

.fab {
    position: fixed;
    bottom: calc(var(--tab-h) + 24px);
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--white);
    color: #000;
    font-size: 2rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: var(--tr);
    z-index: 60;
    line-height: 1;
    border: none;
    cursor: pointer;
}

.fab:active {
    transform: scale(0.9);
}

html[dir="rtl"] .fab {
    right: auto;
    left: 20px;
}

@media (min-width: 480px) {
    .fab {
        right: calc((100vw - 480px) / 2 + 20px);
    }
    html[dir="rtl"] .fab {
        right: auto;
        left: calc((100vw - 480px) / 2 + 20px);
    }
}

html[dir="rtl"] .section-title {
    text-align: right;
}

/* Force LTR display for price formatting to keep currency symbol on the right */
.product-price,
.cart-item-price,
.card-balance,
.card-balance-value,
.stat-value {
    direction: ltr !important;
    unicode-bidi: isolate;
}