/*
Theme Name: Dima Market
Theme URI: https://dimashop.ir
Author: Dima Team
Author URI: https://dimashop.ir
Description: قالب فروشگاهی حرفه‌ای Dima Market - کاملاً سازگار با افزونه Dima Shop Pro
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dima-market
Tags: e-commerce, rtl, custom-menu, featured-images, theme-options, translation-ready, woocommerce
*/

/* ═══════════════════════════════════════════════════════════
   متغیرهای CSS
   ═══════════════════════════════════════════════════════════ */
:root {
    --dima-primary: #00bfa5;
    --dima-primary-dark: #009688;
    --dima-secondary: #ff4081;
    --dima-accent: #ffd93d;
    --dima-dark: #263238;
    --dima-gray: #78909c;
    --dima-light: #f5f5f5;
    --dima-white: #ffffff;
    --dima-border: #eceff1;
}

/* ═══════════════════════════════════════════════════════════
   Reset و Base
   ═══════════════════════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'IRANSans', Tahoma, sans-serif;
    background: #f8f9fa;
    color: #263238;
    line-height: 1.6;
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

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

/* ═══════════════════════════════════════════════════════════
   Utility Classes
   ═══════════════════════════════════════════════════════════ */
.gradient-primary {
    background: linear-gradient(135deg, #00bfa5 0%, #009688 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #ff4081 0%, #f50057 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
}

.gradient-red {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

/* ═══════════════════════════════════════════════════════════
   Mobile Menu - RTL
   ═══════════════════════════════════════════════════════════ */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
    right: 0;
    left: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* ═══════════════════════════════════════════════════════════
   Product Card
   ═══════════════════════════════════════════════════════════ */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ═══════════════════════════════════════════════════════════
   Promo Banners
   ═══════════════════════════════════════════════════════════ */
.promo-banner {
    min-height: 220px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.3s;
}

.promo-banner:hover {
    transform: translateY(-5px);
}

.promo-banner-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.promo-banner-image {
    position: absolute;
    left: 15px;
    bottom: 15px;
    max-width: 45%;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   Flash Sale Side
   ═══════════════════════════════════════════════════════════ */
.flash-sale-side {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 20px 10px;
    z-index: 10;
}

.flash-sale-products-wrapper {
    margin-left: 80px;
}

/* ═══════════════════════════════════════════════════════════
   Modal
   ═══════════════════════════════════════════════════════════ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   Owl Carousel RTL
   ═══════════════════════════════════════════════════════════ */
.owl-carousel .owl-item {
    float: right;
}

.owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white !important;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.owl-nav .owl-prev {
    right: -20px;
}

.owl-nav .owl-next {
    left: -20px;
}

/* ═══════════════════════════════════════════════════════════
   Custom Scrollbar
   ═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #00bfa5;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════
   Line Clamp
   ═══════════════════════════════════════════════════════════ */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .flash-sale-side {
        display: none !important;
    }
    
    .flash-sale-products-wrapper {
        margin-left: 0;
    }
    
    .promo-banner {
        min-height: 180px;
    }
}
/* ═══════════════════════════════════════════════════════════════
   🎨 Premium Mobile Bottom Navigation
   ═══════════════════════════════════════════════════════════════ */

/* Base Container */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
    }
}

/* Main Navigation Container */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 
        0 -4px 20px rgba(0, 0, 0, 0.08),
        0 -1px 3px rgba(0, 0, 0, 0.04);
}

/* Navigation Items */
.bottom-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Active Indicator (Top Line) */
.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #00bfa5, #009688);
    border-radius: 0 0 3px 3px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow Effect */
