/* ============================================================
   استایل‌های اصلی فروشگاه آرمال شاپ
   ============================================================ */

:root {
    --primary: #1a1a1a;
    --primary-dark: #000;
    --secondary: #666;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #e67e22;
    --info: #2980b9;
    --bg-light: #f4f4f4;
    --bg-card: rgba(255, 255, 255, 0.7);
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    --transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

button{
    font-family:inherit;
}

select{
    font-family:inherit;
}


input{
    font-family:inherit;
}

textarea{
    font-family:inherit;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir';
    background: var(--bg-light);
    color: var(--primary);
    direction: rtl;
    font-size: 15px;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
}

.header .left-icon,
.header .right-icon {
    flex-shrink: 0;
}
.header .left-icon a,
.header .right-icon a {
    color: #1a1a1a;
    font-size: 22px;
    transition: 0.2s;
    opacity: 0.8;
    line-height: 1;
    cursor: pointer;
}
.header .left-icon a:hover,
.header .right-icon a:hover {
    opacity: 1;
}

.header .logo {
    font-size: 18px;
    font-weight: 900;
    color: #1a1a1a;
    cursor: default;
    min-width: 90px;
    text-align: center;
    position: relative;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.header .logo .brand-main,
.header .logo .brand-sub {
    font-size: 18px;
    font-weight: 900;
    color: #1a1a1a;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    width: 100%;
    text-align: center;
}
.header .logo .brand-main {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.header .logo .brand-sub {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
}
.header .logo .brand-main span {
    font-weight: 300;
    color: #666;
}
.header .logo.state-alt .brand-main {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
}
.header .logo.state-alt .brand-sub {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ===== STORIES ===== */
.stories-wrapper {
    padding: 12px 0 4px;
}
.stories-scroll {
    display: flex;
    gap: 14px;
    padding: 0 0 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.stories-scroll::-webkit-scrollbar {
    display: none;
}
.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    gap: 4px;
    cursor: pointer;
}
.story-item .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 0, 0, 0.1);
    padding: 2px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: 0.25s;
}
.story-item .avatar:hover {
    border-color: #000;
    transform: scale(1.02);
}
.story-item span {
    font-size: 11px;
    font-weight: 600;
    color: #222;
}

/* ===== HERO BUTTONS ===== */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 6px 0 14px;
    max-width: 420px;
    margin: 0 auto;
}
.hero-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    border-radius: 60px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 50%;
}
.hero-btn i {
    font-size: 16px;
}
.hero-btn-primary {
    background: #1a1a1a;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.hero-btn-primary:hover {
    background: #333;
    transform: translateY(-3px) scale(1.02);
}
.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    color: #1a1a1a;
    border: 2px solid rgba(0, 0, 0, 0.15);
}
.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-3px) scale(1.02);
}

/* ===== CATEGORIES ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 4px 0 14px;
}
.cat-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 12px 4px 10px;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
}
.cat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.cat-card img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
    margin: 0 auto 4px;
}
.cat-card span {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    display: block;
}
.cat-card .sub-label {
    font-size: 9px;
    font-weight: 400;
    color: #888;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 0 8px;
}
.section-header h3 {
    font-size: 17px;
    font-weight: 900;
    color: #1a1a1a;
}
.section-header a {
    font-size: 12px;
    color: #777;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.section-header a:hover {
    color: #000;
}
.section-header a i {
    font-size: 10px;
}

/* ===== PRODUCTS ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 4px 0 12px;
}

.product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    overflow: hidden;
    transition: 0.35s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}
.product-card .discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    z-index: 5;
}
.product-card .discount-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-card .product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #eaeaea;
    object-fit: cover;
    display: block;
}
.product-card .product-info {
    padding: 10px 12px 14px;
}
.product-card .product-title {
    font-weight: 800;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 2px;
    color: #1a1a1a;
}
.product-card .product-origin {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.product-card .product-origin i {
    font-size: 11px;
}
.product-card .product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.product-card .product-price .current {
    font-size: 17px;
    font-weight: 900;
    color: #1a1a1a;
}
.product-card .product-price .old {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
}
.product-card .product-price .discount {
    background: #1a1a1a;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 40px;
}
.product-card .out-of-stock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    padding: 6px 20px;
    border-radius: 40px;
    z-index: 10;
}

/* ===== BRANDS ===== */
.brands-section {
    margin: 6px 0 12px;
    padding: 16px 14px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.brands-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2px 14px;
}
.brands-header h4 {
    font-size: 16px;
    font-weight: 900;
    color: #1a1a1a;
}
.brands-header a {
    font-size: 12px;
    color: #777;
    font-weight: 500;
    cursor: pointer;
}
.brands-header a:hover {
    color: #000;
}
.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.brand-item {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    padding: 12px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    min-height: 70px;
}
.brand-item:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.brand-item img {
    width: 75%;
    height: 75%;
    object-fit: contain;
}

