/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --primary-gradient: linear-gradient(135deg, #D32F2F 0%, #880E4F 100%);
    --primary-color: #D32F2F;
    --primary-dark: #880E4F;
    --accent-color: #FF5252;
    
    /* Backgrounds */
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    
    /* Text */
    --text-main: #2D3436;
    --text-light: #636E72;
    
    /* Borders & Shadows */
    --border-color: #F1F2F6;
    --shadow-sm: 0 2px 8px rgba(211, 47, 47, 0.08);
    --shadow-md: 0 8px 24px rgba(211, 47, 47, 0.12);
    --shadow-lg: 0 15px 35px rgba(211, 47, 47, 0.15);
    
    /* Status Colors */
    --star-color: #FFB400;
    --success-color: #2ECC71;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    
    /* Addons/Blue Theme */
    --addon-gradient: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
    --addon-color: #0ea5e9;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    padding-bottom: 100px;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
/* Mobile Header */
.custom-header {
    background: var(--primary-gradient);
    min-height: 72px;
    height: auto;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
}

.header-logo {
    color: white;
    font-weight: 900;
    font-size: 1.05rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    white-space: nowrap;
}

.header-logo img {
    display: block;
    width: auto;
    max-width: 90px;
    max-height: 42px;
    object-fit: contain;
}

.header-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    position: relative;
}

.header-icons i {
    color: white;
    font-size: 1.4rem;
    margin: 0;
    cursor: pointer;
}

.search-box {
    display: block;
    width: calc(100% - 30px);
    height: 48px;
    margin: 0 15px 18px;
    padding: 0 18px;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1);
    background: #fff;
}

.announcement-bar {
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 0.8rem;
    position: relative;
    z-index: 1001;
}

.announcement-bar a {
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
    margin-right: 10px;
}

/* Desktop Header */
.desktop-header {
    background: #fff;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 0;
}

.desktop-header-top {
    height: 95px;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.desktop-logo {
    width: auto;
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--primary-color);
    text-decoration: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-logo img {
    max-height: 60px;
    width: auto;
}

.desktop-search-wrapper {
    flex: 1;
    max-width: 650px;
    position: relative;
    margin: 0 30px;
}

.desktop-search-input {
    width: 100%;
    height: 46px;
    background: #F5F5F5;
    border: none;
    border-radius: 25px;
    padding: 0 60px 0 25px;
    font-size: 0.9rem;
    font-family: 'Vazirmatn', sans-serif;
}

.desktop-search-input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.desktop-search-btn {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.desktop-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: auto;
}

.desktop-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.75rem;
    position: relative;
}

.desktop-action-btn i {
    font-size: 1.4rem;
    margin-bottom: 3px;
}