.bottom-nav-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(0, 191, 165, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Icon Container */
.bottom-nav-icon {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.bottom-nav-icon i {
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Label Text */
.bottom-nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

/* Badge Counter */
.bottom-nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ff4081, #f50057);
    color: white;
    font-size: 10px;
    font-weight: 800;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 2px 8px rgba(255, 64, 129, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.9);
    animation: badge-pulse 2s ease-in-out infinite;
    z-index: 3;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 2px 8px rgba(255, 64, 129, 0.4),
            0 0 0 2px rgba(255, 255, 255, 0.9);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 
            0 4px 12px rgba(255, 64, 129, 0.6),
            0 0 0 2px rgba(255, 255, 255, 0.9);
    }
}

/* Hover States */
.bottom-nav-item:hover {
    color: #00bfa5;
}

.bottom-nav-item:hover .bottom-nav-icon {
    background: rgba(0, 191, 165, 0.08);
}

.bottom-nav-item:hover .bottom-nav-icon i {
    transform: translateY(-2px) scale(1.1);
}

/* Active State */
.bottom-nav-item.active {
    color: #00bfa5;
}

.bottom-nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

.bottom-nav-item.active::after {
    transform: translate(-50%, -50%) scale(1);
}

.bottom-nav-item.active .bottom-nav-icon {
    background: linear-gradient(135deg, rgba(0, 191, 165, 0.15), rgba(0, 150, 136, 0.1));
    box-shadow: 0 4px 12px rgba(0, 191, 165, 0.2);
}

.bottom-nav-item.active .bottom-nav-icon i {
    color: #00bfa5;
    transform: translateY(-2px) scale(1.15);
}

.bottom-nav-item.active .bottom-nav-label {
    color: #00bfa5;
    font-weight: 700;
    transform: translateY(-1px);
}

/* Tap Animation */
.bottom-nav-item:active {
    transform: scale(0.95);
}

.bottom-nav-item:active .bottom-nav-icon {
    background: rgba(0, 191, 165, 0.2);
}

/* Cart Special */
.bottom-nav-item-cart .bottom-nav-icon {
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.08), rgba(245, 0, 87, 0.05));
}

.bottom-nav-item-cart.active .bottom-nav-icon {
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.2), rgba(245, 0, 87, 0.15));
    box-shadow: 0 4px 12px rgba(255, 64, 129, 0.25);
}

.bottom-nav-item-cart.active .bottom-nav-icon i {
    color: #ff4081;
}

.bottom-nav-item-cart.active::before {
    background: linear-gradient(90deg, #ff4081, #f50057);
}

.bottom-nav-item-cart.active .bottom-nav-label {
    color: #ff4081;
}

.bottom-nav-item-cart:hover .bottom-nav-icon i {
    animation: cart-bounce 0.6s ease-in-out;
}

@keyframes cart-bounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-4px) rotate(-5deg); }
    75% { transform: translateY(-2px) rotate(5deg); }
}

/* Wishlist Special */
.bottom-nav-item-wishlist .bottom-nav-icon {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.08), rgba(194, 24, 91, 0.05));
}

.bottom-nav-item-wishlist.active .bottom-nav-icon {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2), rgba(194, 24, 91, 0.15));
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.25);
}

.bottom-nav-item-wishlist.active .bottom-nav-icon i {
    color: #e91e63;
}

.bottom-nav-item-wishlist.active::before {
    background: linear-gradient(90deg, #e91e63, #c2185b);
}

.bottom-nav-item-wishlist.active .bottom-nav-label {
    color: #e91e63;
}

.bottom-nav-item-wishlist:hover .bottom-nav-icon i {
    animation: heart-beat 0.8s ease-in-out;
}

@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3) rotate(-10deg); }
    50% { transform: scale(0.9) rotate(10deg); }
    75% { transform: scale(1.2); }
}

/* Home Special */
.bottom-nav-item-home.active .bottom-nav-icon {
    background: linear-gradient(135deg, #00bfa5, #009688);
    box-shadow: 0 4px 16px rgba(0, 191, 165, 0.4);
}

.bottom-nav-item-home.active .bottom-nav-icon i {
    color: white;
    transform: translateY(-2px) scale(1.15);
}

.bottom-nav-item-home.active .bottom-nav-label {
    color: #00bfa5;
    font-weight: 800;
}

/* Safe Area Support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    @media (max-width: 768px) {
        body {
            padding-bottom: calc(80px + env(safe-area-inset-bottom));
        }
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .bottom-nav-item,
    .bottom-nav-icon,
    .bottom-nav-icon i,
    .bottom-nav-label,
    .bottom-nav-badge {
        animation: none !important;
        transition: none !important;
    }
}

/* Landscape Mode */
@media (max-width: 768px) and (orientation: landscape) {
    .bottom-nav {
        height: 56px;
    }
    
    .bottom-nav-item {
        flex-direction: row;
        gap: 8px;
        padding: 8px 16px;
    }
    
    .bottom-nav-icon {
        width: 32px;
        height: 32px;
    }
    
    .bottom-nav-icon i {
        font-size: 16px;
    }
    
    .bottom-nav-label {
        font-size: 12px;
    }
}

/* Print */
@media print {
    .bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}