/* ===== CATEGORIES FULL ===== */
.categories-grid-full {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 8px;
}
.categories-grid-full .cat-item {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    padding: 20px 8px;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
}
.categories-grid-full .cat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}
.categories-grid-full .cat-item span {
    font-size: 13px;
    font-weight: 600;
    display: block;
}
.categories-grid-full .cat-item .count {
    font-size: 11px;
    color: #999;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 480px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}
.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 9px;
    color: #888;
    cursor: pointer;
    transition: 0.25s;
    padding: 3px 8px;
    border-radius: 40px;
    gap: 1px;
    min-width: 40px;
    position: relative;
}
.bottom-nav .nav-item i {
    font-size: 20px;
    color: #555;
    transition: 0.25s;
}
.bottom-nav .nav-item.active {
    background: rgba(0, 0, 0, 0.04);
}
.bottom-nav .nav-item.active i,
.bottom-nav .nav-item.active span {
    color: #1a1a1a;
    font-weight: 700;
}
.bottom-nav .nav-item span {
    font-size: 9px;
    font-weight: 500;
    color: #888;
}
.bottom-nav .nav-item .nav-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    line-height: 1.3;
    display: none;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active {
    display: flex;
}
.modal-content {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 32px;
    max-width: 860px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.12);
    padding: 28px 32px 24px;
}
.modal-content.small {
    max-width: 500px;
}
.modal-content.xlarge {
    max-width: 700px;
}
.modal-content::-webkit-scrollbar {
    width: 4px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}
.modal-close {
    position: sticky;
    top: 0;
    float: left;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    color: #1a1a1a;
    font-size: 17px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}
.modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}
.modal-title {
    font-size: 20px;
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 16px;
    text-align: center;
}

/* ===== MODAL: PRODUCT ===== */
.modal-product-grid {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 28px;
    align-items: start;
}
.modal-product-image-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    order: 2;
}
.modal-product-image {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.modal-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.modal-product-image .discount-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 14px;
    border-radius: 40px;
}
.modal-product-barcode {
    font-size: 12px;
    color: #999;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px 16px;
    border-radius: 40px;
    font-family: 'Courier New', monospace;
    direction: ltr;
}
.modal-product-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    order: 1;
}
.modal-product-title {
    font-size: 21px;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.3;
}
.modal-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 13px;
    color: #666;
}
.modal-product-meta .item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.modal-product-meta .item i {
    font-size: 13px;
    color: #aaa;
    width: 16px;
}
.modal-product-meta .item .label {
    color: #999;
}
.modal-product-meta .item .value {
    color: #1a1a1a;
    font-weight: 600;
}
.modal-product-price-stock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
    padding: 12px 18px;
}
.modal-product-price-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.modal-product-price-box .current {
    font-size: 24px;
    font-weight: 900;
    color: #1a1a1a;
}
.modal-product-price-box .old {
    font-size: 15px;
    color: #bbb;
    text-decoration: line-through;
}
.modal-product-price-box .discount {
    background: #e74c3c;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 14px;
    border-radius: 40px;
}
.modal-product-stock {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    white-space: nowrap;
}
.modal-product-stock.in {
    color: #27ae60;
}
.modal-product-stock.low {
    color: #e67e22;
}
.modal-product-stock.out {
    color: #e74c3c;
}
.modal-product-description {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    padding: 10px 0 2px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.modal-product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.modal-product-badges .badge {
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 12px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}
.modal-product-badges .badge i {
    font-size: 12px;
    color: #27ae60;
}
.modal-product-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}
.modal-product-quantity label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}
.modal-product-quantity .qty-control {
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 40px;
    overflow: hidden;
}
.modal-product-quantity .qty-control button {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
}
.modal-product-quantity .qty-control button:hover {
    background: rgba(0, 0, 0, 0.1);
}
.modal-product-quantity .qty-control input {
    width: 50px;
    height: 36px;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    background: transparent;
    color: #1a1a1a;
}
.modal-product-quantity .qty-control input:focus {
    outline: none;
}
.modal-product-actions .btn-primary {
    width: 100%;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 60px;
    padding: 13px 0;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.modal-product-actions .btn-primary:hover:not(:disabled) {
    background: #333;
    transform: scale(0.98);
}
.modal-product-actions .btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.modal-product-actions .btn-primary.out-of-stock {
    background: #e74c3c;
}
.modal-product-reviews {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 16px;
    margin-top: 6px;
}
.modal-product-reviews .reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.modal-product-reviews .reviews-header .title {
    font-size: 14px;
    font-weight: 800;
}
.modal-product-reviews .reviews-header .rating-summary {
    font-size: 13px;
    color: #666;
}
.modal-product-reviews .reviews-header .rating-summary .stars {
    color: #f5a623;
    letter-spacing: 1px;
}
.modal-product-reviews .reviews-header .rating-summary .count {
    color: #999;
}
.review-item {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}
.review-item .review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}
.review-item .review-top .reviewer {
    font-weight: 700;
    font-size: 14px;
}
.review-item .review-top .review-date {
    font-size: 12px;
    color: #bbb;
}
.review-item .review-stars {
    color: #f5a623;
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.review-item .review-text {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

/* ===== MODAL: LOGIN (OTP) ===== */
.login-otp-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.login-otp-container .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.login-otp-container .form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}
.login-otp-container .form-group input {
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    transition: 0.2s;
    color: #1a1a1a;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
}
.login-otp-container .form-group input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}
.login-otp-container .btn-login {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 60px;
    padding: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}
