/* ============================================================
   ============ ریست و متغیرهای کلی ===========================
   ============================================================ */
* {
    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;
}

html { scroll-behavior: smooth; }

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

a { text-decoration: none; color: inherit; cursor: pointer; }
button { font-family: inherit; }

/* ============================================================
   ============ سوئیچ سایت / پنل ==============================
   ============================================================ */
.mode-switcher {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10000;
    background: var(--amazon-dark);
    border-radius: 30px;
    padding: 5px;
    display: flex;
    gap: 5px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.mode-switcher button {
    padding: 8px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    background: transparent;
    color: #9ca3af;
    transition: all 0.2s;
}

.mode-switcher button.active {
    background: var(--amazon-orange);
    color: var(--amazon-dark);
}

.mode-switcher button:hover:not(.active) { color: white; }

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

/* ============================================================
   ============ هدر ===========================================
   ============================================================ */
.header {
    background: var(--amazon-dark);
    color: white;
    display: flex;
    align-items: center;
    padding: 6px 15px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-item {
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    white-space: nowrap;
    transition: border-color 0.15s;
}

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

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

.header-item .bold-text {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.logo {
    padding: 8px 10px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 3px;
}

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

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

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

/* نوار جستجو */
.search-container {
    flex: 1;
    display: flex;
    height: 40px;
    min-width: 200px;
    border-radius: 4px;
    overflow: hidden;
}

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

.search-category {
    background: #f3f3f3;
    border: none;
    padding: 0 10px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    outline: none;
    border-left: 1px solid #cdcdcd;
}

.search-category:hover { background: #dadada; }

.search-input {
    flex: 1;
    border: none;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
}

.search-btn {
    background: var(--amazon-yellow);
    border: none;
    width: 50px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.15s;
}

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

/* سبد خرید */
.cart-btn {
    display: flex;
    align-items: flex-end;
    position: relative;
}

.cart-icon {
    font-size: 28px;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--amazon-orange);
    color: var(--amazon-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 18px;
    text-align: center;
}

.cart-text {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

/* ============================================================
   ============ نوار ناوبری ===================================
   ============================================================ */
.navbar {
    background: var(--amazon-navy);
    color: white;
    display: flex;
    align-items: center;
    padding: 6px 15px;
    gap: 4px;
    font-size: 14px;
    overflow-x: auto;
    scrollbar-width: none;
}

.navbar::-webkit-scrollbar { display: none; }

.nav-link {
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 3px;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s;
}

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

.nav-link.all-menu {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

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

/* ============================================================
   ============ اسلایدر بنر ===================================
   ============================================================ */
.hero-slider {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    background: var(--amazon-navy);
}

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

.slide.active { opacity: 1; }

.slide-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}

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

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

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

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    font-size: 30px;
    width: 50px;
    height: 80px;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: background 0.2s;
}

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

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

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

.dot.active {
    background: white;
    transform: scale(1.3);
}

/* ============================================================
   ============ بخش محصولات ===================================
   ============================================================ */
.products-section {
    max-width: 1500px;
    margin: -80px auto 30px;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

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

.card {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #0f1111;
}

.product-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.product-item {
    cursor: pointer;
    text-align: center;
}

.product-item:hover .img-placeholder {
    transform: scale(1.05);
}

.img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: #f7f7f7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 8px;
    transition: transform 0.25s;
    overflow: hidden;
}

.img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-item p {
    font-size: 13px;
    color: #333;
}

.see-more {
    margin-top: auto;
    color: var(--amazon-teal);
    font-size: 13px;
    padding-top: 10px;
    transition: color 0.15s;
}

.see-more:hover {
    color: #c7511f;
    text-decoration: underline;
}

/* ============================================================
   ============ تخفیف‌ها ======================================
   ============================================================ */
.deal-section {
    max-width: 1500px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.deal-card {
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

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

.deal-header h2 { font-size: 22px; }

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

.deal-item {
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s;
}

.deal-item:hover { transform: scale(1.03); }

.deal-item .img-placeholder {
    height: 160px;
    font-size: 60px;
}

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

.deal-price {
    color: var(--amazon-red);
    font-weight: 700;
    font-size: 15px;
    margin-top: 5px;
}

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

/* ============================================================
   ============ دسته‌بندی‌های بصری ============================
   ============================================================ */
.category-section {
    max-width: 1500px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.category-card {
    background: white;
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.category-card h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

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

.category-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.category-item:hover { transform: translateY(-5px); }

.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.2s;
    overflow: hidden;
}

.cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.category-item p {
    font-size: 14px;
    font-weight: 600;
}

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

.newsletter h2 {
    font-size: 26px;
    margin-bottom: 10px;
}

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

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

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

.newsletter-form button {
    background: var(--amazon-orange);
    color: var(--amazon-dark);
    border: none;
    padding: 14px 30px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

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

/* ============================================================
   ============ فوتر =========================================
   ============================================================ */
.footer-top {
    background: #37475a;
    text-align: center;
    padding: 18px;
}

.footer-top a {
    color: white;
    font-size: 14px;
}

.footer-top:hover { background: #485769; }

.footer-main {
    background: var(--amazon-navy);
    color: white;
    padding: 40px 20px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
}

.footer-col h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

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

.footer-col a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    background: var(--amazon-dark);
    color: #ddd;
    text-align: center;
    padding: 25px 20px;
    font-size: 13px;
}

.footer-logo {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

/* ============================================================
   ============ دکمه بازگشت به بالا ==========================
   ============================================================ */
.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);
}

/* ============================================================
   ============ پنل‌های کشویی =================================
   ============================================================ */
.side-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 360px;
    max-width: 92%;
    background: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

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

.side-panel.from-right.open { transform: translateX(0); }

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

.side-panel.from-left.open { transform: translateX(0); }

.panel-header {
    background: var(--amazon-navy);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

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

.cart-panel-count {
    background: var(--amazon-orange);
    color: var(--amazon-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

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

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

/* ============================================================
   ============ Breadcrumb ====================================
   ============================================================ */
.breadcrumb-bar {
    background: #f3f3f3;
    padding: 10px 20px;
    font-size: 12px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    white-space: nowrap;
}

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

.breadcrumb-bar .crumb {
    color: var(--amazon-teal);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
}

.breadcrumb-bar .crumb:hover {
    background: #e5e5e5;
    text-decoration: underline;
}

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

.breadcrumb-bar .crumb.current:hover {
    background: transparent;
    text-decoration: none;
}

.breadcrumb-bar .separator { color: #999; }

/* ============================================================
   ============ دکمه برگشت ====================================
   ============================================================ */
.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;
}

.back-btn:hover { background: #efefef; }

.back-btn .arrow {
    font-size: 18px;
    color: var(--amazon-teal);
}

/* ============================================================
   ============ لیست درختی ====================================
   ============================================================ */
.tree-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.tree-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f3f3f3;
    transition: background 0.15s;
}

.tree-item:hover { background: #f9f9f9; }
.tree-item:last-child { border-bottom: none; }

.tree-item .label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.tree-item .arrow {
    color: #999;
    font-size: 16px;
}

.tree-leaf {
    display: block;
    padding: 14px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f3f3f3;
    transition: background 0.15s;
}

.tree-leaf:hover {
    background: #fff8ef;
    color: var(--amazon-teal);
}

/* ============================================================
   ============ لیست محصول درخت ==============================
   ============================================================ */
.products-list {
    padding: 15px 20px;
}

.products-list h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--amazon-orange);
}

.product-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid #f0f0f0;
    margin-bottom: 8px;
    background: #fafafa;
}

.product-list-item:hover {
    background: #fff8ef;
    border-color: var(--amazon-yellow);
}

.product-list-item .p-icon {
    width: 55px;
    height: 55px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
}

.product-list-item .p-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-list-item .p-info { flex: 1; }

.product-list-item .p-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-list-item .p-price {
    color: var(--amazon-red);
    font-weight: 700;
    font-size: 14px;
}

/* ============================================================
   ============ سبد خرید ======================================
   ============================================================ */
.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.cart-empty .big-icon {
    font-size: 70px;
    margin-bottom: 15px;
    opacity: 0.4;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
}

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

.cart-item .c-icon {
    width: 65px;
    height: 65px;
    background: #f7f7f7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    overflow: hidden;
}

.cart-item .c-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item .c-info { flex: 1; }

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

.cart-item .c-price {
    color: var(--amazon-red);
    font-weight: 700;
    font-size: 15px;
}

.cart-item .c-qty {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.cart-item .c-remove {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    align-self: flex-start;
    transition: color 0.15s;
}

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

.cart-footer {
    padding: 20px;
    background: #f9f9f9;
    border-top: 2px solid #eee;
    flex-shrink: 0;
}

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

.cart-total .label { font-weight: 600; color: #333; }

.cart-total .amount {
    color: var(--amazon-red);
    font-weight: 700;
    font-size: 18px;
}

.checkout-btn {
    width: 100%;
    background: var(--amazon-yellow);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.checkout-btn:hover { background: var(--amazon-yellow-hover); }

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

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

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

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

.modal-box {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.25s;
}

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

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 19px; color: #333; }

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

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

.modal-body { padding: 25px; }

.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: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    background: white;
}

.form-control:focus { border-color: var(--amazon-orange); }

textarea.form-control { resize: vertical; min-height: 70px; }

.modal-btn {
    width: 100%;
    background: var(--amazon-yellow);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 5px;
}

.modal-btn:hover { background: var(--amazon-yellow-hover); }

.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 10px;
    position: relative;
}

.modal-switch {
    text-align: center;
    font-size: 14px;
    color: #555;
}

.modal-switch a {
    color: var(--amazon-teal);
    font-weight: 600;
}

.modal-switch a:hover { text-decoration: underline; }

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

/* ============================================================
   ============ Toast =========================================
   ============================================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: #333;
    color: white;
    padding: 14px 25px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 3000;
    transition: transform 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--amazon-green); }
.toast.error { background: var(--amazon-red); }

/* ============================================================
   ============ پنل ادمین =====================================
   ============================================================ */
#adminView {
    display: none;
    min-height: 100vh;
    background: #f5f7fa;
}

#adminView.active { display: flex; }
#siteView.hidden { display: none; }

.admin-sidebar {
    width: 240px;
    background: #1a2332;
    color: white;
    padding: 20px 0;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.admin-sidebar h1 {
    font-size: 17px;
    color: var(--amazon-orange);
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.admin-menu { list-style: none; }

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #cbd5e1;
    font-size: 14px;
    cursor: pointer;
    border-right: 3px solid transparent;
    transition: all 0.2s;
}

.admin-menu a:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.admin-menu a.active {
    background: rgba(255,153,0,0.15);
    color: var(--amazon-orange);
    border-right-color: var(--amazon-orange);
}

.admin-content {
    flex: 1;
    margin-right: 240px;
    padding: 25px;
}

.admin-topbar {
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-topbar h2 { font-size: 19px; }

.admin-topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.admin-card h3 {
    font-size: 17px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* دکمه‌ها */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary { background: var(--amazon-orange); color: var(--amazon-dark); }
.btn-primary:hover { background: #e88a00; }

.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }

.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: #e5e7eb; }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* فرم‌ها */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

/* آمار */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.stat-box {
    padding: 20px;
    border-radius: 10px;
    color: white;
}

.stat-box .stat-icon { font-size: 28px; }
.stat-box .big-num {
    font-size: 28px;
    font-weight: 700;
    margin-top: 8px;
}
.stat-box .label { font-size: 13px; opacity: 0.9; }

/* لیست آیتم‌ها */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.list-item .icon-preview {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
}

.list-item .icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-item .info { flex: 1; }
.list-item .info .title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
}
.list-item .info .meta { font-size: 12px; color: #6b7280; }
.list-item .actions { display: flex; gap: 6px; }

/* سوییچ */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider-toggle {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider-toggle { background: #10b981; }
input:checked + .slider-toggle:before { transform: translateX(20px); }

/* درخت ادمین */
#treeEditor {
    font-size: 14px;
}

.tree-node {
    padding: 10px 0;
    border-bottom: 1px dashed #e5e7eb;
}

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

.tree-node-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.15s;
    flex-wrap: wrap;
}

.tree-node-row:hover { background: #f9fafb; }

.tree-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    font-size: 12px;
    border-radius: 4px;
    background: transparent;
    border: none;
    flex-shrink: 0;
    transition: background 0.15s;
}

.tree-toggle:hover { background: #e5e7eb; }
.tree-toggle.empty { visibility: hidden; }

.tree-node-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #1f2937;
}

.tree-node-label .node-icon { font-size: 16px; }
.tree-node-label .node-icon-img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 4px;
}

.tree-node-type {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.tree-node-type.branch { background: #dbeafe; color: #1e40af; }
.tree-node-type.product { background: #dcfce7; color: #166534; }

.tree-node-price {
    font-size: 12px;
    color: var(--amazon-red);
    font-weight: 600;
}

.tree-node-actions {
    margin-right: auto;
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.tree-node-actions button {
    padding: 4px 8px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}

.tree-node-actions button:hover {
    background: var(--amazon-orange);
    color: var(--amazon-dark);
    border-color: var(--amazon-orange);
}

.tree-node-actions button.danger:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.tree-children {
    margin-right: 24px;
    border-right: 1px dashed #cbd5e1;
    padding-right: 8px;
}

.tree-children.collapsed { display: none; }

.hint-text {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
}

/* پشتیبان‌گیری */
.backup-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.data-preview {
    background: #1f2937;
    color: #10b981;
    padding: 15px;
    border-radius: 8px;
    overflow: auto;
    max-height: 400px;
    font-size: 12px;
    direction: ltr;
    text-align: left;
    font-family: 'Courier New', monospace;
}

/* ============================================================
   ============ موبایل ========================================
   ============================================================ */
@media (max-width: 1024px) {
    .hero-slider { height: 380px; }
    .slide-content h1 { font-size: 36px; }
    .slide-content p { font-size: 17px; }
}

@media (max-width: 900px) {
    .admin-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content { margin-right: 0; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mode-switcher {
        top: auto;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
    }

    .header { flex-wrap: wrap; }
    .header-item.account, .header-item.location { display: none; }
    .search-container {
        order: 3;
        flex-basis: 100%;
        margin-top: 5px;
    }

    .hero-slider { height: 300px; }
    .slide-content h1 { font-size: 24px; }
    .slide-content p { font-size: 13px; }
    .slide-btn { padding: 10px 22px; font-size: 13px; }
    .slider-btn { width: 35px; height: 50px; font-size: 20px; }
    .slider-dots { bottom: 50px; }

    .products-section { margin-top: -40px; }
    .product-row { grid-template-columns: 1fr; }

    .newsletter-form { flex-direction: column; }

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

    .admin-content { padding: 15px; }
    .admin-topbar h2 { font-size: 16px; }
}

@media (max-width: 480px) {
    .logo-text { font-size: 20px; }
    .cart-text { display: none; }
    .slide-content h1 { font-size: 20px; }
}