.desktop-navbar {
    height: 50px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.desktop-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.desktop-nav-list li a {
    display: block;
    padding: 0 20px;
    height: 50px;
    line-height: 50px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.desktop-nav-list li a.active {
    color: var(--primary-color);
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    height: 64px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.nav-item {
    height: 100%;
    min-width: 0;
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.62rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-item i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.nav-item.active {
    color: var(--primary-color);
}

.fab-btn {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.4);
    margin-top: -24px;
    border: 3px solid var(--bg-color);
}

/* =========================================
   3. CART & BADGES
   ========================================= */
.cart-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background-color: #ff0000;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
    display: none;
}

.cart-badge.show {
    display: block;
}

/* =========================================
   4. DRAWERS (Category & Cart)
   ========================================= */
/* Overlay Base */
.category-drawer-overlay,
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.category-drawer-overlay.active,
.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Category Drawer */
.category-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 92vw;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 2001;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
}

.category-drawer.active {
    transform: translateX(0);
}

.category-drawer-header {
    flex: 0 0 auto;
    min-height: 72px;
    padding: 14px 18px;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.category-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.category-drawer-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
}

.category-tree-row {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid #f0f0f0;
}

.category-tree-toggle {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid #e6e6e6;
    background: #fff;
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.category-tree-toggle-placeholder {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
}

.category-tree-link {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    text-decoration: none;
    padding: 7px 5px;
    border-radius: 10px;
}

.category-tree-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff5f5;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.category-tree-name {
    flex: 1;
    min-width: 0;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.7;
}

.category-tree-children {
    margin-right: 20px;
    padding-right: 14px;
    border-right: 1px solid rgba(211, 47, 47, 0.2);
}

.category-tree-children[hidden] {
    display: none !important;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 420px;
    max-width: 92vw;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 2003;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-drawer-header {
    flex: 0 0 auto;
    min-height: 72px;
    padding: 14px 18px;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.cart-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.cart-drawer-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cart-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f5;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-qty-value {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-drawer-footer {
    flex: 0 0 auto;
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
}

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

.cart-checkout-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.cart-empty-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

/* =========================================
   5. PRODUCT DETAIL SECTION
   ========================================= */
.breadcrumb-wrapper {
    background: #fff;
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.breadcrumb {
    margin: 0;
    font-size: 0.78rem;
}

.breadcrumb-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-main);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-light);
}

.product-detail-section {
    padding: 0 12px;
    margin-bottom: 30px;
}

.product-detail-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Gallery */
.product-gallery {
    padding: 20px;
    background: #fff;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fafafa;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.4s ease;
}

.main-image-wrapper:hover img {
    transform: scale(1.05);
}

.gallery-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
}

.gallery-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.gallery-badge.special {
    background: var(--primary-gradient);
}

.gallery-badge.new {
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
}

.gallery-badge.discount {
    background: linear-gradient(135deg, #FF9800 0%, #F44336 100%);
}

.thumbs-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.thumbs-row::-webkit-scrollbar {
    height: 4px;
}

.thumbs-row::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.thumb-item {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    background: #fafafa;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    padding: 4px;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumb-item:hover,
.thumb-item.active {
    border-color: var(--primary-color);
    background: #fff;
}

/* Product Info */
.product-info {
    padding: 20px;
    background: #fff;
}

.product-info-header {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #eee;
}

.product-info-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.7;
    margin: 0 0 8px;
}

.product-info-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.72rem;
    color: var(--text-light);
}

.product-info-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.product-info-meta i {
    color: var(--primary-color);
}

.product-info-meta a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.product-info-meta a:hover {
    color: var(--primary-color);
}

/* Rating */
.rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3c4 100%);
    border-radius: 14px;
    margin-bottom: 16px;
}

.rating-number {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
}

.rating-stars-display {
    display: flex;
    gap: 2px;
}

.rating-stars-display i {
    color: var(--star-color);
    font-size: 0.95rem;
}

.rating-count {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-right: auto;
}

/* Price Box */
.price-box {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(211, 47, 47, 0.1);
}

.price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

.price-current small {
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 4px;
    color: var(--text-light);
}

.price-old {
    font-size: 0.95rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-discount-badge {
    background: var(--primary-gradient);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.tax-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(211, 47, 47, 0.15);
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tax-info strong {
    color: var(--text-main);
}

/* Stock */
.stock-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.stock-box.in-stock {
    background: linear-gradient(135deg, #e8f8ef 0%, #c8f0d8 100%);
    color: #15803d;
}

.stock-box.low-stock {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.stock-box.out-of-stock {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.stock-box i {
    font-size: 1.2rem;
}

/* Short Description */
.short-desc-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    line-height: 1.9;
    color: var(--text-main);
    border-right: 4px solid var(--primary-color);
}

/* Quantity */
.quantity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.quantity-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px;
}

.qty-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: #fff;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.qty-input {
    width: 60px;
    height: 38px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-main);
    font-family: 'Vazirmatn', sans-serif;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-add-cart-main {
    height: 54px;
    border: none;
    border-radius: 14px;
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Vazirmatn', sans-serif;
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.3);
}

.btn-add-cart-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(211, 47, 47, 0.45);
}

.btn-add-cart-main:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-favorite-main {
    width: 54px;
    height: 54px;
    border: 2px solid #eee;
    border-radius: 14px;
    background: #fff;
    color: #ccc;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-favorite-main:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-favorite-main.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff5f5;
}

