
/* ========================================
   کافه کوی بهشت | استایل کامل سایت
   تم وسترن، قهوه‌ای و طلایی
======================================== */

/* متغیرهای رنگی */
:root {
    --western-dark: #3d2b1f;
    --western-accent: #c5a059;
    --western-beige: #f4e4bc;
    --western-cream: #fffaf0;
    --western-leather: #5d4037;
}

/* تنظیمات پایه */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--western-beige);
    background-image: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(0, 0, 0, 0.05) 100%
    );

    font-family: Tahoma, Arial, sans-serif;
    color: var(--western-dark);
    line-height: 1.7;
    direction: rtl;
}

/* محتوای اصلی */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   هدر سایت
======================================== */

.main-header {
    text-align: center;
    padding: 45px 20px;
    background: var(--western-dark);
    color: var(--western-accent);
    border-bottom: 8px double var(--western-accent);
    position: relative;
    overflow: hidden;
    border-radius: 0 0 50px 50px;
}

/* افکت تزئینی هدر */
.main-header::before {
    content: "";
    position: absolute;
    top: 10%;
    left: 5%;
    width: 100px;
    height: 100px;
    background: rgba(197, 160, 89, 0.15);
    border-radius: 50%;
    filter: blur(30px);
    pointer-events: none;
}

/* لوگوی سایت */
.logo {
    display: block;
    width: 150px;
    height: 150px;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    padding: 8px;
    margin: 0 auto 20px;
    border: 4px solid var(--western-accent);
    border-radius: 50%;
    background: var(--western-cream);
}

/* عنوان اصلی */
.main-header h1 {
    font-size: 3rem;
    line-height: 1.5;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* توضیح زیر عنوان */
.tagline {
    margin-top: 8px;
    font-size: 1rem;
    font-style: italic;
    color: var(--western-cream);
    opacity: 0.9;
}

/* ========================================
   عنوان دسته‌بندی‌ها
======================================== */

.category-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    margin: 60px 0 30px;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.6;
    text-align: center;
    color: var(--western-dark);
}

/* خطوط تزئینی اطراف عنوان */
.category-title::before,
.category-title::after {
    content: "";
    display: block;
    flex: 0 1 100px;
    height: 3px;
    background: var(--western-accent);
    border-radius: 5px;
}

/* ========================================
   شبکه محصولات
======================================== */

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    align-items: stretch;
}

/* ========================================
   کارت محصولات
======================================== */

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;

    background: var(--western-cream);
    border: 2px solid var(--western-leather);
    border-radius: 15px;
    overflow: hidden;

    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

/* افکت هنگام رفتن موس روی کارت */
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(61, 43, 31, 0.25);
    border-color: var(--western-accent);
}

/* ========================================
   تصاویر محصولات
   اندازه یکسان و نمایش کامل تصویر
======================================== */

/* تصاویر محصولات */
.card-img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    padding: 0;
    margin: 0;
    border: none;
    border-bottom: 3px solid var(--western-accent);
}
/* ========================================
   نام محصولات
======================================== */

.item-name {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-grow: 1;
    min-height: 65px;
    padding: 12px;

    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.8;

    color: var(--western-dark);
}

/* ========================================
   فوتر سایت
======================================== */

.main-footer {
    text-align: center;
    margin-top: 80px;
    padding: 35px 20px;

    background: var(--western-dark);
    color: var(--western-beige);

    border-top: 5px solid var(--western-accent);
    border-radius: 20px 20px 0 0;
}

.main-footer p {
    margin: 8px 0;
}

.main-footer a {
    color: var(--western-accent);
    text-decoration: none;
    font-weight: bold;
    overflow-wrap: anywhere;
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: var(--western-cream);
    text-decoration: underline;
}

/* ========================================
   تبلت
======================================== */

@media (max-width: 992px) {
    .container {
        padding: 16px;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .main-header {
        padding: 35px 15px;
    }

    .main-header h1 {
        font-size: 2.4rem;
    }

    .category-title {
        font-size: 1.7rem;
        margin: 45px 0 25px;
        gap: 15px;
    }

    .category-title::before,
    .category-title::after {
        flex-basis: 70px;
    }

    .card-img {
        height: 220px;
    }
}

/* ========================================
   موبایل
======================================== */

@media (max-width: 600px) {
    .container {
        padding: 12px;
    }

    .main-header {
        padding: 30px 15px;
        border-radius: 0 0 30px 30px;
        border-bottom-width: 6px;
    }

    .logo {
        width: 125px;
        height: 125px;
        margin-bottom: 15px;
    }

    .main-header h1 {
        font-size: 1.9rem;
        letter-spacing: 0;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .category-title {
        font-size: 1.35rem;
        margin: 40px 0 20px;
        gap: 10px;
    }

    .category-title::before,
    .category-title::after {
        flex-basis: 35px;
        height: 2px;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .card {
        border-radius: 12px;
        border-width: 1px;
    }

    .card-img {
        height: 160px;
        padding: 5px;
        border-bottom-width: 2px;
    }

    .item-name {
        min-height: 58px;
        padding: 8px 5px;
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .main-footer {
        margin-top: 50px;
        padding: 25px 12px;
        font-size: 0.9rem;
    }
}

/* ========================================
   موبایل‌های کوچک
======================================== */

@media (max-width: 360px) {
    .catalog-grid {
        gap: 8px;
    }

    .card-img {
        height: 135px;
    }

    .item-name {
        font-size: 0.82rem;
        padding: 6px 3px;
    }

    .category-title {
        font-size: 1.15rem;
        gap: 7px;
    }

    .category-title::before,
    .category-title::after {
        flex-basis: 22px;
    }
}

/* کاهش انیمیشن برای کاربرانی که این گزینه را فعال کرده‌اند */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .card,
    .main-footer a {
        transition: none;
    }

    .card:hover {
        transform: none;
    }
}
