/*
Theme Name: الأول
Theme URI: https://example.com/proservice-arabic
Author: Antigravity
Author URI: https://example.com
Description: A modern Corporate Arabic-first WordPress theme inspired by "Sharekah" layout.
Version: 1.0.0
Text Domain: pro-sharekah
Tags: rtl-language-support, custom-colors, right-sidebar, custom-menu, featured-images, footer-widgets
*/

:root {
    --primary-color: #0d6efd;
    /* Default Bootstrap Primary */
    --secondary-color: #6c757d;
    /* Default Bootstrap Secondary */
    color-scheme: light;
    --accent-color: #f8f9fa;
    --heading-font: 'Cairo', sans-serif;
    --body-font: 'Almarai', sans-serif;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --transition: all 0.3s ease;
    /* Fallbacks likely handled by inline CSS, but keeping here as base */
    --logo-width: 200px;
    --static-btn-color: #32a191;
}

/* Global Typography */
body {
    font-family: var(--body-font);
    color: var(--text-light);
    line-height: 1.7;
    background-color: #fff;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* 
 * 1. Top Bar 
 */
.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    padding-block: 10px;
    font-size: 0.9rem;
}

.top-bar a {
    color: var(--white);
    margin-inline-end: 15px;
}

.top-bar-contact i,
.top-bar-social i {
    margin-inline-end: 5px;
}

/*
 * 2. Header & Sticky
 */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-block: 15px;
    transition: var(--transition);
}

.navbar-brand img,
.custom-logo {
    max-height: 80px;
    width: auto;
    height: auto;
}

/* Desktop Navigation Styling */
.desktop-navigation {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    /* Increased from 15px/10px */
    list-style: none;
    padding: 0;
    margin: 0;
}

.desktop-navigation li {
    position: relative;
    padding: 0;
}

.desktop-navigation li a {
    display: block;
    padding: 10px 0;
    /* Removed horizontal padding since we use gap */
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.desktop-navigation li a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    /* Adjusted */
    right: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.desktop-navigation li:hover>a {
    color: var(--primary-color);
}

.desktop-navigation li:hover>a::after {
    transform: scaleX(1);
}

/* Sub-menu (Dropdown) Styling */
.desktop-navigation .sub-menu {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    /* Logical Property: Aligns to start (Right in RTL, Left in LTR) */
    background: #fff;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 1001;
    border-top: 3px solid var(--primary-color);
    border-radius: 0 0 8px 8px;
}

.desktop-navigation li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desktop-navigation .sub-menu li {
    width: 100%;
}

.desktop-navigation .sub-menu li a {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid #f8f9fa;
    text-align: start;
    /* Logical alignment */
}

.desktop-navigation .sub-menu li a::after {
    display: none;
}

.desktop-navigation .sub-menu li a:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    padding-inline-start: 25px;
}

.desktop-navigation .sub-menu li:last-child a {
    border-bottom: none;
}

/* Parent Arrow Indicator */
.menu-item-has-children>a::before {
    content: '\f107';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-inline-end: 8px;
    /* Space between text and icon */
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    display: inline-block;
    /* Logical float or just inline-block with order */
}

.menu-item-has-children:hover>a::before {
    transform: rotate(180deg);
}

.header-cta .btn {
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 700;
    font-family: var(--heading-font);
    background: var(--secondary-color);
    border: none;
    color: var(--white);
}

.header-cta .btn:hover {
    background: var(--primary-color);
}

/*
 * 3. Hero Section (Swiper & Static)
 */
.hero-section {
    position: relative;
    direction: ltr;
    direction: inherit;
}

/* Static Hero Design (High Conversion) */
.static-hero {
    padding: 80px 0;
    background: #fff;
    overflow: hidden;
    position: relative;
}

.static-hero-content {
    text-align: right;
}

.static-hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 25px;
    color: var(--dark-color);
}

.static-hero-desc {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.8;
}