.btn-favorite-main.active i {
    color: var(--primary-color);
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* =========================================
   6. PAYMENT SECTION
   ========================================= */
.payment-section {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.payment-tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}

.payment-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.payment-tab.active {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
}

.payment-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.payment-content.active {
    display: block;
}

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

.cash-info {
    text-align: center;
    padding: 15px;
}

.cash-info-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.cash-info-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.cash-info-price small {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.cash-info-tax {
    font-size: 0.78rem;
    color: var(--text-light);
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 10px;
    margin-top: 10px;
    display: inline-block;
}

/* Installment Plans */
.installment-plans {
    display: grid;
    gap: 10px;
}

.installment-plan {
    cursor: pointer;
    user-select: none;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #f0f0f0;
    border-radius: 14px;
    padding: 14px;
    transition: all 0.3s ease;
}

.installment-plan:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.1);
    transform: translateY(-2px);
}

.installment-plan.featured {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-color: var(--primary-color);
}

.installment-plan.featured::before {
    content: 'پیشنهاد ویژه';
    position: absolute;
    top: -10px;
    right: 14px;
    background: var(--primary-gradient);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
}

.installment-plan.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    box-shadow: 0 10px 28px rgba(211, 47, 47, 0.2);
    transform: translateY(-2px);
}

.installment-plan.selected::after {
    content: '\F26B';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
    animation: bounceIn 0.4s ease;
    z-index: 2;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.plan-select-btn {
    margin-top: 12px;
    width: 100%;
    padding: 9px;
    background: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 10px;
    font-weight: 700;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.plan-select-btn:hover {
    background: rgba(211, 47, 47, 0.05);
}

.installment-plan.selected .plan-select-btn {
        background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.installment-plan.selected .plan-select-btn i::before {
    content: '\F26B';
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e0e0e0;
}

.plan-months {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.plan-months i {
    font-size: 1.1rem;
}

.plan-monthly {
    text-align: left;
}

.plan-monthly-label {
    font-size: 0.7rem;
    color: var(--text-light);
    display: block;
}

.plan-monthly-amount {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-main);
}

.plan-monthly-amount small {
    font-size: 0.65rem;
    color: var(--text-light);
    font-weight: 500;
}

.plan-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.75rem;
}

.plan-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.plan-detail-label {
    color: var(--text-light);
}

.plan-detail-value {
    color: var(--text-main);
    font-weight: 700;
}

.installment-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e0e0e0;
    font-size: 0.72rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.installment-info i {
    color: var(--warning-color);
}

/* Selected Plan Summary */
.selected-plan-summary {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 14px;
    padding: 14px;
    margin-top: 14px;
    display: none;
    animation: slideIn 0.3s ease;
}

.selected-plan-summary.show {
    display: block;
}

.selected-plan-summary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #047857;
    font-weight: 800;
    font-size: 0.88rem;
}

.selected-plan-summary-header i {
    font-size: 1.1rem;
}

.selected-plan-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.summary-item {
    background: rgba(255,255,255,0.7);
    padding: 8px 10px;
    border-radius: 10px;
}

.summary-item-label {
    font-size: 0.7rem;
    color: #065f46;
    margin-bottom: 3px;
}

.summary-item-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: #047857;
}

/* Payment Type Indicator */
.payment-type-indicator {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #0369a1;
    font-weight: 700;
}

.payment-type-indicator.show {
    display: flex;
    animation: slideIn 0.3s ease;
}

.payment-type-indicator i {
    font-size: 1.1rem;
}

/* =========================================
   7. ADDONS SECTION
   ========================================= */
.addons-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(14, 165, 233, 0.15);
    position: relative;
    overflow: hidden;
}

.addons-section::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ادغام استایل‌های تکراری addons-header */
.addons-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 14px;
    font-size: 0.92rem;
    position: relative;
    z-index: 1;
    padding: 0; /* بازنشستی پدینگ‌های قبلی */
    background: transparent; /* بازنشستی پس‌زمینه‌های قبلی */
    border-bottom: none; /* بازنشستی بوردرهای قبلی */
}

.addons-header > i {
    color: var(--addon-color);
    font-size: 1.1rem;
}

.addons-count-badge {
    margin-right: auto;
    background: var(--addon-gradient);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25);
    align-self: flex-start; /* برای تراز بهتر در صورت نیاز */
}