.login-otp-container .btn-login:hover {
    background: #333;
}
.login-otp-container .otp-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr;
}
.login-otp-container .otp-row input {
    width: 56px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.5);
    transition: 0.2s;
    color: #1a1a1a;
}
.login-otp-container .otp-row input:focus {
    outline: none;
    border-color: #1a1a1a;
}
.login-status {
    text-align: center;
    padding: 10px;
    border-radius: 12px;
    font-weight: 600;
    display: none;
}
.login-status.success {
    display: block;
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}
.login-status.error {
    display: block;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* ===== MODAL: SEARCH ===== */
.search-input-wrap {
    position: relative;
}
.search-input-wrap input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border-radius: 60px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    transition: 0.3s;
    color: #1a1a1a;
}
.search-input-wrap input:focus {
    outline: none;
    border-color: #1a1a1a;
}
.search-input-wrap i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 18px;
}
.search-results {
    margin-top: 16px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}
.search-results.show {
    display: block;
}
.search-results .search-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    transition: 0.2s;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.search-results .search-item:hover {
    background: rgba(0, 0, 0, 0.03);
}
.search-results .search-item img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: #f0f0f0;
}
.search-results .search-item .info .title {
    font-weight: 700;
    font-size: 14px;
}
.search-results .search-item .info .price {
    font-size: 13px;
    color: #888;
}
.search-no-result {
    text-align: center;
    padding: 30px 0;
    color: #999;
    display: none;
}
.search-no-result.show {
    display: block;
}

/* ===== MODAL: CART ===== */
.cart-item-list {
    max-height: 250px;
    overflow-y: auto;
}
.cart-item-list .cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.cart-item-list .cart-item img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: #f0f0f0;
}
.cart-item-list .cart-item .info {
    flex: 1;
}
.cart-item-list .cart-item .info .title {
    font-weight: 700;
    font-size: 14px;
}
.cart-item-list .cart-item .info .price {
    font-size: 13px;
    color: #888;
}
.cart-item-list .cart-item .qty {
    font-weight: 700;
    font-size: 14px;
}
.cart-item-list .cart-item .remove {
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: 0.2s;
}
.cart-item-list .cart-item .remove:hover {
    transform: scale(1.1);
}
.cart-summary {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
    padding: 16px 18px;
}
.cart-summary .row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 4px 0;
    color: #555;
}
.cart-summary .row .label {
    color: #888;
}
.cart-summary .row .value {
    font-weight: 600;
}
.cart-wizard .btn-primary {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 60px;
    padding: 13px 0;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}
.cart-wizard .btn-primary:hover {
    background: #333;
}

/* ===== MODAL: PROFILE ===== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.profile-header .avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    flex-shrink: 0;
}
.profile-header .info .name {
    font-size: 18px;
    font-weight: 900;
}
.profile-header .info .level {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}
.profile-header .info .level .badge {
    background: #f5a623;
    color: #fff;
    padding: 2px 12px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 700;
}
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.profile-stats .stat {
    text-align: center;
}
.profile-stats .stat .num {
    font-size: 20px;
    font-weight: 900;
    color: #1a1a1a;
}
.profile-stats .stat .label {
    font-size: 12px;
    color: #999;
}
.profile-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 0;
}
.profile-menu .item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: 0.2s;
    cursor: pointer;
}
.profile-menu .item:hover {
    background: rgba(0, 0, 0, 0.02);
}
.profile-menu .item i {
    font-size: 18px;
    color: #555;
    width: 24px;
    text-align: center;
}
.profile-menu .item .label {
    font-size: 14px;
    font-weight: 500;
}
.profile-wallet {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.profile-wallet .balance {
    font-size: 22px;
    font-weight: 900;
    color: #1a1a1a;
}
.profile-wallet .balance small {
    font-size: 14px;
    color: #888;
    font-weight: 400;
}
.profile-wallet .btn-charge {
    padding: 8px 24px;
    border-radius: 60px;
    border: none;
    background: #1a1a1a;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.profile-wallet .btn-charge:hover {
    background: #333;
}

/* ===== MODAL: CONTACT ===== */
.contact-phone {
    text-align: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    direction: ltr;
}
.contact-phone i {
    margin-left: 8px;
    color: #27ae60;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: #1a1a1a;
}
.contact-item:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}
.contact-item .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.contact-item .icon.whatsapp {
    background: #25D366;
    color: #fff;
}
.contact-item .icon.telegram {
    background: #0088cc;
    color: #fff;
}
.contact-item .icon.bale {
    background: #4A7CB2;
    color: #fff;
}
.contact-item .icon.robika {
    background: #8B5CF6;
    color: #fff;
}
.contact-item .info .name {
    font-weight: 700;
    font-size: 14px;
}
.contact-item .info .number {
    font-size: 13px;
    color: #888;
    direction: ltr;
}

