:root {
    --primary-color: #bf29ec;
    --secondary-color: #8f94fb;
    --accent-color: #ff6b6b;
    --dark-color: #2c2c54;
    --light-color: #f1f2f6;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}
*{
    direction: ltr;
}

.custom-bg-red {
    background-color: #B61213 !important;
    color: white !important;
}
.custom-border-red {
    border: 2px solid #B61213 !important;
}
.radius-1rem {
    border-radius: 1rem !important;
}
.custom-txt-red {
    color: #B61213 !important;
}

.custom-txt-red-footer {
    color: #ff0000 !important;
}

/* Styles for image container */
.image-container {
    position: relative;
    width: 100%;
    height: auto;
}

/* Styles for product image */
.product-image {
    width: 100%;
    height: auto;
}

/* Styles for watermark */
.watermark {
    position: absolute;
    bottom: 10px; /* Distance from bottom */
    left: 10px;   /* Distance from left (unchanged for LTR) */
    opacity: .4; /* Watermark transparency */
    pointer-events: none; /* Prevent interaction interference */
}

/* Watermark as an image */
.watermark img {
    width: 50px;
    height: auto;
    border-radius: .7rem !important;
}

::selection {
    background-color: var(--primary-color);
    color: white;
}

body {
    font-family: "Vazirmatn", sans-serif;
    background-color: var(--light-color);
    overflow-x: hidden;
}

.bg-special {
    background: linear-gradient(
        135deg,
        rgba(78, 84, 200, 1),
        rgba(143, 148, 251, 1)
    );
}

.border-primary-ex {
    border: 2px solid var(--primary-color);
}

/* Navbar Styles */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(
        45deg,
        var(--primary-color),
        var(--secondary-color)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    position: relative;
    margin: 0 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0; /* Changed from right to left for LTR */
    background: linear-gradient(
        45deg,
        var(--primary-color),
        var(--secondary-color)
    );
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(
        135deg,
        /* rgba(78, 84, 200, 0.8), */
        /* rgba(143, 148, 251, 0.8) */
    ),
    url("https://pepro.co/wp-content/uploads/2022/05/Online-Shop-01.png");
    background-size: cover;
    background-position: center;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

.search-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
}

.search-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(31, 38, 135, 0.5);
}

.search-input {
    height: 60px;
    border-radius: 30px;
    border: none;
    padding: 0 25px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Category Cards */
.category-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 35rem;
    display: grid;
    align-items: baseline;
}
.card-image {
    width: 100%;
    max-width: 600px;
    height: 272px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0 auto;
}

@media (max-width: 1199px) {
    .card-image {
        height: 212px;
    }
}
@media (max-width: 767px) {
    .card-image {
        height: 370px;
        aspect-ratio: 1 / 3;
    }
}