.addons-list {
    display: grid;
    gap: 8px;
    position: relative;
    z-index: 1;
    /* اگر لیست به صورت ستونی است، display: flex با flex-direction: column بهتر است، اما گرید هم کار می‌کند */
}

.addon-item {
    display: block;
    cursor: pointer;
    background: #fff;
    border: 2px solid #e0f2fe;
    border-radius: 12px;
    padding: 10px 12px;
    transition: all 0.25s ease;
    position: relative;
}

.addon-item:hover {
    border-color: var(--addon-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

.addon-item input[type="checkbox"] {
    display: none;
}

.addon-item.checked {
    border-color: var(--addon-color);
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.addon-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.addon-check {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.addon-item.checked .addon-check {
    background: var(--addon-gradient);
    border-color: var(--addon-color);
    box-shadow: 0 3px 8px rgba(14, 165, 233, 0.3);
}

.addon-check i {
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.addon-item.checked .addon-check i {
    opacity: 1;
}

.addon-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.addon-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.5;
}

.addon-price {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--addon-color);
    background: rgba(14, 165, 233, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

/* =========================================
   8. WARRANTY SECTION (استایل‌های جدید)
   ========================================= */
.warranty-section {
    background: #fff;
    border-radius: 16px;
    border: 2px solid #fd7e14;
    box-shadow: 0 4px 20px rgba(253, 126, 20, 0.15);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* ادغام مجدد addons-header برای بخش گارانتی اگر نیاز است، اما بهتر است کلاس جداگانه باشد.
   در اینجا فرض بر این است که addons-header عمومی است. اگر استایل‌های نارنجی فقط برای گارانتی است، باید کلاس جداگانه تعریف شود.
   با توجه به کد اصلی، استایل‌های نارنجی در انتهای کد آمده‌اند و ممکن است با استایل‌های آبی بالا تداخل داشته باشند.
   من استایل‌های نارنجی را به یک کلاس جدید منتقل می‌کنم یا اگر کلاس خاصی ندارد، آن‌ها را جدا می‌کنم.
   در کد اصلی، .addons-header دوباره تعریف شده است. برای جلوگیری از تداخل، من استایل‌های نارنجی را به یک کلاس جدید یا شرطی تبدیل نمی‌کنم مگر اینکه HTML تغییر کند.
   اما برای تمیزی کد، فرض می‌کنیم که این استایل‌ها برای یک بخش خاص هستند.
   از آنجایی که کلاس .addons-header در دو جا تعریف شده، بهتر است یکی را حذف کنیم.
   در اینجا، من استایل‌های آبی (بالا) را نگه می‌دارم و استایل‌های نارنجی را اگر کلاس خاصی دارند اعمال می‌کنم.
   در کد اصلی، استایل‌های نارنجی مستقیماً روی .addons-header اعمال شده‌اند که باعث باطل شدن استایل‌های آبی می‌شود.
   برای حل این مشکل، من استایل‌های نارنجی را به یک کلاس جدید مثل .warranty-header منتقل می‌کنم یا فرض می‌کنم که بخش گارانتی کلاس دیگری دارد.
   با توجه به ساختار کد، به نظر می‌رسد .addons-header برای لوازم جانبی (آبی) و یک هدر دیگر برای گارانتی (نارنجی) مد نظر بوده است.
   من استایل‌های نارنجی را به .warranty-header تغییر نام می‌دهم تا تداخل نداشته باشد.
*/

.warranty-header {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: #fff5eb;
    border-bottom: 1px solid #ffe0b2;
    gap: 12px;
}

.warranty-header .header-icon-wrapper {
    width: 40px;
    height: 40px;
    background: rgba(253, 126, 20, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warranty-header .header-icon-wrapper i {
    font-size: 1.25rem;
    color: #fd7e14;
}

.warranty-header .header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.warranty-header .header-text span:first-child {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
}

.warranty-header .addons-count-badge {
    font-size: 0.75rem;
    background: #fd7e14;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    align-self: flex-start;
    font-weight: 500;
}

.warranty-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.warranty-card {
    display: block;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.warranty-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.warranty-card-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #eef0f2;
    border-radius: 12px;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.warranty-card:hover .warranty-card-content {
    border-color: #ffe0b2;
    background: #fffaf5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 126, 20, 0.05);
}

.warranty-card input[type="radio"]:checked + .warranty-card-content {
    border-color: #fd7e14;
    background: #fff8f0;
    box-shadow: 0 4px 15px rgba(253, 126, 20, 0.1);
}

.warranty-radio-indicator {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    margin-left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.radio-dot {
    width: 12px;
    height: 12px;
    background: transparent;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.warranty-card input[type="radio"]:checked + .warranty-card-content .warranty-radio-indicator {
    border-color: #fd7e14;
    background: #fd7e14;
}

.warranty-card input[type="radio"]:checked + .warranty-card-content .radio-dot {
    transform: scale(1);
    background: #fff;
}

.warranty-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-right: auto;
}

.warranty-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warranty-title i {
    font-size: 1.1rem;
    opacity: 0.7;
}

.warranty-card[data-warranty-type="0"] .warranty-title i {
    color: #6c757d;
}

.warranty-price {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
}

.warranty-card input[type="radio"]:checked + .warranty-card-content .warranty-price {
    color: #fd7e14;
    font-weight: 700;
}

/* =========================================
   9. PRICE BREAKDOWN
   ========================================= */
.price-breakdown-section {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(211, 47, 47, 0.1);
}

.price-breakdown-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-breakdown-title i {
    color: var(--primary-color);
}

.price-row-breakdown {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 0.85rem;
    color: var(--text-main);
}

.price-row-breakdown.addon-row {
    color: var(--addon-color);
    animation: slideIn 0.3s ease;
}

.price-row-breakdown.addon-row .price-value {
    font-weight: 800;
}

.price-row-breakdown.total-row {
    border-top: 1.5px dashed rgba(211, 47, 47, 0.25);
    padding-top: 12px;
    margin-top: 6px;
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--primary-color);
}

.price-row-breakdown.total-row .price-value {
    font-size: 1.15rem;
}

.price-label {
    font-weight: 600;
}

.price-value {
    font-weight: 700;
}

.discount-tag {
    background: rgba(46, 204, 113, 0.15);
    color: #15803d;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
    font-weight: 700;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   10. DESCRIPTION & FEATURES
   ========================================= */
.description-section {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.desc-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}

.desc-tabs::-webkit-scrollbar {
    display: none;
}

.desc-tab {
    padding: 10px 18px;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    font-family: 'Vazirmatn', sans-serif;
}

.desc-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.desc-tab-content {
    display: none;
    line-height: 2;
    font-size: 0.9rem;
    color: var(--text-main);
    animation: fadeIn 0.4s ease;
}

.desc-tab-content.active {
    display: block;
}

.desc-tab-content p {
    margin-bottom: 12px;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 0.78rem;
}

.product-features li i {
    color: var(--primary-color);
    font-size: 1rem;
}

.product-features li strong {
    color: var(--text-main);
}

/* =========================================
   11. REVIEWS SECTION
   ========================================= */
.reviews-section {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

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

.reviews-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.reviews-header h4 i {
    color: var(--star-color);
}

.reviews-header .reviews-count {
    font-size: 0.85rem;
    color: var(--text-light);
}

.reviews-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    padding: 18px;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3c4 100%);
    border-radius: 14px;
}

.reviews-average {
    text-align: center;
}

.reviews-average-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 8px;
}

.reviews-average-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.reviews-average-stars i {
    color: var(--star-color);
    font-size: 1.1rem;
}

.reviews-average-text {
    font-size: 0.78rem;
    color: var(--text-light);
}

.reviews-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.review-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
}

.review-bar-label {
    flex: 0 0 30px;
    color: var(--text-main);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
}

.review-bar-label i {
    color: var(--star-color);
    font-size: 0.7rem;
}

.review-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
}

.review-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--star-color) 0%, #FFC107 100%);
    border-radius: 10px;
    transition: width 0.6s ease;
}

.review-bar-count {
    flex: 0 0 30px;
    text-align: left;
    color: var(--text-light);
    font-weight: 600;
}

/* Review Form */
.review-form-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px dashed #e0e0e0;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 25px;
}

.review-form-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-form-title i {
    color: var(--primary-color);
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 15px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 1.8rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--star-color);
    transform: scale(1.1);
}

.review-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    resize: vertical;
    transition: border-color 0.3s;
    margin-bottom: 12px;
}

.review-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-submit-review {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-submit-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.3);
}

