@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
@import url('https://cdn.fontcdn.ir/Font/Persian/Vazirmatn/Vazirmatn.css');

body {
    margin: 0;
    font-family: 'Vazirmatn', 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #fff;
    direction: rtl;
    overflow-x: hidden;
}

header {
    text-align: center;
    /* padding: 40px 0; */
    background: linear-gradient(90deg, #ff0080, #7928ca, #00f2fe);
    font-size: 2.8rem;
    letter-spacing: 2px;
    text-shadow: 0 0 40px rgba(255, 0, 128, 0.8);
    animation: glow 4s infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 0, 128, 0.5); }
    to { text-shadow: 0 0 40px rgba(255, 0, 128, 1); }
}

main {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    flex: 2;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    transition: all 0.4s;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 0 35px rgba(255, 0, 128, 0.3), 0 0 40px rgba(72, 126, 255, 0.2);
}

.product-card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: transform 0.4s;
}

.product-card:hover img {
    transform: scale(1.06);
}

.product-card h3 {
    color: #ff4ecd;
    margin: 10px 0;
    font-family: 'Poppins', sans-serif;
}

.product-card p {
    color: #9befff;
    font-weight: bold;
    font-family: 'Vazirmatn', sans-serif;
}

.product-card button {
    background: linear-gradient(90deg, #00f2fe, #4facfe);
    color: #000;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.4s;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.product-card button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.7);
    filter: brightness(1.1);
}

.cart {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    max-height: 500px;
    overflow-y: auto;
}

.cart h2 {
    color: #4facfe;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.cart ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cart ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    color: #ffffff;
}

#total-price {
    margin-top: 20px;
    text-align: center;
    color: #00f2fe;
    font-weight: bold;
    font-size: 1.4rem;
}

@media (max-width: 768px) {
    header {
        font-size: 2rem;
        padding: 10px 0;
    }

    main {
        flex-direction: column;
        padding: 20px;
    }

    .products {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card {
        padding: 15px;
    }

    .product-card h3 {
        font-size: 1rem;
    }

    .product-card p {
        font-size: 0.95rem;
    }

    .product-card button {
        /* width: 100%; */
        font-size: 0.95rem;
        padding: 12px;
    }

    .cart {
        margin-top: 30px;
    }
}

.cart-bar {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #ff0080, #ff8c00);
    color: white;
    font-size: 1.2rem;
    padding: 15px 25px;
    border-radius: 30px;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
    cursor: pointer;
    transition: bottom 0.4s ease-in-out;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 10px;
    visibility: hidden;
    opacity: 0;
    text-decoration: none;
}

.cart-bar.active {
    visibility: visible;
    opacity: 1;
    bottom: 20px;
}

@media (max-width: 768px) {
    .cart-bar {
        font-size: 1rem;
        padding: 12px 20px;
    }
}
/* هایلایت کردن ارسال رایگان */
.highlight {
    background-color: #4CAF50; /* رنگ سبز برای هایلایت */
    color: white;              /* متن سفید */
    padding: 5px;              /* فاصله اطراف متن */
    border-radius: 5px;        /* گوشه‌های گرد */
    font-weight: bold;         /* پررنگ کردن متن */
}