@media (min-width: 768px) {
    .category-card {
        height: 33rem;
    }
}
.category-card:hover {
    transform: translateY(-10px) rotate(2deg); /* Rotate direction unchanged as it's not strictly RTL/LTR */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.category-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: linear-gradient(
        45deg,
        /* var(--primary-color), */
        /* var(--secondary-color) */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.category-card:hover .category-icon {
    transform: scale(1.2) rotate(-10deg); /* Rotate direction unchanged */
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 20px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

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

.product-image {
    height: 250px;
    object-fit: cover;
    transition: all 0.5s ease;
}

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

.product-details {
    padding: 25px;
}

.product-price {
    color: var(--accent-color);
    font-size: 1.4rem;
    font-weight: 800;
}

/* Features Section */
.feature-box {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.feature-box::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(78, 84, 200, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.feature-box:hover::before {
    top: -100%;
    left: -100%;
}

.feature-box:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    background: linear-gradient(
        45deg,
        /* var(--primary-color), */
        /* var(--secondary-color) */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(
        135deg,
        /* var(--primary-color), */
        /* var(--secondary-color) */
    );
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("https://www.transparenttextures.com/patterns/cubes.png");
    opacity: 0.1;
}

.newsletter-input {
    height: 60px;
    border-radius: 30px;
    padding: 0 25px;
    border: none;
    width: 100%;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input:focus {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color),
        var(--accent-color)
    );
}

.footer-title {
    color: var(--accent-color);
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 1.5rem;
}

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

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(5px); /* Unchanged, as movement direction is intuitive for LTR */
}

/* Custom Buttons */
.btn-custom {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-custom::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-custom:hover::before {
    width: 100%;
}

.btn-custom-primary {
    background: linear-gradient(
        45deg,
        var(--primary-color),
        var(--secondary-color)
    );
    color: white;
    border: none;
}

.btn-custom-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(78, 84, 200, 0.3);
}

/* Banner Slider */
.banner-slider {
    position: relative;
    z-index: 10;
}

.banner-slide {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Customer Reviews */
.review-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.reviewer-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px; /* Unchanged, as margin-right is appropriate for LTR */
}

/* Sales Section */
.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px; /* Unchanged, as badge positioning is contextually appropriate */
    background: var(--danger-color);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
}

/* Discounts Section */
.discount-card {
    background: linear-gradient(
        45deg,
        var(--primary-color),
        var(--secondary-color)
    );
    border-radius: 20px;
    padding: 30px;
    color: white;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.discount-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Statistics Section */
.stat-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #B61213 !important;
    margin-bottom: 10px;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding: 80px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .search-container {
        width: 90% !important;
        margin: 0 auto;
    }

    .category-card {
        margin-bottom: 20px;
    }

    .product-card {
        margin: 0 10px;
    }

    .swiper-slide {
        width: 100% !important;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Swiper Slider */
.swiper {
    width: 100%;
    padding: 50px 0;
}

.swiper-slide {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.swiper-slide:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.swiper-pagination-bullet {
    background: var(--primary-color);
}

.swiper-button-next,
.swiper-button-prev {
    color: #000 !important;
    top: 17rem;
    filter: drop-shadow(0px 0px 2px #fff);
}
.swiper-button-next::after,
.swiper-button-prev::after {
    content: none !important;
}

/* Hero Text Animation */
.hero-subtitle-container {
    position: relative;
    height: 2em;
    overflow: hidden;
}

.hero-subtitle-text {
    position: absolute;
    width: 100%;
    opacity: 0;
    animation: textFade 15s infinite;
}

.hero-subtitle-text:nth-child(2) {
    animation-delay: 5s;
}

.hero-subtitle-text:nth-child(3) {
    animation-delay: 10s;
}

@keyframes textFade {
    0%,
    25% {
        opacity: 0;
        transform: translateY(20px);
    }

    33%,
    58% {
        opacity: 1;
        transform: translateY(0);
    }

    66%,
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* View All Button */
.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    transform: translateX(5px); /* Changed from -5px to 5px for LTR */
}

/* Updated responsive styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    transform: translateX(5px); /* Changed from -5px to 5px for LTR */
}

/* Updated slider styles */
.product-slider {
    padding: 20px 0;
}

.product-slider .swiper-slide {
    height: auto;
}

@media (min-width: 768px) {
    .product-slider .swiper-slide {
        width: 25% !important;
    }
}

/* Updated styles for the search in navbar */
.navbar-search {
    max-width: 400px;
    margin-left: auto;
    margin-right: 1rem;
}

.navbar-search .form-control {
    border-radius: 20px;
    padding-left: 2.5rem; /* Changed from padding-right to padding-left for LTR */
}

.navbar-search .btn {
    position: absolute;
    left: 5px; /* Changed from right to left for LTR */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
}

/* Updated styles for product cards */
.product-card {
    display: flex;
    flex-direction: column;
}

.product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

.btn-buy {
    width: 100%;
    margin-top: 1rem;
}

/* Media query for tablets */
@media screen and (max-width: 768px) {
    .hero-slider {
        height: 450px !important;
    }
}

/* Media query for mobile phones */
@media screen and (max-width: 480px) {
    .hero-slider {
        height: 300px !important;
    }
}

/* Media query for small mobile phones */
@media screen and (max-width: 320px) {
    .hero-slider {
        height: 250px !important;
    }
}

/* Styles for the hero slider */
.hero-slider {
    height: 100vh;
    position: relative;
}

.hero-slide {
    position: relative;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem; /* Changed from right to left for LTR */
    color: white;
    max-width: 400px;   /* Box width */
    width: 90%;         /* Up to 90% width on mobile */
    padding: 1.5rem;
    background: rgb(0 0 0 / 6%);
    border-radius: 10px;
    text-align: center;
}

/* Settings for mobile */
@media (max-width: 768px) {
    .hero-content {
        position: static; /* Remove absolute positioning */
        margin: 1rem auto;
        text-align: center;
        width: 90%; /* Restrict width */
        max-width: 350px;
        padding: 1rem;
        background: rgb(0 0 0 / 6%);
        border-radius: 10px;
    }

    .hero-slide {
        display: flex;
        justify-content: center;
        align-items: center;
        background-size: contain;
    }
}

/* Styles for category slider */
.category-slider {
    padding: 2rem 0;
}

.category-slide {
    text-align: center;
}

/* Styles for customer reviews slider */
.reviews-slider {
    padding: 2rem 0;
}

.review-slide {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 15rem;
}

.alert-news {
    background: linear-gradient(
        45deg,
        /* var(--primary-color), */
        /* var(--secondary-color) */
    );
}

/* Search Results */
#search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 90%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 150vh;
    overflow-y: auto;
    z-index: 999;
    margin-top: 5px;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 12px;
    z-index: 999;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    overflow: hidden;
}

#search-results.active {
    display: block;
}

#search-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#search-results li {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-results li:hover {
    background-color: #f0e6f6;
    color: #B61213;
}

#search-results p {
    padding: 12px 16px;
    margin: 0;
    font-size: 14px;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#search-results li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: block;
    transition: color 0.3s ease;
}

#search-results li:hover a {
    color: #B61213;
}
.show-all-btn {
    background-color: #B61213;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 0.5rem;
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.show-all-btn:hover {
    background-color: #ef2324;
    color: #fff;
}
.close-results {
    background: none;
    border: none;
    font-size: 20px;
    color: #888;
    cursor: pointer;
    margin-left: 10px; /* Changed from margin-right to margin-left for LTR */
    transition: color 0.3s ease;
}

.close-results:hover {
    color: #B61213;
}
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f1f1;
    font-weight: bold;
    color: #333;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #B61213;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.badge-shop {
    background-color: #800080;
}