.review-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.review-alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Review Items */
.review-item {
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.review-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.review-meta {
    flex: 1;
}

.review-author {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
    margin: 0 0 4px;
}

.review-date {
    font-size: 0.72rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-stars-small {
    display: flex;
    gap: 1px;
}

.review-stars-small i {
    color: var(--star-color);
    font-size: 0.78rem;
}

.review-stars-small i.empty {
    color: #ddd;
}

.review-comment {
    font-size: 0.88rem;
    line-height: 1.9;
    color: var(--text-main);
    background: #f8f9fa;
    padding: 12px 14px;
    border-radius: 12px;
    border-right: 3px solid var(--primary-color);
}

.reviews-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.reviews-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.4;
}

/* =========================================
   12. SPECS TABLE
   ========================================= */
.product-specs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.product-specs-table tbody tr {
    transition: background 0.2s ease;
}

.product-specs-table tbody tr:nth-child(odd) {
    background: #fafafa;
}

.product-specs-table tbody tr:hover {
    background: #fff5f5;
}

.product-specs-table td {
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--text-main);
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.product-specs-table tbody tr:last-child td {
    border-bottom: none;
}

.product-specs-table td.spec-name {
    font-weight: 700;
    color: var(--text-main);
    width: 40%;
    background: rgba(211, 47, 47, 0.04);
    position: relative;
}

.product-specs-table td.spec-name::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary-color);
    border-radius: 0 3px 3px 0;
}

