/* =========================================================
   Aab Iran Store - Main Stylesheet
   Crafted with Modern CSS & Bootstrap 5 RTL Integration
   ========================================================= */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-sans: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
    
    /* Water & Industrial Color Palette */
    --color-primary: #0284c7;
    --color-primary-hover: #0369a1;
    --color-primary-light: #e0f2fe;
    --color-teal: #0d9488;
    --color-navy: #0f172a;
    --color-dark: #1e293b;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --color-surface: #ffffff;
    --color-body-bg: #f8fafc;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;

    /* Elevations & Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.06);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-body-bg);
    color: var(--color-dark);
    line-height: 1.75;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* SVG Icon Helper */
.icon {
    display: inline-block;
    vertical-align: -0.15em;
    stroke-width: 2;
    transition: transform var(--transition-fast);
}

/* Top Information Bar */
.top-bar {
    background-color: #0b132b;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid #1c2541;
}

.top-bar a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.top-bar a:hover {
    color: #38bdf8;
}

/* Glassmorphism Header */
.navbar-glass {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1020;
    transition: all var(--transition-smooth);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.35rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand .brand-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

.nav-link {
    font-weight: 500;
    color: #334155;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

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

/* Action Buttons & Utilities */
.btn-action-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-dark);
    position: relative;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

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

.badge-counter {
    position: absolute;
    top: -5px;
    left: -5px;
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Buttons */
.btn-water {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
    transition: all var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-water:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-water-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 10px;
    transition: all var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-water-outline:hover {
    background: var(--color-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-wrapper {
    background: linear-gradient(135deg, #0b132b 0%, #1c2541 60%, #0369a1 100%);
    color: #ffffff;
    padding: 70px 0 90px;
    position: relative;
    overflow: hidden;
}

.hero-wrapper::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--color-body-bg);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.1rem;
    color: #cbd5e1;
    line-height: 1.9;
    margin-bottom: 32px;
}

/* Cards & Components */
.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all var(--transition-smooth);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
    border-color: #bae6fd;
}

.product-image-box {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    overflow: hidden;
    transition: background var(--transition-smooth);
}

.product-alt-link,
.product-image-link {
    text-decoration: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-img {
    max-width: 100%;
    max-height: 155px;
    object-fit: contain;
    transition: transform var(--transition-smooth);
}

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

.product-alt-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 14px 16px;
    width: 100%;
    max-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all var(--transition-smooth);
}

.product-card:hover .product-alt-content {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}

.product-alt-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mega Menu Styles */
.mega-menu-wrapper {
    position: static !important;
}

@media (min-width: 992px) {
    .mega-menu-dropdown {
        display: block !important;
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-radius: 0 0 16px 16px !important;
        border-top: 3px solid var(--color-primary) !important;
        box-shadow: 0 25px 40px -10px rgba(15, 23, 42, 0.18);
        margin-top: 0 !important;
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(8px);
        transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
    }

    /* Invisible hover bridge to eliminate flicker */
    .mega-menu-dropdown::before {
        content: '';
        position: absolute;
        top: -24px;
        left: 0;
        right: 0;
        height: 24px;
        background: transparent;
    }

    .mega-menu-wrapper:hover .mega-menu-dropdown,
    .mega-menu-dropdown:hover,
    .mega-menu-wrapper.is-open .mega-menu-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .mega-menu-wrapper:hover .mega-menu-btn,
    .mega-menu-wrapper.is-open .mega-menu-btn {
        border-color: var(--color-primary);
        color: var(--color-primary);
        background-color: var(--color-primary-light);
    }
}

.mega-menu-col h6 {
    font-size: 0.95rem;
}

.mega-menu-col ul li a {
    color: #475569;
    font-size: 0.88rem;
    transition: all var(--transition-fast);
    display: inline-block;
    padding: 3px 0;
}

.mega-menu-col ul li a:hover {
    color: var(--color-primary);
    transform: translateX(-4px);
}

/* Mobile Nav Drawer Styles */
.mobile-nav-drawer {
    width: 320px !important;
    max-width: 88vw;
}

.mobile-nav-drawer .accordion-button {
    font-size: 0.9rem;
    box-shadow: none !important;
}

.mobile-nav-drawer .accordion-button::after {
    margin-right: auto;
    margin-left: 0;
}

.mobile-nav-drawer .accordion-body a {
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.mobile-nav-drawer .accordion-body a:hover {
    color: var(--color-primary) !important;
    transform: translateX(-4px);
}

/* Product Identity Card in Product Detail */
.product-identity-card {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.05) 0%, rgba(13, 148, 136, 0.05) 100%);
    border: 1px solid var(--color-border);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-identity-inner {
    background: var(--color-surface);
    border-color: var(--color-border) !important;
}

/* Cart thumbnail text box */
.cart-item-text-box {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px;
    line-height: 1.2;
    overflow: hidden;
    flex-shrink: 0;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.product-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.1rem;
}

.product-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.product-price-box {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.current-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-navy);
}

.old-price {
    font-size: 0.85rem;
    color: var(--color-muted);
    text-decoration: line-through;
    margin-bottom: 2px;
}

/* Offcanvas Cart */
.offcanvas-cart {
    width: 400px !important;
}

.cart-item-row {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    align-items: center;
}

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

/* Footer */
footer.main-footer {
    background-color: #0b132b;
    color: #94a3b8;
    padding: 60px 0 24px;
    border-top: 1px solid #1c2541;
}

footer.main-footer h5 {
    color: #f1f5f9;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

footer.main-footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

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

footer.main-footer ul li {
    margin-bottom: 10px;
}

footer.main-footer ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: all var(--transition-fast);
}

footer.main-footer ul li a:hover {
    color: #38bdf8;
    padding-right: 6px;
}

.footer-bottom {
    border-top: 1px solid #1c2541;
    padding-top: 20px;
    margin-top: 40px;
    font-size: 0.88rem;
}

/* =========================================================
   Interactive 3D Water Journey & Glowing Flow Pulse
   ========================================================= */
.water-journey-card {
    background: #0b132b;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    box-shadow: 0 20px 45px -10px rgba(2, 132, 199, 0.4), 0 0 35px rgba(56, 189, 248, 0.2);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.water-journey-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -10px rgba(2, 132, 199, 0.5), 0 0 45px rgba(56, 189, 248, 0.3);
}

.water-visual-stage {
    position: relative;
    overflow: hidden;
    background: #0b132b;
}

.water-flow-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.water-journey-card:hover .water-flow-img {
    transform: scale(1.02);
}

/* SVG Flow Overlay */
.water-flow-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.water-flow-svg-overlay path {
    fill: none !important;
}

.water-pipe-track {
    fill: none !important;
    stroke: rgba(56, 189, 248, 0.45) !important;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 8 10;
    animation: waterPipeDash 1.8s linear infinite;
}

@keyframes waterPipeDash {
    from {
        stroke-dashoffset: 36;
    }
    to {
        stroke-dashoffset: 0;
    }
}



