@font-face {
    font-family: 'IranianSans';
    src: url('/main/assets/fonts/IranianSans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'IranianSans', Arial, sans-serif;
    overflow-x: hidden;
}

/* Category Introduction Section */
.category-intro {
    padding: 1.5rem 0;
}

.category-description {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: auto;
    min-height: clamp(200px, 40vw, 400px);
    max-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.25rem;
    overflow-y: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-description:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.category-img {
    height: clamp(200px, 50vw, 500px);
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #dc2626;
    transition: transform 0.3s ease;
}

.category-img:hover {
    transform: scale(1.05);
}

/* Category Advantages Section */
.category-advantages {
    padding: 1.5rem 0;
}

.advantage-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.advantage-card i {
    font-size: clamp(1.5rem, 5vw, 2rem);
}

/* Products Section */
.category-products {
    padding: 1.5rem 0;
}

.model-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-height: clamp(250px, 35vw, 350px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.5s ease, box-shadow 0.5s ease, background-color 0.5s ease;
    cursor: pointer;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background-color: #dc2626;
}

.model-card:hover .model-title,
.model-card:hover p {
    color: #ffffff;
}

.model-img {
    width: auto;
    height: clamp(80px, 20vw, 120px);
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.model-title {
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: bold;
    color: #1f2937;
    margin: 0.5rem 0;
    text-align: center;
}

.model-card p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    margin: 0.25rem 0;
    text-align: center;
}

.add-to-cart {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.add-to-cart:hover {
    background-color: #1e40af;
    transform: translateY(-2px);
}

.cart-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}

.cart-message.show {
    opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .category-description,
    .category-img {
        min-height: clamp(180px, 35vw, 350px);
        max-height: 400px;
    }

    .model-card {
        min-height: clamp(220px, 32vw, 320px);
    }
}

@media (max-width: 768px) {
    .category-description,
    .category-img {
        min-height: clamp(160px, 30vw, 300px);
        max-height: 350px;
        padding: 0.75rem;
    }

    .model-card {
        min-height: clamp(200px, 30vw, 300px);
    }

    .model-img {
        height: clamp(60px, 15vw, 100px);
    }

    .model-title {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }

    .advantage-card i {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
    }

    .add-to-cart {
        width: 100%;
        font-size: clamp(0.8rem, 2vw, 0.9rem);
    }

    .cart-message {
        top: 10px;
        right: 10px;
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .category-description,
    .category-img {
        min-height: clamp(140px, 25vw, 250px);
        max-height: 300px;
        padding: 0.5rem;
    }

    .model-card {
        min-height: clamp(180px, 28vw, 280px);
    }

    .model-img {
        height: clamp(50px, 12vw, 80px);
    }

    .model-title {
        font-size: clamp(0.8rem, 2vw, 1rem);
    }

    .advantage-card i {
        font-size: clamp(1rem, 3.5vw, 1.5rem);
    }
}