.product-specs-table td.spec-value {
    font-weight: 500;
    color: var(--text-light);
}

.specs-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.specs-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.4;
    color: var(--primary-color);
}

/* =========================================
   13. RELATED PRODUCTS
   ========================================= */
.related-section {
    padding: 0 12px;
    margin-bottom: 30px;
}

.related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 3px;
}

.related-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-header h5 i {
    color: var(--primary-color);
}

.products-row {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 10px;
}

.product-card {
    width: 100%;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(211, 47, 47, 0.1);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fafafa;
}

.product-img-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}

.product-img-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 8px;
    object-fit: contain;
    transition: transform 0.5s ease;
}

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

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 45px;
    height: 45px;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.4);
    z-index: 5;
    animation: pulse 2s infinite;
}

.product-body {
    position: relative;
    min-height: 145px;
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.product-title {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 38px;
    max-height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-weight: 800;
    color: var(--text-main);
    font-size: 0.82rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 42px;
}

.product-price small {
    font-size: 0.58rem;
    font-weight: 500;
    color: var(--text-light);
}

.old-price {
    display: block;
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.65rem;
    margin: 2px 0 0;
    font-weight: 400;
}

.btn-add-cart {
    width: 38px;
    height: 38px;
    position: absolute;
    left: 8px;
    bottom: 8px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    transition: .25s;
    z-index: 10;
    cursor: pointer;
}

.btn-add-cart i {
    font-size: 20px;
    transition: .25s;
}

.btn-add-cart:hover {
    transform: scale(1.1);
}

.btn-add-cart.active {
    color: #ff1744;
}

.btn-add-cart.active i {
    transform: scale(1.15);
}

/* =========================================
   14. MODALS & OVERLAYS
   ========================================= */
/* Login Modal */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 15px;
}

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

.login-modal {
    background: #fff;
    border-radius: 24px;
    padding: 30px 25px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.login-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary-gradient);
}

.login-modal-overlay.active .login-modal {
    transform: scale(1) translateY(0);
}

.login-modal-icon {
    width: 85px;
    height: 85px;
    background: var(--primary-gradient);
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.2rem;
    box-shadow: 0 12px 35px rgba(211, 47, 47, 0.4);
    animation: pulse 2s infinite;
    position: relative;
}

.login-modal-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
       border: 2px solid rgba(211, 47, 47, 0.3);
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}

.login-modal-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 8px;
}

.login-modal-text {
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.8;
    margin-bottom: 22px;
}