.btn-static-hero {
    background: var(--static-btn-color, var(--primary-color));
    color: #fff !important;
    padding: 15px 45px;
    border-radius: 50px;
    /* Consistent Pill Style */
    font-weight: 700;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-static-hero:hover {
    background: var(--primary-color);
    filter: brightness(0.85);
    color: #fff !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(13, 110, 253, 0.25);
}

.static-hero-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-anim {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* responsive */
@media (max-width: 991.98px) {
    .static-hero {
        padding: 60px 0;
    }

    .static-hero-title {
        font-size: 2.2rem;
        text-align: center;
    }

    .static-hero-desc {
        text-align: center;
    }

    .static-hero-content {
        text-align: center;
    }

    .static-hero-btns {
        text-align: center;
    }
}

/* 
 * Scoped to Hero Slider only to avoid conflicts 
 */
.hero-slider .swiper-slide {
    height: 80vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

/* Generic Swiper Reset */
.swiper-slide {
    height: auto;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay, rgba(0, 0, 0, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-align: start;
    /* Logical */
}

.hero-title {
    font-size: 3.5rem;
    color: var(--white);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/*
 * 4. Section Commons
 */
.section-padding {
    padding-block: 80px;
}

.section-title-wrapper {
    margin-bottom: 50px;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    left: 50%;
    /* Center always */
    transform: translateX(-50%);
}

/*
 * 5. Services Grid
 */
.service-card {
    background: var(--white);
    padding: 40px 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    transition: var(--transition);
    height: 100%;
    text-align: center;
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/*
 * 6. About Section
 */
/* Blob Image Effect */
.about-img-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border: none;
    /* Remove old border */
}

.about-img-wrapper img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    box-shadow: 0 20px 50px rgba(13, 110, 253, 0.2);
    /* Primary color shadow */
    animation: blob-bounce 8s ease-in-out infinite;
    transition: all 0.5s ease-in-out;
}

@keyframes blob-bounce {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.about-img-wrapper img:hover {
    transform: scale(1.02);
}

.vision-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.vision-list li {
    position: relative;
    padding-inline-start: 30px;
    margin-bottom: 10px;
    text-align: start;
    /* Logical */
}

.vision-list li::before {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    inset-inline-start: 0;
    /* Logical: Start of line */
    color: var(--primary-color);
}

/*
 * 7. Counter Section
 */
.counter-section {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
}

.counter-item h3 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 5px;
    font-weight: 800;
}

.counter-item p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/*
 * 8. Footer
 */
.site-footer {
    background: #1a1a1a;
    color: #aaa;
    padding-top: 80px;
    font-size: 0.95rem;
}

.site-footer h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaa;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-inline-start: 5px;
}

.footer-bottom {
    background: #111;
    padding-block: 20px;
    margin-top: 60px;
    border-top: 1px solid #222;
    text-align: center;
}

/* Mobile Nav Toggler adjustments for RTL */
.navbar-toggler {
    margin-inline-start: auto;
    /* Push to left in RTL if logo is right */
}

/* Responsive */
@media (max-width: 991px) {
    .header-cta {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

/* Mobile Nav Overrides */
@media (max-width: 991.98px) {
    .offcanvas {
        z-index: 10001 !important;
    }

    .mobile-lang-switcher a {
        font-family: var(--heading-font);
        font-weight: 600;
        color: var(--text-dark) !important;
    }

    .mobile-navigation {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .mobile-navigation li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .mobile-navigation li a {
        padding: 12px 0;
    }

    .mobile-navigation .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-inline-start: 20px;
        background: #fdfdfd;
        display: none;
        /* Toggleable in mobile but for simple starter we show or use a better selector */
    }

    .mobile-navigation li:hover>.sub-menu {
        display: block;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .swiper-slide {
        height: auto;
        padding-block: 80px;
    }

    /* Section Spacing */
    .section-padding {
        padding-block: 50px;
    }
}

/* Navbar Logo Fix for Mobile RTL */
.navbar-brand {
    margin-inline-end: 0;
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 1.1rem;
}

/* 
 * 9. Testimonials Section (New) 
 */
.testimonial-slider {
    padding-bottom: 50px;
    /* Space for pagination */
}

.testimonial-slider .swiper-slide {
    height: auto;
    padding-block: 20px;
    /* Reset hero padding */
}

.testimonial-slider .card {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    height: 100%;
    transition: var(--transition);
    background: var(--white);
    text-align: center;
    /* Center content */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial-slider .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.testimonial-slider .card p.text-muted {
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.8;
}

.test-pagination {
    position: relative;
    margin-top: 20px;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: var(--secondary-color);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background-color: var(--primary-color);
    opacity: 1;
    transform: scale(1.2);
}

/* 
 * 10. Advanced Category Page Styles
 */

/* Enhanced Header */
.category-header-advanced {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
}

.theme-breadcrumbs {
    margin-bottom: 20px;
}

.theme-breadcrumbs .breadcrumb {
    background: transparent;
    padding: 0;
    justify-content: center;
}

.theme-breadcrumbs .breadcrumb-item a {
    color: var(--text-light);
    font-size: 0.9rem;
}

.category-marketing-desc {
    color: var(--text-light);
    line-height: 1.8;
}

/* Tech Grid Layout */
.service-card-tech {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.service-card-tech:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.2);
}

.card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.icon-holder {
    width: 60px;
    height: 60px;
    background: rgba(13, 110, 253, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card-tech:hover .icon-holder {
    background: var(--primary-color);
    color: #fff;
}

.service-card-tech:hover .icon-holder i {
    color: #fff;
}

.tech-icon-img {
    max-width: 40px;
    height: auto;
}


/* 
 * 11. WooCommerce Mobile Responsiveness Fixes
 */

/* General Mobile Tweaks */
@media (max-width: 767.98px) {

    /* Product Page */
    .single-product-page {
        padding-bottom: 100px;
        /* Ensure content clears the sticky bottom bar */
    }

    .single-product .product_title {
        font-size: 1.5rem;
        /* Manageable title size */
        line-height: 1.3;
    }

    .single-product .price {
        font-size: 1.4rem !important;
    }

    /* Stack gallery thumbnails better */
    .single-product .product-gallery-wrapper .col-3 {
        width: 25%;
        /* Ensure 4 thumbnails per row */
        padding: 2px !important;
    }

    /* Cart Page Mobile Optimization */
    .woocommerce-cart-form__contents {
        display: block;
        width: 100%;
    }

    .shop_table.cart {
        display: block;
        width: 100%;
    }

    .shop_table.cart thead {
        display: none;
        /* Hide headers on mobile */
    }

    .shop_table.cart tbody {
        display: block;
        width: 100%;
    }

    .shop_table.cart tr.cart_item {
        display: block;
        border: 1px solid #eee;
        margin-bottom: 15px;
        background: #fff;
        border-radius: 8px;
        padding: 15px;
        position: relative;
    }

    .shop_table.cart td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0 !important;
        border: none !important;
        /* Remove individual cell borders */
        border-bottom: 1px dashed #f5f5f5 !important;
        text-align: right !important;
        /* RTL align */
    }

    .shop_table.cart td:last-child {
        border-bottom: none !important;
    }

    /* Add labels for context */
    .shop_table.cart td.product-name::before {
        content: "المنتج:";
        font-weight: bold;
        color: #999;
        margin-inline-end: 10px;
    }

    .shop_table.cart td.product-price::before {
        content: "السعر:";
        font-weight: bold;
        color: #999;
        margin-inline-end: 10px;
    }

    .shop_table.cart td.product-quantity::before {
        content: "الكمية:";
        font-weight: bold;
        color: #999;
        margin-inline-end: 10px;
    }

    .shop_table.cart td.product-subtotal::before {
        content: "المجموع:";
        font-weight: bold;
        color: #999;
        margin-inline-end: 10px;
    }

    /* Special handling for Remove icon */
    .shop_table.cart td.product-remove {
        position: absolute;
        top: 5px;
        left: 5px;
        /* RTL flip needed? Usually left is fine for absolute X */
        width: auto !important;
        border: none !important;
        padding: 0 !important;
    }

    .shop_table.cart td.product-thumbnail {
        display: block;
        text-align: center !important;
        border-bottom: none !important;
    }

    .shop_table.cart td.product-thumbnail img {
        width: 80px;
        height: auto;
        border-radius: 5px;
    }

    /* Cart Actions */
    .actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 0 !important;
    }

    .coupon {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .coupon input {
        width: 100% !important;
    }

    .actions .button {
        width: 100%;
        margin: 0 !important;
    }

    /* Cart Collaterals (Totals) */
    .cart-collaterals {
        width: 100%;
        display: block;
    }

    .cart_totals {
        width: 100% !important;
        float: none !important;
        padding: 20px;
        background: #f9f9f9;
        border-radius: 10px;
    }

    /* Checkout Page Mobile Optimization */
    .col2-set {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .col2-set .col-1,
    .col2-set .col-2 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 30px;
    }

    .woocommerce-checkout-review-order {
        padding: 20px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 10px;
    }

    .woocommerce-checkout-payment {
        background: #fdfdfd !important;
        border-radius: 10px !important;
    }

    /* Order Review Table Mobile */
    .woocommerce-checkout-review-order-table {
        display: block;
        width: 100%;
    }

    .woocommerce-checkout-review-order-table thead {
        display: none;
    }

    .woocommerce-checkout-review-order-table tbody,
    .woocommerce-checkout-review-order-table tfoot,
    .woocommerce-checkout-review-order-table tr,
    .woocommerce-checkout-review-order-table td,
    .woocommerce-checkout-review-order-table th {
        display: block;
        width: 100%;
    }

    .woocommerce-checkout-review-order-table tr {
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .woocommerce-checkout-review-order-table td,
    .woocommerce-checkout-review-order-table th {
        text-align: right;
        padding: 5px 0 !important;
    }

    /* Global Input Fields on Mobile */
    .woocommerce form .form-row {
        width: 100% !important;
        display: block !important;
        padding: 3px 0;
    }

    .woocommerce-input-wrapper {
        width: 100%;
    }

    /* Account/Forms Mobile */
    .woocommerce-MyAccount-navigation {
        width: 100% !important;
        float: none !important;
        margin-bottom: 30px;
        border-right: none !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
    }

    .woocommerce-MyAccount-content {
        width: 100% !important;
        float: none !important;
    }
}


.tech-default-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}


.service-badge {
    position: absolute;
    top: 20px;
    inset-inline-end: 20px;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tech-stack-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: #f1f3f5;
    color: #495057;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.tech-tag:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

/* Visual Portfolio Layout */
.service-card-visual {
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
}

.showcase-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.showcase-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card-visual:hover img {
    transform: scale(1.1);
}

.hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.service-card-visual:hover .hover-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.service-card-visual:hover .overlay-content {
    transform: translateY(0);
}

.service-badge-visual {
    position: absolute;
    top: 15px;
    inset-inline-start: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
}

/* Logical Properties Support */
[dir="rtl"] .theme-breadcrumbs .breadcrumb-item+.breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    padding-right: 0;
}

/* RTL Adjustments for buttons and icons if needed */
.service-card-tech,
.service-card-visual {
    text-align: start;
    /* Logical */
}

/* Filter Bar */
.service-filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    color: var(--text-dark);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 
 * 11. Product Slider Styles
 */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.product-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    /* Force Square */
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-title {
    margin-bottom: 10px;
    font-size: 1rem;
}

.product-title a {
    color: var(--text-dark);
    font-weight: 700;
    transition: var(--transition);
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-excerpt {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-light);
    margin-bottom: 0;
}

.product-slider {
    padding-bottom: 60px;
}

.product-slider .swiper-button-next,
.product-slider .swiper-button-prev {
    color: var(--primary-color);
    background: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-slider .swiper-button-next::after,
.product-slider .swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: bold;
}

.product-pagination .swiper-pagination-bullet-active {
    background-color: var(--primary-color);
}

@media (max-width: 768px) {
    .category-header-advanced {
        padding-block: 50px;
    }

    .display-4 {
        font-size: 2.2rem;
    }
}

/* 
 * 11. Service Page: Web Design (Modern Redesign)
 */

.modern-service-page {
    --service-primary: #0caadc;
    --service-secondary: #32a191;
    --service-gradient: linear-gradient(135deg, #0caadc 0%, #32a191 100%);
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Page Header */
.modern-header {
    padding-block: 100px 60px;
    background: radial-gradient(circle at top right, rgba(12, 170, 220, 0.1), transparent),
        radial-gradient(circle at bottom left, rgba(50, 161, 145, 0.1), transparent);
}

/* Modern Step Flow */
.steps-section {
    padding-block: 80px;
}

.modern-steps-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
}

.modern-steps-container::before {
    content: '';
    position: absolute;
    top: 45px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e9ecef;
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 180px;
}

.step-number {
    width: 90px;
    height: 90px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--service-primary);
    box-shadow: 0 10px 25px rgba(12, 170, 220, 0.15);
    border: 4px solid #fff;
    transition: all 0.3s ease;
}

.step-item:hover .step-number {
    background: var(--service-primary);
    color: #fff;
    transform: translateY(-5px);
}

.step-title {
    font-size: 1rem;
    font-weight: 800;
    color: #333;
    line-height: 1.4;
}

/* Pulse Timeline (Mobile Only) */
@media (max-width: 991.98px) {
    .modern-steps-container {
        flex-direction: column;
        gap: 40px;
        margin: 30px auto;
        padding-inline-start: 40px;
    }

    .modern-steps-container::before {
        top: 0;
        bottom: 0;
        left: 45px;
        width: 3px;
        height: 100%;
        right: auto;
    }

    .step-item {
        width: 100%;
        text-align: right;
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .step-number {
        margin: 0;
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
        flex-shrink: 0;
    }
}

/* Premium Pricing Cards */
.pricing-section-modern {
    background: #f8fbff;
    padding-block: 80px;
}

.modern-pricing-card {
    background: #fff;
    border-radius: 30px;
    padding: 50px 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modern-pricing-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(12, 170, 220, 0.1);
}

.modern-pricing-card.is-popular {
    border: 2px solid var(--service-primary);
    background: linear-gradient(to bottom, #fff, #f0f9ff);
}

.popular-badge {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--service-primary);
    color: #fff;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.modern-pkg-info h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 25px;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-pkg-features {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    text-align: right;
}

.modern-pkg-features li {
    padding-block: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #555;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.modern-pkg-features li i {
    color: var(--service-primary);
    font-size: 0.8rem;
}

.btn-modern-order {
    margin-top: auto;
    background: #f1f3f5;
    color: #333;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modern-pricing-card.is-popular .btn-modern-order,
.btn-modern-order:hover {
    background: var(--service-primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(12, 170, 220, 0.2);
}

/* Premium Integrated Header (Final Refined - Solid Color) */
.premium-integrated {
    position: relative;
    padding: 160px 0 240px;
    background-color: #0d6efd;
    /* Solid color from top header */
    overflow: hidden;
    color: #fff;
}

/* Subtle code grid overlay */
.premium-integrated::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
}

.header-bg-glow {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    filter: blur(80px);
}


.header-content-wrapper {
    position: relative;
    z-index: 10;
}

.premium-integrated .display-2 {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -2.5px;
    margin-bottom: 25px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.premium-integrated p.lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 400;
}

.wave-divider-wrapper {
    position: absolute;
    bottom: -2px;
    /* Fix micro-gap */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 5;
}

.wave-divider-wrapper svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
    /* Taller for smoother curve */
}

.wave-divider-wrapper .shape-fill {
    fill: #ffffff;
}

@media (max-width: 991px) {
    .premium-integrated .display-2 {
        font-size: 3.5rem;
    }

    .premium-integrated {
        padding: 120px 0 180px;
    }

    .wave-divider-wrapper svg {
        height: 100px;
    }
}

@media (max-width: 768px) {
    .premium-integrated .display-2 {
        font-size: 2.8rem;
        letter-spacing: -1.5px;
    }

    .premium-integrated p.lead {
        font-size: 1.1rem;
    }

    .premium-integrated {
        padding: 100px 0 140px;
    }

    .wave-divider-wrapper svg {
        height: 70px;
    }
}

.wave-layer-1 {
    opacity: 0.3;
}

.wave-layer-1 .shape-fill {
    fill: #f8f9fa;
}

.wave-layer-1 svg {
    height: 140px;
}

.wave-layer-2 {
    opacity: 0.5;
}

.wave-layer-2 .shape-fill {
    fill: #f8f9fa;
}

.wave-layer-2 svg {
    height: 100px;
}

.wave-layer-main {
    position: relative;
    z-index: 2;
}

.wave-layer-main .shape-fill {
    fill: #f8f9fa;
}

@media (max-width: 991px) {
    .premium-integrated .display-2 {
        font-size: 3.5rem;
    }

    .premium-integrated {
        padding: 120px 0 180px;
    }
}

@media (max-width: 768px) {
    .premium-integrated .display-2 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .premium-integrated {
        padding: 100px 0 140px;
    }

    .wave-layer svg {
        height: 60px;
    }

    .wave-layer-1 svg {
        height: 80px;
    }
}

/* Features Highlight */
.modern-features-section {
    padding-block: 100px;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.feature-pill:hover {
    transform: scale(1.03);
}

.feature-pill-icon {
    width: 50px;
    height: 50px;
    background: rgba(12, 170, 220, 0.1);
    color: var(--service-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-pill-text {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
}

/* --- 12. Portfolio Slider Section --- */
.portfolio-slider-section {
    background: #fdfdfd;
}

.portfolio-swiper {
    padding: 40px 10px 60px !important;
}

.portfolio-item-modern {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.portfolio-img-wrapper {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.portfolio-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(12, 170, 220, 0.9), rgba(50, 161, 145, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    text-align: center;
}

.overlay-content h4 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 5px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.overlay-content .short-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 15px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portfolio-item-modern:hover .overlay-content h4,
.portfolio-item-modern:hover .overlay-content .short-desc {
    transform: translateY(0);
}

.portfolio-item-modern:hover .portfolio-img-wrapper img {
    transform: scale(1.1);
}

.portfolio-item-modern:hover .portfolio-overlay {
    opacity: 1;
    visibility: visible;
}

.portfolio-item-modern:hover .overlay-content h4,
.portfolio-item-modern:hover .overlay-content .short-desc {
    transform: translateY(0);
}

/* Swiper Customization */
.portfolio-swiper .swiper-button-next,
.portfolio-swiper .swiper-button-prev {
    color: var(--service-primary);
    background: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.portfolio-swiper .swiper-button-next::after,
.portfolio-swiper .swiper-button-prev::after {
    font-size: 1.2rem;
}

.portfolio-swiper .swiper-pagination-bullet-active {
    background: var(--service-primary);
    width: 25px;
    border-radius: 5px;
}

/* --- 13. Product Grid Section --- */
.product-grid-section {
    padding-block: 80px;
    background: #fff;
}

.product-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.product-grid-header .section-title {
    margin-bottom: 0;
    font-size: 2rem;
    font-weight: 800;
}

.view-more-link {
    color: var(--service-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.view-more-link:hover {
    color: var(--service-secondary);
}

.products-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .products-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (min-width: 1024px) {
    .products-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card-modern {
    transition: var(--transition);
}

.product-img-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.product-img-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.product-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-card-modern:hover .product-hover-overlay {
    opacity: 1;
    visibility: visible;
}

.product-card-modern:hover .product-img-container img {
    transform: scale(1.05);
}

.hover-btn {
    background: var(--service-secondary);
    color: #fff;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hover-btn:hover {
    background: #fff;
    color: var(--service-secondary);
    transform: translateY(-3px);
}

.hover-btn.preview-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hover-btn.preview-btn:hover {
    background: #fff;
    color: #333;
}

.product-info {
    text-align: center;
}

.product-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2c3e50;
}

.product-info p {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.5;
}

/* Fixed Bottom Bar on Mobile */
.product-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    display: flex;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #eee;
}

.sticky-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.3s;
}

.sticky-btn.buy-now {
    background: #008080;
    color: #fff;
}

.sticky-btn.preview {
    background: #f8f9fa;
    color: #333;
    border-inline-start: 1px solid #eee;
}

.sticky-btn:hover {
    filter: brightness(0.9);
    color: inherit;
}

@media (min-width: 992px) {
    .product-sticky-footer {
        display: none;
    }
}

@media (max-width: 767px) {
    .product-info h3 {
        font-size: 1rem;
    }

    .product-info p {
        font-size: 0.8rem;
    }
}

/* Coding Animation Styles */
.coding-animation-container {
    position: relative;
    padding: 40px;
    margin: 0 auto;
    max-width: 500px;
}

@media (max-width: 767px) {
    .coding-animation-container {
        padding: 20px;
        overflow: hidden;
        /* Prevent horizontal scroll on mobile */
    }
}

.code-window {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    text-align: left;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: window-float 6s ease-in-out infinite;
}

@media (max-width: 576px) {
    .code-window {
        transform: scale(0.9);
        margin-bottom: 20px;
    }
}

.window-header {
    background: #333;
    padding: 12px 15px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.code-content {
    padding: 25px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-line {
    opacity: 0;
    transform: translateX(-10px);
    animation: line-fade-in 0.5s forwards;
    white-space: nowrap;
}

.code-line.indent-1 {
    padding-left: 20px;
}

.code-line.indent-2 {
    padding-left: 40px;
}

/* Typing animation delays */
.code-line:nth-child(1) {
    animation-delay: 0.2s;
}

.code-line:nth-child(2) {
    animation-delay: 0.5s;
}

.code-line:nth-child(3) {
    animation-delay: 0.8s;
}

.code-line:nth-child(4) {
    animation-delay: 1.1s;
}

.code-line:nth-child(5) {
    animation-delay: 1.4s;
}

.code-line:nth-child(6) {
    animation-delay: 1.7s;
}

.code-line:nth-child(7) {
    animation-delay: 2.0s;
}

.code-line:nth-child(8) {
    animation-delay: 2.3s;
}

.code-line:nth-child(9) {
    animation-delay: 2.6s;
}

/* Syntax Colors */
.c-blue {
    color: #569cd6;
}

.c-yellow {
    color: #dcdcaa;
}

.c-purple {
    color: #c586c0;
}

.c-green {
    color: #b5cea8;
}

.c-orange {
    color: #ce9178;
}

.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--service-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 3;
    animation: float-around 4s ease-in-out infinite;
}

.element-1 {
    top: 10%;
    right: -5%;
    animation-delay: 0s;
}

.element-2 {
    bottom: 20%;
    left: -10%;
    animation-delay: 1s;
    background: var(--service-primary);
    color: #fff;
}

.element-3 {
    top: 50%;
    right: -15%;
    animation-delay: 2s;
}

@media (max-width: 767px) {
    .floating-element {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .element-1 {
        right: 5%;
        top: 5%;
    }

    .element-2 {
        left: 5%;
        bottom: 10%;
    }

    .element-3 {
        right: 0;
        top: 40%;
    }
}

[dir="rtl"] .code-window,
[dir="rtl"] .code-content {
    text-align: left;
    /* Keep code LTR even in RTL theme */
}

@keyframes window-float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-20px) rotate(1deg);
    }
}

@keyframes line-fade-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float-around {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(10px, -15px);
    }
}

/* Add a subtle glow behind the window */
.coding-animation-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(12, 170, 220, 0.2) 0%, transparent 70%);
    z-index: 1;
}

/* E-commerce Service Page Styles */
.ecommerce-service .premium-integrated {
    background-color: #0d6efd;
    padding-bottom: 240px;
}

.ecommerce-animation-container {
    position: relative;
    padding: 60px;
    margin: 0 auto;
    max-width: 500px;
    z-index: 10;
}

.cart-window {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
    text-align: right;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: cart-float 6s ease-in-out infinite;
}

.cart-content {
    padding: 25px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.item-img {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 10px;
}

.item-info {
    flex-grow: 1;
}

.item-line {
    height: 8px;
    background: #eee;
    margin-bottom: 8px;
    border-radius: 4px;
    width: 100%;
}

.item-line.short {
    width: 60%;
}

.item-price {
    width: 40px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 6px;
    opacity: 0.3;
}

.cart-footer {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.checkout-btn {
    background: #34a332;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(52, 163, 50, 0.2);
}

.floating-icon {
    position: absolute;
    width: 65px;
    height: 65px;
    background: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #0d6efd;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    z-index: 3;
    animation: icon-float 5s ease-in-out infinite;
}

.shop-icon {
    top: 10%;
    right: 0;
    animation-delay: 0s;
    color: #ff6b6b;
}

.card-icon {
    bottom: 20%;
    left: 0;
    animation-delay: 1s;
    color: #4facfe;
}

.secure-icon {
    top: 50%;
    left: -15%;
    animation-delay: 2s;
    color: #34a332;
}

@keyframes cart-float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-15px) rotate(-1deg);
    }
}

@keyframes icon-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Mobile Fixes for E-commerce */
@media (max-width: 991px) {
    .ecommerce-service .display-5 {
        font-size: 2.5rem;
    }
}

@media (max-width: 767px) {
    .ecommerce-animation-container {
        padding: 40px 20px;
        max-width: 100%;
        overflow: hidden;
    }

    .cart-window {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        transform: scale(0.85);
    }

    .floating-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .secure-icon {
        left: 10px;
        top: 40%;
    }

    .shop-icon {
        right: 10px;
        top: 0;
    }

    .card-icon {
        left: 10px;
        bottom: 5%;
    }

    .ecommerce-service .display-5 {
        font-size: 1.8rem;
        text-align: center;
    }

    .ecommerce-service .lead {
        font-size: 1rem;
        text-align: center;
    }

    .modern-service-page,
    .modern-features-section,
    .pricing-section-modern,
    .product-grid-section {
        overflow-x: hidden !important;
    }
}

/* Hard fix for horizontal shift */
html,
body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

@media (max-width: 575px) {
    .cart-window {
        width: 100%;
        max-width: 100%;
        margin: 0;
        transform: none;
        /* Remove scaling */
    }

    .ecommerce-animation-container {
        height: auto;
        min-height: 400px;
        padding: 60px 0;
        overflow: visible;
        /* Allow icons to float */
    }

    .floating-icon {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Global Mobile Fixes for Overflow */
@media (max-width: 767px) {

    html,
    body {
        overflow-x: hidden !important;
        position: relative;
        width: 100%;
    }

    .offcanvas {
        max-width: 80% !important;
        width: 300px !important;
    }

    .container,
    .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow: hidden;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Product Grid Fixes */
/* Product Grid Fixes - CSS Grid Implementation */
.product-grid-section .products-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 0;
    /* Reset margins */
}

.product-grid-section .product,
.product-grid-section .product-card-modern {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: auto !important;
    /* Reset width for Grid */
    max-width: none !important;
    flex: none !important;
    /* Reset flex */
    padding: 0;
    /* Let grid handle spacing */
}

@media (max-width: 991px) {
    .product-grid-section .products-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .product-grid-section .products-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        /* Smaller gap for mobile */
    }

    /* Target direct children of the grid */
    .product-grid-section .product,
    .product-grid-section .product-card-modern {
        width: auto !important;
        padding: 0;
    }


    .product-grid-section .woocommerce-loop-product__title,
    .product-grid-section .product-card-modern h3 {
        font-size: 0.9rem;
        /* Slightly smaller font */
        margin: 10px;
    }

    .product-grid-section .attachment-woocommerce_thumbnail,
    .product-grid-section .product-card-modern img {
        height: 150px;
        /* Smaller image height */
    }
}

/* Ensure link wrapper fills height */
.product-grid-section .woocommerce-LoopProduct-link,
.product-grid-section .woocommerce-loop-product__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none !important;
}

.product-grid-section .product:hover .woocommerce-loop-product__link {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-grid-section .attachment-woocommerce_thumbnail {
    width: 100%;
    height: 250px;
    /* Fixed image height for alignment */
    object-fit: cover;
    display: block;
}

.product-grid-section .woocommerce-loop-product__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 15px 15px 10px;
    line-height: 1.4;
    flex-grow: 1;
    /* Pushes price/button down */
    color: #333;
    /* Limit title lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    /* Approx 2 lines */
}

.product-grid-section .price {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0 15px 15px;
    display: block;
}

.product-grid-section .add_to_cart_button {
    margin: 0 15px 15px;
    display: block;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    color: #555;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.product-grid-section .add_to_cart_button:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Sale Badge alignment */
.product-grid-section .onsale {
    position: absolute;
    top: 15px;
    right: 15px;
    /* RTL context */
    background: #ff6b6b;
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 2;
}

/* 
 * 11. Modern Product Card (Ecommerce Service) 
 */
.modern-product-grid .section-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
}

.modern-product-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.modern-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08) !important;
}

.card-img-wrapper {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.card-img-wrapper img {
    transition: transform 0.5s ease;
}

.modern-product-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-actions-overlay {
    position: absolute;
    bottom: -50px;
    /* Hidden initially */
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
    transition: bottom 0.3s ease;
    opacity: 0;
}

.modern-product-card:hover .card-actions-overlay {
    bottom: 0;
    opacity: 1;
}

.action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn.btn-light:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.product-price del {
    color: #999;
    font-size: 0.9rem;
    margin-right: 5px;
    font-weight: 400;
}

.product-price ins {
    text-decoration: none;
    color: var(--primary-color);
}

/* 
 * 12. Mobile Product Grid Optimization 
 */
@media (max-width: 767.98px) {
    .modern-product-grid .col {
        padding-left: 5px;
        padding-right: 5px;
    }

    .modern-product-card {
        border-radius: 12px;
    }

    .card-img-wrapper a {
        height: 140px !important;
        /* Smaller image height */
        padding: 10px !important;
    }

    .card-body {
        padding: 10px !important;
    }

    .card-title {
        font-size: 0.9rem !important;
        margin-bottom: 5px !important;
    }

    /* Hide excerpt on mobile for cleaner look */
    .card-text.text-muted {
        display: none !important;
    }

    .product-price {
        font-size: 1rem;
        margin-bottom: 8px !important;
    }

    .product-price del {
        font-size: 0.8rem;
    }

    /* Make buttons smaller and more compact */
    .modern-product-card .btn-outline-primary {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .card-actions-overlay {
        bottom: 0 !important;
        opacity: 1 !important;
        background: none !important;
        position: absolute;
        top: 5px;
        right: 5px;
        left: auto;
        width: auto;
        padding: 0;
        pointer-events: auto;
        /* Ensure clickable */
    }

    .card-actions-overlay .d-flex {
        flex-direction: column;
        gap: 5px !important;
    }

    .action-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
}

/* 
 * 13. Mobile Card Refinements (Full Width Image & No Overlay)
 */
@media (max-width: 767.98px) {

    /* Remove overlay actions completely on mobile */
    .card-actions-overlay {
        display: none !important;
    }

    /* Full width image settings */
    .card-img-wrapper a {
        padding: 0 !important;
        height: 160px !important;
        /* Slightly taller for clear view */
        display: block !important;
    }

    .card-img-wrapper img.product-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        transform: none !important;
        /* Disable zoom */
        border-radius: 12px 12px 0 0 !important;
        /* Top corners only */
    }

    /* Adjust body spacing */
    .card-body {
        padding: 12px !important;
        text-align: right !important;
        /* Prefer right alignment for Arabic list feeling, or keep center if desired */
    }

    /* Ensure title and price are nicely spaced */
    .card-title {
        font-size: 0.95rem !important;
        margin-bottom: 8px !important;
    }

    .product-price {
        font-size: 1rem !important;
        margin-bottom: 12px !important;
    }

    /* Custom style for specific buttons if needed, bootstrap flex gap handles spacing */
    .modern-product-grid .btn-sm {
        font-size: 0.85rem;
        padding-block: 6px;
    }
}

/* Cart Icon Badge */
.header-cart-link i {
    color: var(--text-dark);
    font-size: 1.5rem;
}

.header-cart-link .badge {
    font-size: 0.7rem;
    padding: 0.35em 0.5em;
}

/* Add to Cart Pulse Animation */
@keyframes pulse-green {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.added-success {
    animation: pulse-green 0.5s ease-in-out;
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}

/* Custom Cart Toast */
.custom-cart-toast {
    position: fixed !important;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    border-radius: 8px !important;
    background-color: #f8f9fa !important;
    /* Light background */
    border-top: 3px solid #8fae1b !important;
    /* Green accent */
    color: #333 !important;
    padding: 15px 20px !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

.custom-cart-toast::before {
    display: none !important;
    /* Hide default WC icon if needed */
}

.custom-cart-toast .button {
    float: left !important;
    /* Adjust for RTL */
    margin-right: 20px !important;
    background: transparent !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 5px 15px !important;
}

.custom-cart-toast .button:hover {
    background: #333 !important;
    color: #fff !important;
}

/* Hide Standard Success Messages on Cart Page (User Request) */
body.woocommerce-cart .woocommerce-message {
    display: none !important;
}

/* Ensure Errors are still visible */
body.woocommerce-cart .woocommerce-error {
    display: block !important;
}

/* Contact Page Styles */
.opacity-10 {
    opacity: 0.1 !important;
}

.btn-lg-square {
    width: 60px;
    height: 60px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.contact-form textarea {
    resize: none;
}

/* 
 * 1. Top Bar (Modern Redesign)
 */
.top-bar {
    background-color: #0F172A;
    color: #cbd5e1;
    font-size: 0.85rem;
    padding-block: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-bar a {
    color: #e2e8f0;
    transition: all 0.2s ease;
}

.top-bar a:hover {
    color: var(--primary-color);
}

.top-bar-social i,
.top-bar-contact i {
    margin-inline-end: 6px;
}

/* 
 * 2. Header & Navigation (Modern Redesign)
 */
.site-header {
    background: #ffffff;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    z-index: 1020;
}

.navbar-brand img,
.custom-logo {
    max-height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Desktop Menu */
.desktop-navigation .nav-link {
    font-weight: 700;
    color: var(--text-dark);
    padding: 10px 18px !important;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
    font-family: var(--heading-font, sans-serif);
}

.desktop-navigation .nav-link:hover,
.desktop-navigation .nav-link.active,
.desktop-navigation .current-menu-item>a {
    color: var(--primary-color);
}

/* Animated Underline */
.desktop-navigation .nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

html[lang="en-US"] .desktop-navigation .nav-link::after {
    transform-origin: left;
}

.desktop-navigation .nav-link:hover::after,
.desktop-navigation .current-menu-item>a::after {
    transform: scaleX(1);
}

/* Dropdowns */
.desktop-navigation .sub-menu,
.dropdown-menu {
    border: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 10px;
    margin-top: 15px;
    background: #fff;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    position: absolute;
    z-index: 999;
}

.desktop-navigation li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desktop-navigation .sub-menu li a {
    padding: 10px 15px;
    display: block;
    color: #475569;
    font-weight: 500;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-bottom: none;
}

.desktop-navigation .sub-menu li a:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
    padding-inline-start: 20px;
}

/* Icons */
.header-icon-link {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #475569;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.header-icon-link:hover {
    background: #f1f5f9;
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.cart-count-badge {
    font-size: 0.65rem;
}

/* CTA */
.header-cta .btn-cta {
    font-weight: 700;
    font-family: var(--heading-font);
    border: none;
    transition: all 0.3s ease;
}

.header-cta .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.25);
}

/* Mobile Offcanvas */
.offcanvas-header {
    background-color: #f8fafc;
}

.mobile-navigation .nav-item {
    border-bottom: 1px solid #f1f5f9;
}

.mobile-navigation .nav-link {
    display: block;
    padding: 14px 0;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.05rem;
}

.mobile-navigation .nav-link:hover {
    color: var(--primary-color);
}

/* 
 * Floating WhatsApp Button 
 */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #FFF;
    transform: translateY(-3px);
    box-shadow: 2px 5px 10px rgba(0, 0, 0, 0.3);
}

.whatsapp-float i {
    margin-top: 1px;
    /* Optical optical alignment */
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
}

/* 
 * Fixed Header Animation 
 */
.site-header.header-scrolled {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.35s ease-out forwards;
    padding-block: 10px;
    /* Compress slightly */
}

@keyframes slideDown {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(0);
    }
}