/* ==========================================================================
   HERO SECTION & PARALLAX
   ========================================================================== */
.cat-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    min-height: 400px;
    background-color: #1d2128;
}

.cat-back {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.cat-chaman {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    z-index: 2;
    will-change: transform;
}

.cat-tree {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    z-index: 1;
    transform: translateY(8rem);
    will-change: transform;
}

.cat-text-overlay {
    position: absolute;
    width: 33%;
    max-width: 360px;
    left: 50%;
    transform: translateX(-50%);
    top: 8%;
    z-index: 20;
    object-fit: contain;
    filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.25));
}

.cat-abr {
    position: absolute;
    width: 256px;
    left: -280px;
    top: 10rem;
    z-index: 3;
    pointer-events: none;
}

.cat-abr2 {
    top: 12rem;
    left: -280px;
}

/* ==========================================================================
   CATEGORIES SECTION
   ========================================================================== */
.cat-section {
    background: #111418;
    width: 100%;
    padding: 6rem 0 8rem;
    position: relative;
    z-index: 5;
    direction: rtl;
    font-family: "dana", tahoma, sans-serif;
}

.cat-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* هدینگ بالای گرید */
.cat-header-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.cat-badge-top {
    display: inline-block;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #eab308;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 30px;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.cat-main-title {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
}

/* ==========================================================================
   GRID SYSTEM
   ========================================================================== */
.cat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   CATALOG PRODUCT CARD (بر اساس طرح کاتالوگ شانا)
   ========================================================================== */
.cat-card {
    position: relative;
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.cat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.6);
}

/* کارت ویژه */
.cat-card-special {
    border-color: #ffd039;
}

.cat-special-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #ea6400;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 12px;
    z-index: 15;
    box-shadow: 0 4px 12px rgba(234, 100, 0, 0.35);
}

/* ۱. بخش بالایی کارت (پر کردن کامل کادر توسط عکس) */
.cat-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.2;
    background: #ffffff;
    padding: 0;
    overflow: hidden;
    display: block;
}

.cat-card-img a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.cat-img-main,
.cat-img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease, opacity 0.4s ease;
}

.cat-img-main {
    opacity: 1;
    z-index: 1;
}

.cat-img-hover {
    opacity: 0;
    z-index: 2;
}

.cat-card:hover .cat-img-hover {
    opacity: 1;
    transform: scale(1.04);
}

.cat-card:hover .cat-img-main {
    opacity: 0;
    transform: scale(1.04);
}

/* ۲. بدنه کارت (باکس زرد طلایی با حاشیه نارنجی) */
.cat-card-body {
    background-color: #ffd039;
    border: 2px solid #ea8800;
    padding: 1.5rem 1.25rem 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    text-align: center;
}

.cat-card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* عنوان دسته */
.cat-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    width: 100%;
}

.cat-card-title a {
    color: #5e1355;
    text-decoration: none;
    transition: opacity 0.25s;
}

.cat-card-title a:hover {
    opacity: 0.85;
}

/* خط جداکننده افقی زیر عنوان */
.cat-card-title::after {
    content: '';
    display: block;
    width: 95%;
    height: 1.5px;
    background-color: #e58d19;
    margin: 0.75rem auto 0;
}

/* توضیحات دسته */
.cat-card-desc {
    color: #5e1355;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.9;
    margin: 0 auto 1.75rem;
    max-width: 92%;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ۳. دکمه مشاهده طعم‌ها (منحنی اختصاصی چسبیده به کف کارت) */
.cat-card-action {
    margin: auto -1.25rem 0 -1.25rem;
    width: calc(100% + 2.5rem);
    display: block;
    line-height: 0;
}

.shana-btn-flavors {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    padding-top: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 72' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%23ea5a0b'/%3E%3Cstop offset='100%25' stop-color='%23f39200'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0,72 L120,46 C142,41.2 148,32 155,18 C162,4 172,0 190,0 L410,0 C428,0 438,4 445,18 C452,32 458,41.2 480,46 L600,72 Z' fill='url(%23g)'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: bottom center;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-size: 15.5px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.cat-card:hover .shana-btn-flavors {
    background-color: transparent !important;
    color: #ffffff !important;
    box-shadow: none !important;
    filter: brightness(1.06);
}

/* مخفی‌سازی آیکون فلش قبلی */
.shana-btn-flavors .btn-arrow {
    display: none !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 767px) {
    .cat-hero {
        height: 55vw;
        min-height: 260px;
    }

    .cat-text-overlay {
        width: 55%;
        top: 5%;
    }

    .cat-section {
        padding: 4rem 0 5rem;
    }

    .cat-main-title {
        font-size: 1.6rem;
    }

    .cat-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }
}