/* ===== MODAL: WHOLESALE ===== */
.wholesale-content {
    text-align: center;
    padding: 8px 0;
}
.wholesale-content .icon {
    font-size: 48px;
    color: #1a1a1a;
}
.wholesale-content .desc {
    font-size: 15px;
    color: #555;
    margin-top: 12px;
}
.wholesale-content .phone-box {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
    padding: 16px;
    margin-top: 16px;
}
.wholesale-content .phone-box .phone {
    font-size: 20px;
    font-weight: 900;
    direction: ltr;
}
.wholesale-content .phone-box .phone i {
    color: #27ae60;
}
.wholesale-content .phone-box .ext {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
}
.wholesale-content .contact-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.wholesale-content .contact-row .contact-item {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

/* ===== MODAL: TRACK ===== */
.track-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.track-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.track-form .form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}
.track-form .form-group input {
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    transition: 0.2s;
    color: #1a1a1a;
}
.track-form .form-group input:focus {
    outline: none;
    border-color: #1a1a1a;
}
.track-form .btn-track {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 60px;
    padding: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}
.track-form .btn-track:hover {
    background: #333;
}
.track-result {
    margin-top: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.15);
    display: none;
}
.track-result.show {
    display: block;
}
.track-result .status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #27ae60;
}
.track-result .status i {
    font-size: 20px;
}
.track-result .details {
    margin-top: 8px;
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 92%;
    pointer-events: none;
}
.toast {
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 12px 24px;
    border-radius: 60px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: translateY(20px) scale(0.92);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.toast.success {
    background: rgba(39, 174, 96, 0.92);
}
.toast.error {
    background: rgba(231, 76, 60, 0.92);
}
.toast.warning {
    background: rgba(241, 196, 15, 0.92);
    color: #1a1a1a;
}
.toast i {
    font-size: 18px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .modal-product-grid {
        grid-template-columns: 1fr 180px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .categories-grid-full {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    .profile-menu {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .modal-product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .modal-product-image-wrap {
        order: 0;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    .modal-product-image {
        max-width: 150px;
    }
    .modal-content {
        padding: 20px 16px 18px;
        border-radius: 24px;
    }
    .modal-product-title {
        font-size: 18px;
    }
    .modal-product-meta {
        font-size: 12px;
        gap: 4px 12px;
    }
    .modal-product-price-stock {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .modal-product-price-box .current {
        font-size: 21px;
    }
    .modal-product-actions .btn-primary {
        font-size: 14px;
        padding: 11px 0;
    }
    .bottom-nav {
        width: calc(100% - 16px);
        padding: 8px 8px;
        border-radius: 40px;
        bottom: 10px;
    }
    .bottom-nav .nav-item {
        padding: 2px 6px;
        min-width: 36px;
    }
    .bottom-nav .nav-item i {
        font-size: 18px;
    }
    .bottom-nav .nav-item span {
        font-size: 8px;
    }
    .header .logo {
        font-size: 16px;
        min-width: 80px;
        height: 26px;
    }
    .header .logo .brand-main,
    .header .logo .brand-sub {
        font-size: 16px;
    }
    .header .left-icon a,
    .header .right-icon a {
        font-size: 20px;
    }
    .login-otp-container .otp-row input {
        width: 44px;
        height: 50px;
        font-size: 20px;
    }
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    .cat-card {
        padding: 8px 2px 6px;
        border-radius: 12px;
    }
    .cat-card img {
        width: 30px;
        height: 30px;
    }
    .cat-card span {
        font-size: 10px;
    }
    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .brand-item {
        min-height: 50px;
        padding: 8px 4px;
    }
    .categories-grid-full {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        padding: 16px 12px 14px;
    }
    .modal-product-image {
        max-width: 120px;
    }
    .login-otp-container .otp-row input {
        width: 38px;
        height: 44px;
        font-size: 18px;
    }
    .bottom-nav .nav-item i {
        font-size: 16px;
    }
    .bottom-nav .nav-item span {
        font-size: 7px;
    }
}