/* Modern Theme CSS for DimaShop */

:root {
    /* Digikala Color Scheme */
    --primary-color: #ef4056;
    --primary-hover: #d32f2f;
    --secondary-color: #666666;
    --success-color: #00a651;
    --danger-color: #ef4056;
    --warning-color: #ff9500;
    --info-color: #00bfd6;
    --light-color: #f5f5f5;
    --dark-color: #23254e;
    --body-bg: #ffffff;
    --text-color: #23254e;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #ef4056 0%, #d32f2f 100%);
    --gradient-secondary: linear-gradient(135deg, #00bfd6 0%, #0097a7 100%);
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .me-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
[dir="rtl"] .me-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
[dir="rtl"] .me-3 { margin-right: 1rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
[dir="rtl"] .ms-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }

/* Top Bar - Digikala Style */
.top-bar {
    background: var(--dark-color);
    font-size: 0.875rem;
    z-index: 1000;
    padding: 0.5rem 0;
}

.top-bar .btn-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.top-bar .btn-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.top-bar .language-switcher .btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.top-bar .language-switcher .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Main Header - Digikala Style */
.main-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.navbar-brand img {
    max-height: 50px;
    width: auto;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Search Container - Digikala Style */
.search-container {
    position: relative;
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
}

.search-form {
    display: flex;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search-input {
    flex: 1;
    border: 2px solid var(--primary-color);
    border-right: none;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(239, 64, 86, 0.1);
}

.search-btn {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
}

/* Header Actions - Digikala Style */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    position: relative;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background: var(--light-color);
    border: 1px solid var(--border-color);
}

.action-btn:hover {
    color: var(--primary-color);
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.action-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-switcher .btn {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.language-switcher .btn:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Navigation */
.main-nav {
    border-bottom: 1px solid var(--border-color);
}

.nav-pills .nav-link {
    color: var(--text-color);
    border-radius: 0;
    padding: 1rem 1.5rem;
    transition: all 0.2s ease;
}

.nav-pills .nav-link:hover,
.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Mega Menu */
.mega-menu {
    width: 600px;
    padding: 1rem;
}

.mega-menu .dropdown-header {
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.product-card-mini {
    text-align: center;
    padding: 0.5rem;
}

.product-card-mini img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.product-card-mini h6 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.product-card-mini .price {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

/* Mobile Menu */
.mobile-menu-toggle {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
    display: none;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav a {
    display: block;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* Hero Section - Digikala Style */
.hero-section {
    background: var(--gradient-primary);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-weight: 800;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section .lead {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-btn-primary {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.hero-btn-primary:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.hero-btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Quick Categories - Digikala Style */
.quick-category-card {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.quick-category-card:hover {
    transform: translateY(-8px);
    text-decoration: none;
}

.quick-category-card:hover .category-card {
    box-shadow: 0 8px 25px rgba(239, 64, 86, 0.15);
    border-color: var(--primary-color);
}

.category-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: white;
}

.category-card:hover {
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.quick-category-card:hover .category-icon {
    transform: scale(1.1);
    color: var(--primary-hover);
}

.category-name {
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.quick-category-card:hover .category-name {
    color: var(--primary-color);
}

/* All Categories List - Digikala Style */
.all-categories {
    padding: 4rem 0;
}

.category-list-item {
    display: block;
    transition: all 0.3s ease;
}

.category-list-item:hover {
    transform: translateY(-8px);
    text-decoration: none;
}

.category-list-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: white;
}

.category-list-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(239, 64, 86, 0.15);
}

.category-list-card .category-icon {
    transition: all 0.3s ease;
}

.category-list-item:hover .category-icon {
    transform: scale(1.1);
}

.category-list-card .card-title {
    transition: color 0.3s ease;
}

.category-list-item:hover .card-title {
    color: var(--primary-color) !important;
}

.category-arrow {
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(-10px);
}

.category-list-item:hover .category-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Product Sections - Digikala Style */
.latest-products,
.most-viewed-products,
.recommended-products,
.featured-products {
    padding: 4rem 0;
}

.latest-products {
    background: white;
}

.most-viewed-products {
    background: var(--light-color);
}

.recommended-products {
    background: white;
}

.featured-products {
    background: var(--light-color);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Product Cards - Digikala Style */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    background: white;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(239, 64, 86, 0.15);
    border-color: var(--primary-color);
}

.product-image-container {
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

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

.product-badges {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.badge-featured {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    display: block;
}

.badge-discount {
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    display: block;
}

.badge-new {
    background: var(--success-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: block;
}

.product-actions {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(10px);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.product-content {
    padding: 1.25rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.rating-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.product-price {
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.product-actions-bottom {
    margin-top: 1rem;
}

.add-to-cart-btn {
    width: 100%;
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 64, 86, 0.3);
}

.stock-status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.low-stock {
    background: rgba(255, 193, 7, 0.9);
    color: var(--dark-color);
}

/* Special Offers - Digikala Style */
.special-offers {
    background: var(--light-color);
    padding: 4rem 0;
}

.offer-card {
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

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

.offer-badge {
    font-size: 0.75rem;
    z-index: 10;
}

.countdown-item {
    min-width: 70px;
    transition: all 0.3s ease;
}

.countdown-item:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.3) !important;
}

.countdown-number {
    line-height: 1;
}

.benefit-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Features */
.features {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.feature-item {
    text-align: center;
    padding: 2rem 1rem;
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--secondary-color);
    line-height: 1.6;
}

/* Newsletter */
.newsletter-section {
    background: linear-gradient(135deg, var(--info-color) 0%, #138496 100%);
    color: white;
    padding: 4rem 0;
}

.newsletter-form-inline {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form-inline .input-group {
    border-radius: 25px;
    overflow: hidden;
}

.newsletter-form-inline .form-control {
    border: none;
    padding: 0.75rem 1.5rem;
}

.newsletter-form-inline .btn {
    border-radius: 0 25px 25px 0;
    padding: 0.75rem 2rem;
}

/* Blog Section */
.blog-section {
    padding: 4rem 0;
}

.blog-card {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

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

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-meta {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 0;
}

.footer-section h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

.newsletter-form .form-control {
    border-radius: 0.375rem 0 0 0.375rem;
    border: none;
}

.newsletter-form .btn {
    border-radius: 0 0.375rem 0.375rem 0;
}

.payment-methods {
    background: rgba(255, 255, 255, 0.1);
}

.payment-icons img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.security-badges .badge {
    font-size: 0.75rem;
}

.bottom-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: white;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    display: none;
}

.back-to-top:hover {
    background: #0056b3;
    transform: translateY(-3px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .offer-timer {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .timer-item {
        min-width: 60px;
        padding: 0.5rem;
    }
    
    .timer-number {
        font-size: 1.5rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* RTL Specific Styles */
[dir="rtl"] .search-input {
    border-radius: 0 25px 25px 0;
    border-left: none;
    border-right: 1px solid var(--border-color);
}

[dir="rtl"] .search-btn {
    border-radius: 25px 0 0 25px;
    border-right: none;
    border-left: 1px solid var(--border-color);
}

[dir="rtl"] .newsletter-form-inline .form-control {
    border-radius: 0 25px 25px 0;
}

[dir="rtl"] .newsletter-form-inline .btn {
    border-radius: 25px 0 0 25px;
}

[dir="rtl"] .newsletter-form .form-control {
    border-radius: 0 0.375rem 0.375rem 0;
}

[dir="rtl"] .newsletter-form .btn {
    border-radius: 0.375rem 0 0 0.375rem;
}
html body img{
    max-width:100%!important;
    height:auto;
}