/* ============================================================
   Cafe Warm Theme — کافه گرم
   شخصیت: گرم، کاغذی، دنج، کلاسیک کافه‌ای
   ============================================================ */

/* ============================================================
   1. Typography — تنوع حروف
   ============================================================ */
.theme-cafe-warm {
    font-family: var(--font-body);
    line-height: 1.8;
    letter-spacing: -0.005em;
}

.theme-cafe-warm h1,
.theme-cafe-warm h2,
.theme-cafe-warm h3,
.theme-cafe-warm h4,
.theme-cafe-warm h5 {
    font-family: var(--font-heading);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.theme-cafe-warm h1 {
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    margin-bottom: 1rem;
}

.theme-cafe-warm h2 {
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.75rem;
}

.theme-cafe-warm h3 {
    font-weight: 600;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    margin-bottom: 0.5rem;
}

.theme-cafe-warm p {
    color: var(--color-text);
    opacity: 0.9;
}

.theme-cafe-warm .muted {
    color: var(--color-muted);
    opacity: 1;
}

/* ============================================================
   2. Background — بافت کاغذی
   ============================================================ */
.theme-cafe-warm body,
.theme-cafe-warm .theme-body {
    background-color: var(--color-bg);
    background-image: radial-gradient(circle at 25% 15%, rgba(192, 133, 82, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 75% 85%, rgba(139, 94, 60, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

/* بافت نقطه‌ای ملایم (کاغذ) */
.theme-cafe-warm body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(
        circle at 1px 1px,
        rgba(139, 94, 60, 0.045) 1px,
        transparent 0
    );
    background-size: 24px 24px;
    z-index: 0;
}

.theme-cafe-warm main {
    position: relative;
    z-index: 1;
}

/* ============================================================
   3. Header — گرم و شخصی
   ============================================================ */
.theme-cafe-warm header {
    background: rgba(255, 248, 240, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(232, 207, 169, 0.8);
    box-shadow: 0 1px 0 rgba(139, 94, 60, 0.04);
}

.theme-cafe-warm header a {
    color: var(--color-text);
    transition: color 0.2s ease;
}

.theme-cafe-warm header a:hover {
    color: var(--color-primary);
}

/* ============================================================
   4. Cards — کارت با حس دنج
   ============================================================ */
.theme-cafe-warm .card,
.theme-cafe-warm .theme-card {
    background: linear-gradient(145deg, #FFFFFF 0%, #FFFCF6 100%);
    border: 1px solid rgba(232, 207, 169, 0.7);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(139, 94, 60, 0.04),
    0 4px 12px rgba(139, 94, 60, 0.06);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
    overflow: hidden;
    position: relative;
}

.theme-cafe-warm .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(139, 94, 60, 0.06),
    0 12px 28px rgba(139, 94, 60, 0.12);
    border-color: rgba(192, 133, 82, 0.5);
}

/* خط تزئینی بالای کارت */
.theme-cafe-warm .card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--color-primary) 0%,
        var(--color-accent) 50%,
        var(--color-primary) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-cafe-warm .card:hover::before {
    opacity: 1;
}

/* ============================================================
   5. Buttons — گرم و دوستانه
   ============================================================ */
.theme-cafe-warm .btn-primary,
.theme-cafe-warm .btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(139, 94, 60, 0.15),
    0 4px 12px rgba(139, 94, 60, 0.1);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.theme-cafe-warm .btn-primary:hover,
.theme-cafe-warm .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 94, 60, 0.2),
    0 12px 24px rgba(139, 94, 60, 0.18);
}

.theme-cafe-warm .btn-primary:active,
.theme-cafe-warm .btn:active {
    transform: translateY(0);
}

/* افکت درخشش ملایم */
.theme-cafe-warm .btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.theme-cafe-warm .btn-primary:active::after {
    width: 300px;
    height: 300px;
    transition: width 0s, height 0s;
}

/* ============================================================
   6. Category Tabs — تب‌های گرد و گرم
   ============================================================ */
.theme-cafe-warm .category-tab,
.theme-cafe-warm [data-category-tab] {
    background: rgba(245, 230, 211, 0.6);
    color: var(--color-text);
    border: 1px solid rgba(232, 207, 169, 0.6);
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.2s ease;
    cursor: pointer;
}

.theme-cafe-warm .category-tab:hover {
    background: rgba(232, 207, 169, 0.8);
    transform: translateY(-1px);
}

.theme-cafe-warm .category-tab.active,
.theme-cafe-warm .category-tab[data-active="true"] {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(139, 94, 60, 0.25);
}

/* ============================================================
   7. Product Card — ویژه
   ============================================================ */
.theme-cafe-warm .product-card {
    background: #FFFFFF;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(232, 207, 169, 0.6);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease;
    position: relative;
}

.theme-cafe-warm .product-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 8px 16px rgba(139, 94, 60, 0.1),
    0 20px 40px rgba(139, 94, 60, 0.15);
}

.theme-cafe-warm .product-card img {
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-cafe-warm .product-card:hover img {
    transform: scale(1.06);
}

.theme-cafe-warm .product-card .price {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.05rem;
}

/* ============================================================
   8. Add to Cart Button — دکمه گرد گرم
   ============================================================ */
.theme-cafe-warm .add-to-cart {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(139, 94, 60, 0.25);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.2s ease;
}

.theme-cafe-warm .add-to-cart:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(139, 94, 60, 0.35);
}

.theme-cafe-warm .add-to-cart:active {
    transform: scale(0.95);
}

/* ============================================================
   9. Search Input — کاغذی و نرم
   ============================================================ */
.theme-cafe-warm input[type="search"],
.theme-cafe-warm .search-input {
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(232, 207, 169, 0.8);
    border-radius: 9999px;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    transition: border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
    width: 100%;
}

.theme-cafe-warm input[type="search"]:focus,
.theme-cafe-warm .search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(139, 94, 60, 0.1);
}