.login-modal-text strong {
    color: var(--primary-color);
}

.login-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-login-now {
    background: var(--primary-gradient);
    color: #fff !important;
    text-decoration: none;
    padding: 13px 20px;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.3);
    font-family: 'Vazirmatn', sans-serif;
    border: none;
    width: 100%;
}

.btn-login-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(211, 47, 47, 0.45);
    color: #fff !important;
}

.btn-cancel-login {
    background: #f5f5f5;
    color: var(--text-light);
    border: none;
    padding: 11px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.2s;
}

.btn-cancel-login:hover {
    background: #ebebeb;
    color: var(--text-main);
}

.login-modal-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    color: var(--text-light);
    font-size: 0.75rem;
}

.login-modal-divider::before,
.login-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

/* Promo Overlay */
.promo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.promo-overlay.show {
    display: flex;
    opacity: 1;
}

.promo-modal {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    direction: rtl;
}

.promo-overlay.show .promo-modal {
    transform: scale(1) translateY(0);
}

.promo-close-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
}

.promo-image {
    width: 100%;
    height: auto;
    display: block;
}

.promo-footer {
    padding: 20px 25px;
    background: rgba(253, 253, 253, 0.6);
}

.promo-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, #F3214D, #ff4d79);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    margin-bottom: 15px;
}

.promo-btn-text {
    background: none;
    border: none;
    color: #adb5bd;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

/* =========================================
   15. BUTTONS & UTILITIES
   ========================================= */
.btn-modern-full {
    width: 100% !important;
    height: 58px !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.35) !important;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-modern-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-modern-full:hover:not(:disabled)::before {
    left: 100%;
}

.btn-modern-full:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(211, 47, 47, 0.5) !important;
}

.btn-modern-full:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.3) !important;
}

.btn-modern-full:disabled {
    background: #e0e0e0 !important;
    color: #999 !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

.btn-modern-full i {
    font-size: 1.3rem;
    margin-left: 8px;
}

/* =========================================
   16. FOOTERS
   ========================================= */
.mobile-footer {
    background-color: #2D2D2D;
    padding: 60px 0 30px 0;
}

.mobile-footer h6 {
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.mobile-footer p,
.mobile-footer li {
    font-size: 0.72rem;
    line-height: 1.8;
    color: #DADADA;
}

.desktop-footer {
    background-color: #2D2D2D;
    color: #FFFFFF;
    padding: 60px 0 30px 0;
    margin-top: 50px;
}

.desktop-footer h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.05rem;
    position: relative;
    padding-bottom: 10px;
}

.desktop-footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.desktop-footer p,
.desktop-footer li {
    color: #DADADA;
    font-size: 0.9rem;
    line-height: 2;
}

.cyber-group-desktop {
    margin-top: auto;
    background: #000;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #333;
}

.cyber-group-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0;
    font-family: 'Arial Black', 'Impact', sans-serif;
    text-shadow: 0 0 10px rgba(211, 47, 47, 0.8), 0 0 20px rgba(211, 47, 47, 0.5);
    font-style: italic;
}