.badge-location {
    background-color: #B61213;
    float: right !important; /* Changed from float: left to float: right for LTR */
}

.stroker {
    text-shadow: 0.000em 0.075em #eeeded, 0.029em 0.069em #eeeded, 0.053em 0.053em rgb(238, 237, 237), 0.069em 0.029em #eeeded, 0.075em 0.000em #eeeded, 0.069em -0.029em #eeeded, 0.053em -0.053em #eeeded, 0.029em -0.069em #eeeded, 0.000em -0.075em #eeeded, -0.029em -0.069em #eeeded, -0.053em -0.053em #eeeded, -0.069em -0.029em #eeeded, -0.075em -0.000em #eeeded, -0.069em 0.029em #eeeded, -0.053em 0.053em #eeeded, -0.029em 0.069em #eeeded;
}

.category-slider-x .swiper-slide-x {
    width: auto;
}

.category-icon-x img {
    border: 2px solid #eee;
    transition: transform 0.3s;
}

.category-icon-x img:hover {
    transform: scale(1.1);
}
.category-card-x {
    height: 17vh;
    display: grid;
    justify-content: center;
    align-items: center;
    border: 1px solid lightgray;
    border-radius: 20%;
    background-position: center;
    background-size: cover;
}
.category-slider-x,
.category-icon-swiper,
.swiper-wrapper {
    width: 100%;
}
@media (max-width: 768px) {
    .category-slider-x .category-icon-swiper .swiper-wrapper .swiper-slide {
        width: 30.6% !important;
        height: 8rem;
    }
}

.discount-style {
    width: 50%;
    position: absolute;
    top: 0;
    left: 50%;
    color: white;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    direction: ltr; /* Changed from direction: rtl to direction: ltr */
    background-color: #b61213;
    border-bottom-right-radius: 50%;
    border-bottom-left-radius: 50%;
    padding: 1rem;
    z-index: 10;
    height: 1rem;
}
.discount-style label {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
}
.bounce {
    animation: bounce 0.5s;
    animation-direction: alternate;
    animation-timing-function: cubic-bezier(.5, 0.05, 1, .5);
    animation-iteration-count: infinite;
    -webkit-animation-name: bounce;
    -webkit-animation-duration: 0.5s;
    -webkit-animation-direction: alternate;
    -webkit-animation-timing-function: cubic-bezier(.5, 0.05, 1, .5);
    -webkit-animation-iteration-count: infinite;
}

@keyframes bounce {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(0, 3px, 0);
    }
}

@-webkit-keyframes bounce {
    from {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    to {
        -webkit-transform: translate3d(0, 3px, 0);
        transform: translate3d(0, 3px, 0);
    }
}
.spin-star {
    animation: spin 1s linear infinite;
    color: gold;
    -webkit-animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@-webkit-keyframes spin {
    from {
        -webkit-transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(360deg);
    }
}