.theme-cafe-warm input[type="search"]::placeholder {
    color: var(--color-muted);
    opacity: 0.7;
}

/* ============================================================
   10. Section Headings — با خط تزئینی
   ============================================================ */
.theme-cafe-warm .section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    position: relative;
}

.theme-cafe-warm .section-title::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 2px;
}

/* ============================================================
   11. Cart Sidebar — دنج و گرم
   ============================================================ */
.theme-cafe-warm .cart-sidebar {
    background: linear-gradient(180deg, #FFFCF6 0%, #FFF8F0 100%);
    box-shadow: -8px 0 32px rgba(139, 94, 60, 0.15);
}

.theme-cafe-warm .cart-sidebar header {
    background: transparent;
    border-bottom: 1px solid rgba(232, 207, 169, 0.6);
}

.theme-cafe-warm .cart-item {
    background: #FFFFFF;
    border: 1px solid rgba(232, 207, 169, 0.5);
    border-radius: var(--radius);
    padding: 0.75rem;
    transition: border-color 0.2s ease;
}

.theme-cafe-warm .cart-item:hover {
    border-color: rgba(192, 133, 82, 0.6);
}

/* ============================================================
   12. Quantity Buttons — دایره‌های گرم
   ============================================================ */
.theme-cafe-warm .qty-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(245, 230, 211, 0.8);
    color: var(--color-primary);
    border: 1px solid rgba(232, 207, 169, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease,
    transform 0.2s ease;
}

.theme-cafe-warm .qty-btn:hover {
    background: var(--color-primary);
    color: #FFFFFF;
    transform: scale(1.1);
}

.theme-cafe-warm .qty-btn:active {
    transform: scale(0.95);
}

/* ============================================================
   13. Badge / Tag — گوشه گرد
   ============================================================ */
.theme-cafe-warm .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(192, 133, 82, 0.15);
    color: var(--color-primary);
}

.theme-cafe-warm .badge-accent {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #FFFFFF;
}

.theme-cafe-warm .badge-discount {
    background: #FEE2E2;
    color: #991B1B;
}

/* ============================================================
   14. Discount Price
   ============================================================ */
.theme-cafe-warm .price-original {
    text-decoration: line-through;
    color: var(--color-muted);
    opacity: 0.6;
    font-size: 0.85rem;
}

.theme-cafe-warm .price-discount {
    color: #DC2626;
    font-weight: 700;
    font-family: var(--font-heading);
}

/* ============================================================
   15. Footer — کافه‌ای
   ============================================================ */
.theme-cafe-warm footer {
    background: linear-gradient(180deg, transparent 0%, rgba(245, 230, 211, 0.4) 100%);
    border-top: 1px solid rgba(232, 207, 169, 0.5);
    padding: 3rem 1rem 2rem;
    margin-top: 4rem;
}

/* ============================================================
   16. Animations — نرم و طبیعی
   ============================================================ */
@keyframes cafeFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-cafe-warm .animate-in {
    animation: cafeFadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes cafePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.theme-cafe-warm .pulse {
    animation: cafePulse 2s ease-in-out infinite;
}

/* ============================================================
   17. Responsive
   ============================================================ */
@media (max-width: 640px) {
    .theme-cafe-warm h1 {
        font-size: 1.75rem;
    }

    .theme-cafe-warm h2 {
        font-size: 1.5rem;
    }

    .theme-cafe-warm .card:hover,
    .theme-cafe-warm .product-card:hover {
        transform: none;
    }
}

/* ============================================================
   18. Dark Mode Adjustments
   ============================================================ */
.theme-cafe-warm.dark .card,
html.dark .theme-cafe-warm .card {
    background: linear-gradient(145deg, #2B1810 0%, #241410 100%);
    border-color: rgba(78, 51, 32, 0.8);
}

.theme-cafe-warm.dark .product-card,
html.dark .theme-cafe-warm .product-card {
    background: #2B1810;
    border-color: rgba(78, 51, 32, 0.7);
}

.theme-cafe-warm.dark input[type="search"],
html.dark .theme-cafe-warm input[type="search"] {
    background: rgba(26, 15, 10, 0.6);
    border-color: rgba(78, 51, 32, 0.8);
    color: #F5E6D3;
}
