/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Tahoma, "Segoe UI", sans-serif;
    background-color: #fcfcfc;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: height 0.3s ease;
}

.logo h2 {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

.logo span {
    color: #e67e22;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 16px;
    font-weight: 500;
    color: #555;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: #e67e22;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: #e67e22;
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: #e67e22;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e0eafc 100%, #cfdef3 100%);
    padding: 80px 0;
    border-radius: 0 0 50px 50px;
    margin-bottom: 80px;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    text-align: right;
}

.hero h1 {
    font-size: 52px;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.3;
}

.text-gradient {
    background: linear-gradient(45deg, #e67e22, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 18px;
    color: #555;
    margin-bottom: 40px;
    max-width: 90%;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #e67e22;
    color: #fff;
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.3);
}

.btn-primary:hover {
    background-color: #d35400;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(230, 126, 34, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: #e67e22;
    border: 2px solid #e67e22;
}

.btn-outline:hover {
    background-color: #e67e22;
    color: #fff;
    transform: translateY(-3px);
}

/* CSS Art Visual (Right Side) */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.css-art-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: #e67e22;
    top: -20px;
    right: -20px;
    opacity: 0.6;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: #3498db;
    bottom: -20px;
    left: -20px;
    opacity: 0.4;
    animation-delay: 2s;
}

.glass-box {
    position: relative;
    z-index: 2;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    color: #2c3e50;
    transform: rotate(-10deg);
    transition: transform 0.5s ease;
}

.glass-box:hover {
    transform: rotate(0deg) scale(1.05);
}

@keyframes float {
    0% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
    100% {
        transform: translateY(0px) scale(1);
    }
}

/* آپدیت رسپانسیو برای Hero جدید */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        margin: 0 auto 30px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .css-art-wrapper {
        width: 280px;
        height: 280px;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Categories */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    color: #2c3e50;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 80px;
}

.category-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: 0.3s;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.cat-img {
    height: 200px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.category-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
    color: #2c3e50;
}

.category-card a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #e67e22;
    font-weight: bold;
}

/* Footer */
.main-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 20px;
    border-radius: 50px 50px 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.footer-about span {
    color: #e67e22;
}

.footer-about p {
    color: #bdc3c7;
    line-height: 1.8;
}

.footer-links h3, .footer-contact h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #bdc3c7;
}

.footer-links ul li a:hover {
    color: #e67e22;
    padding-right: 5px;
}

.footer-contact p {
    color: #bdc3c7;
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #34495e;
    padding-top: 20px;
    color: #95a5a6;
    font-size: 14px;
}

/* =========================================
   Responsive Design & Mobile Menu
   ========================================= */

/* Mobile Menu Base Styling */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px; /* Hidden by default */
    width: 280px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.mobile-menu-header h2 {
    font-size: 24px;
    color: #2c3e50;
}

.mobile-menu-header span {
    color: #e67e22;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-links a {
    font-size: 18px;
    color: #333;
    display: block;
    padding: 10px;
    border-radius: 8px;
    transition: 0.3s;
}

.mobile-nav-links a:hover, .mobile-nav-links a.active {
    background-color: #fef0f0;
    color: #e67e22;
}

/* Overlay Background */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Latest Products */
.latest-products {
    margin-bottom: 80px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-card {
    background: #fff;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-img {
    margin-bottom: 15px;
    transition: transform 0.3s;
}

.product-card:hover .product-img {
    transform: scale(1.03);
}

.product-title {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 10px;
    height: 48px; /* جلوگیری از بهم ریختگی عناوین دو خطی */
    overflow: hidden;
}

.product-price {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    min-height: 45px; /* حفظ ساختار در صورت نبود تخفیف */
}

.old-price {
    font-size: 13px;
    color: #95a5a6;
    text-decoration: line-through;
    height: 18px; /* رزرو فضا حتی اگر خالی باشد */
}

.old-price.empty::before {
    content: "\00a0"; /* فضای خالی نامرئی */
}

.new-price {
    font-size: 18px;
    font-weight: bold;
    color: #e67e22;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    border-top: 1px dashed #ecf0f1;
    padding-top: 15px;
    margin-top: auto; /* هول دادن به پایین کارت */
    font-size: 12px;
    color: #7f8c8d;
}

.product-meta strong {
    color: #34495e;
}

/* --- استایل و هاور کارت محصول --- */
.product-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* برای هم‌اندازه شدن کارت‌ها */
}

/* افکت شناور شدن کارت هنگام رفتن ماوس روی آن */
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

/* --- استایل توضیحات محصول --- */
.product-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin-top: 5px;
    margin-bottom: 15px;
    flex-grow: 1; /* این خط باعث می‌شود دکمه همیشه به پایین کارت بچسبد */
}

/* --- استایل دکمه تمام‌عرض --- */
.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    padding: 12px 0;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-block:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: #ffffff;
}


/* Media Queries */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .footer-about {
        grid-column: 1 / -1;
    }

    .hero h1 {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links, .desktop-only {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 60px 0;
        border-radius: 0 0 30px 30px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
        padding: 0 10px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul li a:hover {
        padding-right: 0;
    }

    .main-footer {
        border-radius: 30px 30px 0 0;
        padding: 40px 0 20px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 ستون در موبایل */
        gap: 15px;
    }

    .product-grid {
        grid-template-columns: repeat(1, 1fr); /* 2 ستون در موبایل */
        gap: 15px;
    }

    .product-title {
        font-size: 14px;
        height: 42px;
    }

    .new-price {
        font-size: 16px;
    }

    .product-meta {
        flex-direction: column;
        gap: 5px;
        font-size: 11px;
    }

}