/* =========================================
   17. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 991.98px) {
    .desktop-only {
        display: none !important;
    }

    .cyber-group-desktop {
        display: block !important;
        padding: 20px 0;
        background: #000;
    }

    body {
        padding-bottom: 90px;
    }

    .mobile-chat-fab {
        position: fixed;
        right: 20px;
        bottom: 90px;
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.4rem;
        box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
        z-index: 9999;
        cursor: pointer;
        text-decoration: none;
    }
}

@media (max-width: 575.98px) {
    body {
        padding-bottom: 110px;
    }

    .custom-header {
        min-height: 68px;
        padding: 10px 12px;
    }

    .header-logo {
        font-size: 0.95rem;
    }

    .header-logo img {
        max-width: 80px;
        max-height: 38px;
    }

    .product-detail-card {
        border-radius: 14px;
    }

    .product-gallery,
    .product-info {
        padding: 14px;
    }

    .product-info-title {
        font-size: 1.05rem;
    }

    .price-current {
        font-size: 1.3rem;
    }

    .reviews-overview {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-features {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .btn-favorite-main {
        width: 100%;
        height: 48px;
    }

    .addons-section {
        padding: 12px;
    }

    .login-modal {
        padding: 25px 20px;
    }

    .login-modal-title {
        font-size: 1.15rem;
    }

    .product-specs-table td {
        padding: 10px 12px;
        font-size: 0.78rem;
    }

    .product-specs-table td.spec-name {
        width: 45%;
    }
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }

    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: block !important;
    }

    .desktop-fab {
        position: fixed;
        bottom: 30px;
        left: 30px;
        width: 70px;
        height: 70px;
        background: var(--primary-gradient);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.5rem;
        box-shadow: 0 6px 18px rgba(211, 47, 47, 0.4);
        z-index: 999;
        cursor: pointer;
        text-decoration: none;
    }

    .desktop-fab-chat {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 70px;
        height: 70px;
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.5rem;
        box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
        z-index: 9999;
        cursor: pointer;
        text-decoration: none;
    }
}


/* =========================================================
   CHAT WIDGET STYLES (هماهنگ با رنگ آیکون)
   ========================================================= */
:root {
    /* رنگ‌های اصلی آیکون */
    --chat-primary: #4f46e5;
    --chat-secondary: #818cf8;
    --chat-gradient: linear-gradient(135deg, #4f46e5, #818cf8);
    
    /* رنگ‌های پس‌زمینه و متن */
    --chat-bg: #ffffff;
    --chat-bg-chat: #f8f9fa;
    --chat-text-dark: #1f2937;
    --chat-text-light: #6b7280;
    --chat-shadow: 0 20px 50px rgba(79, 70, 229, 0.25); /* سایه با تم آبی */
}

.chat-fab {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--chat-gradient);
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.chat-fab:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.5);
}

.chat-fab.hidden {
    transform: translateY(100px) scale(0);
    opacity: 0;
    pointer-events: none;
}

.chat-wrapper {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: var(--chat-bg);
    border-radius: 24px;
    box-shadow: var(--chat-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    
    /* انیمیشن ورود */
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.chat-wrapper.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* هدر چت با گرادیانت آیکون */
.chat-header {
    background: var(--chat-gradient);
    padding: 18px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chat-header h6 {
    margin: 0;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.chat-header small {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    opacity: 0.9;
}

.chat-header .status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80; /* سبز روشن */
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--chat-bg-chat);
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
}

/* استایل اسکرول‌بار */
.chat-body::-webkit-scrollbar {
    width: 6px;
}
.chat-body::-webkit-scrollbar-track {
    background: transparent;
}
.chat-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}
.chat-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.date-divider {
    text-align: center;
    margin: 20px 0;
}

.date-divider span {
    background: rgba(255, 255, 255, 0.8);
    color: var(--chat-text-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

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

/* چیدمان پیام‌ها */
.message.user { align-items: flex-start; } /* کاربر سمت راست */
.message.admin { align-items: flex-end; } /* ادمین سمت چپ */

.bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    word-wrap: break-word;
    position: relative;
}

/* حباب پیام کاربر (سفید) */
.message.user .bubble {
    background: white;
    color: var(--chat-text-dark);
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* حباب پیام ادمین (آبی گرادیانت) */
.message.admin .bubble {
    background: var(--chat-gradient);
    color: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.msg-meta {
    font-size: 10px;
    color: var(--chat-text-light);
    margin-top: 4px;
    display: block;
    padding: 0 4px;
}

.message.user .msg-meta { text-align: right; }
.message.admin .msg-meta { text-align: left; color: #9ca3af; }

/* فوتر و ورودی */
.chat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 25px;
    padding: 12px 20px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.chat-input:focus {
    background: white;
    border-color: var(--chat-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--chat-gradient);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.4);
}

.send-btn:disabled { 
    opacity: 0.6; 
    cursor: not-allowed; 
    transform: none;
    box-shadow: none;
}

.send-btn i {
    font-size: 16px;
    transform: rotate(180deg); /* برای RTL چرخش آیکون */
}

@media (max-width: 768px) {
    .chat-wrapper {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 0;
    }
    .chat-fab {
        bottom: 90px;
        right: 20px;
    }
}