/* ============================================================
   ============ ریست و متغیرها ================================
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

:root {
    --amazon-dark: #131921;
    --amazon-navy: #232f3e;
    --amazon-orange: #ff9900;
    --amazon-yellow: #febd69;
    --amazon-yellow-hover: #f3a847;
    --amazon-teal: #007185;
    --amazon-bg: #eaeded;
    --amazon-red: #b12704;
    --amazon-green: #007600;
    --border: #e5e7eb;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }

body {
    background: var(--amazon-bg);
    color: #0f1111;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   ============ هدر ===========================================
   ============================================================ */
.site-header {
    background: var(--amazon-dark);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-top {
    padding: 8px 0;
}

.header-top .container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* لوگو */
.logo {
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: border-color 0.15s;
    white-space: nowrap;
}

.logo:hover { border-color: white; }

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.logo-domain { color: var(--amazon-orange); }

/* موقعیت */
.location {
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    transition: border-color 0.15s;
}

.location:hover { border-color: white; }

.location .small {
    font-size: 11px;
    color: #ccc;
    line-height: 1.2;
}

.location .bold {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

/* نوار جستجو */
.search-box {
    flex: 1;
    display: flex;
    height: 42px;
    min-width: 200px;
    border-radius: 5px;
    transition: box-shadow 0.2s;
    position: relative;
    overflow: visible;
}

.search-box:focus-within {
    box-shadow: 0 0 0 3px var(--amazon-orange);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
    font-family: inherit;
    border-radius: 5px 0 0 5px;
}

.search-box button {
    background: var(--amazon-yellow);
    width: 50px;
    font-size: 18px;
    transition: background 0.15s;
    border-radius: 0 5px 5px 0;
}

.search-box button:hover { background: var(--amazon-yellow-hover); }

/* حساب کاربری */
.header-account {
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    transition: border-color 0.15s;
    background: transparent;
    color: white;
    text-align: right;
}

.header-account:hover { border-color: white; }

.header-account .small {
    font-size: 11px;
    color: #ccc;
    line-height: 1.2;
}

.header-account .bold {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

/* سبد خرید */
.header-cart {
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    transition: border-color 0.15s;
    background: transparent;
    color: white;
}

.header-cart:hover { border-color: white; }

.cart-icon {
    font-size: 26px;
    position: relative;
    line-height: 1;
}

.cart-count {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--amazon-orange);
    color: var(--amazon-dark);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
    transition: transform 0.2s;
}

.cart-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

/* نوار ناوبری */
.main-nav {
    background: var(--amazon-navy);
}

.main-nav .container {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    padding: 6px 20px;
    scrollbar-width: none;
}

.main-nav .container::-webkit-scrollbar { display: none; }

.nav-all-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: border-color 0.15s;
    background: transparent;
}

.nav-all-menu:hover { border-color: white; }

.hamburger {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
}

.hamburger span {
    width: 16px;
    height: 2px;
    background: white;
}

.nav-link {
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    white-space: nowrap;
    transition: border-color 0.15s;
}

.nav-link:hover { border-color: white; }

/* ============================================================
   ============ نوار اعلان ====================================
   ============================================================ */
.announcement-bar {
    background: var(--amazon-navy);
    color: white;
    text-align: center;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================================
   ============ Breadcrumb ====================================
   ============================================================ */
.breadcrumb-bar {
    background: white;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb-bar .container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    flex-wrap: wrap;
}

.breadcrumb-bar a {
    color: var(--amazon-teal);
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.breadcrumb-bar a:hover {
    background: #f0f8fa;
    text-decoration: underline;
}

.breadcrumb-bar .current {
    color: #333;
    font-weight: 700;
}

.breadcrumb-bar span:not(.current) { color: #999; }

/* ============================================================
   ============ اسلایدر =======================================
   ============================================================ */
.hero {
    padding: 0;
    background: transparent;
    position: relative;
}

.slider-wrap {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    color: white;
    text-align: center;
    padding: 0 20px;
}

.slide.active { opacity: 1; }

.slide-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.slide-content h1 {
    font-size: 46px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.35);
    font-weight: 700;
}

.slide-content p {
    font-size: 20px;
    margin-bottom: 25px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.35);
    opacity: 0.95;
}

.slide-btn {
    display: inline-block;
    background: white;
    color: var(--amazon-dark);
    padding: 14px 38px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.slide-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.25);
    color: white;
    font-size: 32px;
    width: 52px;
    height: 80px;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(6px);
    transition: background 0.2s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover { background: rgba(255,255,255,0.45); }
.slider-btn.prev { right: 15px; }
.slider-btn.next { left: 15px; }

.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.dot.active {
    background: white;
    transform: scale(1.4);
    box-shadow: 0 0 12px rgba(255,255,255,0.8);
}

/* ============================================================
   ============ محصولات ویژه ==================================
   ============================================================ */
.featured-products {
    padding: 50px 0 70px;
}

.featured-products h2 {
    font-size: 26px;
    margin-bottom: 30px;
    color: #0f1111;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--amazon-orange);
    display: inline-block;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    padding: 15px;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-card .product-img {
    width: 100%;
    aspect-ratio: 1;
    background: #f7f7f7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 14px;
}

.product-card .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-img img {
    transform: scale(1.08);
}

.product-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0f1111;
    line-height: 1.4;
}

.product-card .price {
    font-size: 17px;
    font-weight: 700;
    color: var(--amazon-red);
    margin-top: auto;
}

.product-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--amazon-red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ============================================================
   ============ تخفیف‌ها ======================================
   ============================================================ */
.deal-section {
    padding: 50px 0;
}

.deal-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.deal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.deal-header h2 { font-size: 24px; color: #0f1111; }

.see-all {
    color: var(--amazon-teal);
    font-size: 14px;
    font-weight: 600;
}

.see-all:hover { text-decoration: underline; }

.deal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

.deal-item {
    text-align: center;
    transition: transform 0.25s;
    padding: 12px;
    border-radius: 10px;
}

.deal-item:hover {
    transform: translateY(-4px);
    background: #fff8ef;
}

.deal-icon {
    font-size: 60px;
    margin-bottom: 10px;
    line-height: 1;
}

.deal-badge {
    display: inline-block;
    background: var(--amazon-red);
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.deal-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.deal-prices {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.deal-old {
    color: #888;
    text-decoration: line-through;
    font-size: 12px;
}

.deal-new {
    color: var(--amazon-red);
    font-weight: 700;
    font-size: 15px;
}

/* ============================================================
   ============ دسته‌بندی‌های بصری ============================
   ============================================================ */
.category-section { padding: 20px 0 50px; }

.category-card {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: var(--shadow);
}

.category-card h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #0f1111;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 22px;
}

.cat-item {
    text-align: center;
    transition: transform 0.25s;
    padding: 10px;
    border-radius: 10px;
}

.cat-item:hover {
    transform: translateY(-5px);
    background: #fff8ef;
}

.cat-icon {
    width: 100px;
    height: 100px;
    background: #f7f7f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 45px;
    margin: 0 auto 12px;
    transition: background 0.25s, transform 0.25s;
}

.cat-item:hover .cat-icon {
    background: var(--amazon-yellow);
    transform: scale(1.08);
}

.cat-item p {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* ============================================================
   ============ خبرنامه ======================================
   ============================================================ */
.newsletter {
    background: linear-gradient(135deg, var(--amazon-navy) 0%, #37475a 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-top: 40px;
}

.newsletter h2 { font-size: 28px; margin-bottom: 12px; }
.newsletter p { font-size: 15px; color: #ddd; margin-bottom: 25px; }

.newsletter-form {
    display: flex;
    max-width: 520px;
    margin: 0 auto;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.newsletter-form button {
    background: var(--amazon-orange);
    color: var(--amazon-dark);
    padding: 15px 32px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.15s;
}

.newsletter-form button:hover { background: var(--amazon-yellow-hover); }

/* ============================================================
   ============ فوتر =========================================
   ============================================================ */
.site-footer {
    background: var(--amazon-navy);
    color: white;
    margin-top: 60px;
}

.footer-top {
    background: #37475a;
    text-align: center;
    padding: 18px;
    transition: background 0.15s;
    display: block;
}

.footer-top:hover { background: #485769; }
.footer-top a { color: white; font-size: 14px; font-weight: 600; }

.footer-main { padding: 50px 0; }

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-col h3 { font-size: 16px; margin-bottom: 18px; color: white; }

.footer-col a {
    display: block;
    color: #ddd;
    font-size: 13px;
    padding: 6px 0;
    transition: color 0.15s, padding-right 0.15s;
}

.footer-col a:hover {
    color: white;
    padding-right: 5px;
    text-decoration: underline;
}

.footer-bottom {
    background: var(--amazon-dark);
    text-align: center;
    padding: 25px 20px;
    font-size: 13px;
    color: #ddd;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ============================================================
   ============ دکمه بازگشت به بالا ==========================
   ============================================================ */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--amazon-orange);
    color: white;
    border: none;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 200;
}

.back-to-top-btn.show { opacity: 1; visibility: visible; }
.back-to-top-btn:hover { background: var(--amazon-yellow-hover); transform: translateY(-3px); }

/* ============================================================
   ============ صفحه محصول ====================================
   ============================================================ */
.product-page { padding: 30px 0 60px; }

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    border-radius: 12px;
    padding: 35px;
    box-shadow: var(--shadow);
}

.product-gallery { display: flex; flex-direction: column; gap: 15px; }

.gallery-main {
    width: 100%;
    aspect-ratio: 1;
    background: #f9f9f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
}

.gallery-main img { width: 100%; height: 100%; object-fit: contain; }

.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }

.gallery-thumbs .thumb {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.gallery-thumbs .thumb:hover { border-color: var(--amazon-orange); transform: scale(1.05); }

.product-info { display: flex; flex-direction: column; gap: 20px; }

.product-title { font-size: 28px; font-weight: 700; color: #0f1111; line-height: 1.3; }

.product-rating { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.product-rating .stars { color: var(--amazon-orange); font-size: 18px; letter-spacing: 2px; }
.product-rating .rating-text { color: var(--amazon-teal); }

.product-price-box {
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    border-radius: 12px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid var(--border);
}

.discount-badge {
    display: inline-block;
    background: var(--amazon-red);
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 4px;
    align-self: flex-start;
}

.old-price { color: #888; font-size: 15px; }
.old-price del { text-decoration: line-through; }

.current-price { display: flex; align-items: baseline; gap: 8px; }
.price-value { font-size: 34px; font-weight: 700; color: var(--amazon-red); }
.price-currency { font-size: 16px; color: #555; font-weight: 600; }

.product-stock { font-size: 15px; }
.in-stock { color: var(--amazon-green); font-weight: 600; }
.out-of-stock { color: var(--amazon-red); font-weight: 600; }

.product-description {
    color: #333;
    font-size: 15px;
    line-height: 1.9;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.product-features h3 { font-size: 17px; margin-bottom: 12px; color: #0f1111; }
.product-features ul { list-style: none; padding: 0; }

.product-features li {
    padding: 10px 0;
    padding-right: 28px;
    position: relative;
    font-size: 14px;
    color: #333;
    border-bottom: 1px dashed #eee;
}

.product-features li:last-child { border-bottom: none; }
.product-features li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--amazon-green);
    font-weight: 700;
    font-size: 16px;
}

.product-actions { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }

.btn-add-to-cart, .btn-buy-now {
    flex: 1;
    min-width: 180px;
    padding: 16px 20px;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-add-to-cart { background: var(--amazon-yellow); color: var(--amazon-dark); }
.btn-add-to-cart:hover { background: var(--amazon-yellow-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,153,0,0.3); }
.btn-buy-now { background: var(--amazon-orange); color: var(--amazon-dark); }
.btn-buy-now:hover { background: #e88a00; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,153,0,0.4); }

/* ============================================================
   ============ صفحه دسته‌بندی ================================
   ============================================================ */
.category-page { padding: 30px 0 60px; }

.category-title {
    font-size: 32px;
    font-weight: 700;
    color: #0f1111;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--amazon-orange);
    display: inline-block;
}

.category-page .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.empty-state h3 { font-size: 22px; color: #333; margin: 20px 0 10px; }
.empty-state p { color: #777; margin-bottom: 25px; font-size: 15px; }

.btn-back-home {
    display: inline-block;
    background: var(--amazon-yellow);
    color: var(--amazon-dark);
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-back-home:hover {
    background: var(--amazon-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255,153,0,0.3);
}

/* ============================================================
   ============ پنل‌های کشویی =================================
   ============================================================ */
.side-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 400px;
    max-width: 92%;
    background: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.side-panel.from-left { left: 0; transform: translateX(-100%); box-shadow: 5px 0 30px rgba(0,0,0,0.15); }
.side-panel.from-left.open { transform: translateX(0); }
.side-panel.from-right { right: 0; transform: translateX(100%); box-shadow: -5px 0 30px rgba(0,0,0,0.15); }
.side-panel.from-right.open { transform: translateX(0); }

.panel-header {
    background: var(--amazon-navy);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 2;
}

.panel-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }

.panel-count {
    background: var(--amazon-orange);
    color: var(--amazon-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 12px;
    min-width: 22px;
    text-align: center;
}

.panel-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.panel-close:hover { background: rgba(255,255,255,0.15); }

.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

.panel-footer {
    background: #f9f9f9;
    border-top: 2px solid var(--border);
    padding: 18px 20px;
    flex-shrink: 0;
}

/* ============================================================
   ============ سبد خرید =====================================
   ============================================================ */
.cart-items { padding: 12px 20px; }

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 20px;
    text-align: center;
    color: #666;
}

.cart-empty .empty-icon { font-size: 80px; opacity: 0.3; margin-bottom: 20px; }
.cart-empty h3 { font-size: 18px; color: #333; margin-bottom: 8px; }
.cart-empty p { font-size: 14px; margin-bottom: 25px; }

.btn-empty-close {
    background: var(--amazon-yellow);
    color: var(--amazon-dark);
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-empty-close:hover { background: var(--amazon-yellow-hover); transform: translateY(-2px); }

.cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}

.cart-item:last-child { border-bottom: none; }

.cart-item-icon {
    width: 60px;
    height: 60px;
    background: #f7f7f7;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f1111;
    margin-bottom: 6px;
    line-height: 1.3;
}

.cart-item-price { font-size: 14px; color: var(--amazon-red); font-weight: 700; margin-bottom: 8px; }

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: white;
}

.qty-btn {
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: #555;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.qty-btn:hover { background: var(--amazon-yellow); color: var(--amazon-dark); }

.qty-value {
    padding: 0 14px;
    font-size: 14px;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    transition: color 0.15s, background 0.15s;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    line-height: 1;
}

.cart-item-remove:hover { color: var(--amazon-red); background: #fee; }

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 16px;
}

.cart-total .label { font-weight: 600; color: #333; }
.cart-total .amount { color: var(--amazon-red); font-weight: 700; font-size: 20px; }

.checkout-btn {
    width: 100%;
    background: var(--amazon-yellow);
    color: var(--amazon-dark);
    border: none;
    padding: 15px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.checkout-btn:hover {
    background: var(--amazon-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255,153,0,0.3);
}

/* ============================================================
   ============ منوی درختی ===================================
   ============================================================ */
#allMenuPanel .breadcrumb-bar {
    background: #f3f3f3;
    padding: 12px 20px;
    font-size: 12px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    white-space: nowrap;
}

#allMenuPanel .breadcrumb-bar::-webkit-scrollbar { display: none; }

#allMenuPanel .crumb {
    color: var(--amazon-teal);
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

#allMenuPanel .crumb:hover { background: #e5e5e5; text-decoration: underline; }
#allMenuPanel .crumb.current { color: #333; font-weight: 700; cursor: default; }
#allMenuPanel .crumb.current:hover { background: transparent; text-decoration: none; }
#allMenuPanel .separator { color: #999; }

.tree-back-btn {
    background: #f9f9f9;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    width: 100%;
    text-align: right;
    transition: background 0.15s;
    flex-shrink: 0;
    font-family: inherit;
}

.tree-back-btn:hover { background: #efefef; }
.tree-back-btn .arrow { font-size: 18px; color: var(--amazon-teal); }

.tree-content { padding: 6px 0; }

.tree-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border: none;
    border-bottom: 1px solid #f3f3f3;
    background: white;
    width: 100%;
    text-align: right;
    transition: background 0.15s, padding-right 0.2s;
    font-family: inherit;
}

.tree-item:hover { background: #f9f9f9; padding-right: 25px; }
.tree-item:last-child { border-bottom: none; }
.tree-item .label { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.item-icon { font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; width: 26px; }
.item-name { color: #333; }
.item-count { background: #e5e7eb; color: #6b7280; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; min-width: 20px; text-align: center; }
.tree-item .arrow { color: #999; font-size: 18px; transition: color 0.15s, transform 0.15s; }
.tree-item:hover .arrow { color: var(--amazon-teal); transform: translateX(-3px); }

.tree-leaf {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    gap: 12px;
    border-bottom: 1px solid #f3f3f3;
    background: white;
    transition: background 0.15s, padding-right 0.2s;
    color: #333;
}

.tree-leaf:hover { background: #fff8ef; padding-right: 25px; }
.tree-leaf:last-child { border-bottom: none; }
.leaf-icon { font-size: 22px; line-height: 1; width: 26px; text-align: center; flex-shrink: 0; }
.leaf-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.leaf-name { font-size: 14px; font-weight: 600; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaf-price { font-size: 12px; color: var(--amazon-red); font-weight: 700; }
.leaf-arrow { color: #999; font-size: 16px; transition: color 0.15s, transform 0.15s; }
.tree-leaf:hover .leaf-arrow { color: var(--amazon-teal); transform: translateX(-3px); }

.tree-empty { text-align: center; padding: 60px 20px; color: #999; font-size: 14px; }
.tree-empty p { margin-top: 12px; }

/* ============================================================
   ============ Backdrop ======================================
   ============================================================ */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(2px);
}

.backdrop.show { opacity: 1; visibility: visible; }

/* ============================================================
   ============ پاپ‌آپ حساب کاربری ===========================
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    backdrop-filter: blur(3px);
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-box {
    background: white;
    border-radius: 14px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 70px rgba(0,0,0,0.35);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 14px 14px 0 0;
    z-index: 2;
}

.modal-header h3 { font-size: 19px; color: #0f1111; font-weight: 700; }

.modal-close {
    background: transparent;
    border: none;
    font-size: 22px;
    color: #666;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.modal-close:hover { background: #f0f0f0; color: #000; }

.modal-body { padding: 25px; }
.modal-form { display: block; }
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 13px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
    color: #0f1111;
}

.form-control:focus { border-color: var(--amazon-orange); box-shadow: 0 0 0 3px rgba(255,153,0,0.15); }

.modal-btn {
    width: 100%;
    background: var(--amazon-yellow);
    color: var(--amazon-dark);
    border: none;
    padding: 14px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 5px;
    font-family: inherit;
}

.modal-btn:hover { background: var(--amazon-yellow-hover); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255,153,0,0.3); }

.modal-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    color: #999;
    font-size: 12px;
}

.modal-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background: var(--border);
}

.modal-divider span { background: white; padding: 0 12px; position: relative; color: #999; }

.modal-switch { text-align: center; font-size: 14px; color: #555; }
.modal-switch a { color: var(--amazon-teal); font-weight: 700; cursor: pointer; }
.modal-switch a:hover { text-decoration: underline; }

.signup-form { display: none; }
.signup-form.active { display: block; }
.login-form.hidden { display: none; }

/* ============================================================
   ============ ✅ Live Search (اضافه شده) ===================
   ============================================================ */

/* اصلاح .search-box برای نمایش dropdown */
.search-box {
    position: relative !important;
    overflow: visible !important;
}

/* dropdown نتایج */
.live-search-results {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    width: 100% !important;
    min-width: 320px !important;
    max-width: 600px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    max-height: 420px !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
    display: none;
    direction: rtl !important;
    text-align: right !important;
    border: 1px solid #e5e7eb !important;
    padding: 6px 0 !important;
}

.live-search-results.show {
    display: block !important;
}

.lsr-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    text-decoration: none !important;
    color: #333 !important;
    border-bottom: 1px solid #f3f3f3 !important;
    transition: background 0.15s !important;
    direction: rtl !important;
    text-align: right !important;
    cursor: pointer !important;
}

.lsr-item:last-child {
    border-bottom: none !important;
}

.lsr-item:hover {
    background: #fff8ef !important;
}

.lsr-icon {
    font-size: 28px !important;
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f7f7f7 !important;
    border-radius: 8px !important;
    line-height: 1 !important;
}

.lsr-info {
    flex: 1 !important;
    min-width: 0 !important;
    text-align: right !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.lsr-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0f1111 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.lsr-price {
    font-size: 12px !important;
    color: #b12704 !important;
    font-weight: 700 !important;
}

.lsr-empty {
    padding: 24px 16px !important;
    text-align: center !important;
    color: #999 !important;
    font-size: 14px !important;
    direction: rtl !important;
}

/* اسکرول‌بار dropdown */
.live-search-results::-webkit-scrollbar {
    width: 6px;
}

.live-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.live-search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.live-search-results::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ============================================================
   ============ User Menu ====================================
   ============================================================ */
.user-profile {
    text-align: center;
    padding: 15px 0 25px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.user-avatar-lg {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.user-name-lg {
    font-size: 18px;
    font-weight: 700;
    color: #0f1111;
    margin-bottom: 4px;
}

.user-email-lg {
    font-size: 13px;
    color: #666;
}

.user-menu-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f9f9f9;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    text-align: right;
    transition: all 0.15s;
    font-family: inherit;
}

.user-menu-link:hover {
    background: #fff8ef;
    color: var(--amazon-teal);
}

.user-menu-link span:first-child {
    font-size: 18px;
}

/* ============================================================
   ============ ریسپانسیو ====================================
   ============================================================ */
@media (max-width: 1024px) {
    .slider-wrap { height: 380px; }
    .slide-content h1 { font-size: 36px; }
    .slide-content p { font-size: 17px; }
}

@media (max-width: 900px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px;
    }

    .product-title { font-size: 22px; }
    .price-value { font-size: 26px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
}

@media (max-width: 768px) {
    .header-top .container { flex-wrap: wrap; }

    .location { display: none; }
    .header-account { display: none; }

    .search-box {
        order: 3;
        flex-basis: 100%;
        margin-top: 5px;
    }

    .hero { padding: 60px 20px; }
    .slider-wrap { height: 320px; }
    .slide-content h1 { font-size: 26px; }
    .slide-content p { font-size: 14px; }
    .slide-btn { padding: 10px 22px; font-size: 13px; }
    .slider-btn { width: 38px; height: 55px; font-size: 22px; }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .cart-label { display: none; }

    .btn-add-to-cart,
    .btn-buy-now { min-width: 100%; }

    .featured-products h2 { font-size: 20px; }
    .featured-products { padding: 30px 0 50px; }

    .deal-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .deal-icon { font-size: 45px; }

    .category-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .cat-icon { width: 75px; height: 75px; font-size: 32px; }

    .newsletter-form { flex-direction: column; }
    .newsletter-form button { width: 100%; }

    .side-panel { width: 100%; max-width: 100%; }
}

@media (max-width: 500px) {
    .modal-box {
        max-width: 100%;
        border-radius: 14px;
    }

    .modal-header { padding: 16px 20px; }
    .modal-body { padding: 20px; }

    .panel-header { padding: 14px 16px; }
    .cart-items { padding: 10px 16px; }
    .panel-footer { padding: 16px; }
}

@media (max-width: 480px) {
    .logo-text { font-size: 20px; }
    .container { padding: 0 12px; }

    .product-card { padding: 10px; }
    .product-card h3 { font-size: 13px; }
    .product-card .price { font-size: 14px; }

    .product-layout { padding: 15px; gap: 20px; }
    .product-title { font-size: 18px; }
    .price-value { font-size: 22px; }

    .category-title { font-size: 22px; }
    .category-page .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}
/* ============================================================
   ============ Orders ======================================
   ============================================================ */
.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.order-id {
    font-weight: 700;
    color: var(--amazon-teal);
    font-size: 14px;
}

.order-price {
    font-weight: 700;
    color: var(--amazon-red);
    font-size: 14px;
}

.order-date {
    font-size: 12px;
    color: #999;
}
/* ============================================================
   ============ Tree Item (نسخه جدید) ========================
   ============================================================ */
.tree-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #f3f3f3;
    background: white;
    transition: background 0.15s;
}

.tree-row:last-child {
    border-bottom: none;
}

.tree-row:hover {
    background: #f9f9f9;
}

.tree-item-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: padding-right 0.2s;
}

.tree-row:hover .tree-item-main {
    padding-right: 25px;
}

.tree-item-main .item-icon {
    font-size: 20px;
    line-height: 1;
    width: 26px;
    text-align: center;
    flex-shrink: 0;
}

.tree-item-main .item-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.tree-item-main:hover .item-name {
    color: var(--amazon-teal);
}

/* فلش سمت چپ */
.tree-item-expand {
    background: transparent;
    border: none;
    border-right: 1px solid #f3f3f3;
    color: #999;
    font-size: 22px;
    font-weight: 700;
    width: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    font-family: inherit;
    flex-shrink: 0;
}

.tree-item-expand:hover {
    background: var(--amazon-yellow);
    color: var(--amazon-dark);
}

.tree-item-expand:active {
    background: var(--amazon-yellow-hover);
}

/* حذف استایل قبلی .tree-item (اگه هست) */