@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@40;700&display=swap');
@import url('https://cdn.fontcdn.ir/Font/Persian/Sahel/Sahel.css');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #ff66a3;
    --secondary: #ff99c2;
    --dark: #333;
    --light: #f8f8f8;
    --gray: #777;
    --white: #fff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    font-family: 'Vazirmatn', sans-serif;
}

h1, h2 {
    font-family: 'Sahel', sans-serif;
    font-weight: 700; 
}

p, a { 
    font-family: 'Estedad', sans-serif;
    font-style: italic; 
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo i {
    margin-left: 10px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-icon, .cart-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-icon:hover, .cart-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    background: rgba(255, 255, 255, 0.2);
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1594736797933-d0b4ec4d7a2e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-bottom: 40px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.categories {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title h2 {
    font-size: 32px;
    color: var(--dark);
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 100px;
    height: 3px;
    background: var(--primary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.category-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-align: center;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.category-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.category-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.category-card:hover .category-img img {
    transform: scale(1.1);
}

.category-info {
    padding: 15px;
    position: relative;
    z-index: 2;
}

.category-info h3 {
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 16px;
}

.category-info p {
    color: var(--gray);
    font-size: 12px;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,102,163,0.8), rgba(255,153,194,0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.overlay-text {
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

.featured-products {
    padding: 60px 0;
    background: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-img {
    height: 300px;
    overflow: hidden;
    position: relative;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.price {
    font-weight: bold;
    font-size: 18px;
    color: var(--primary);
}

.old-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 14px;
    margin-left: 5px;
}

footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer-column p, .footer-column a {
    color: #ccc;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 14px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 400px;
    max-width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-toggle {
    text-align: center;
    margin-top: 15px;
}

.form-toggle a {
    color: var(--primary);
    cursor: pointer;
}

.cart-modal {
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-left: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 14px;
}

.cart-item-price {
    color: var(--primary);
    font-weight: bold;
    font-size: 14px;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-weight: bold;
    font-size: 18px;
}

.cart-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.cart-actions .btn {
    flex: 1;
    text-align: center;
}

.user-menu {
    position: absolute;
    top: 50px;
    left: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    padding: 10px 0;
    min-width: 200px;
    z-index: 1001;
}

.user-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    font-size: 14px;
}

.user-menu-item:hover {
    background: #f5f5f5;
}

@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
    }
    
    nav ul li {
        margin: 5px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-modal {
        width: 95%;
    }
}

.img-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* همه وسط‌چین میشن */
  gap: 1rem; /* فاصله بین بالا و پایین */
  margin: 2rem auto;
  max-width: 600px; /* کل عرض صفحه رو پر نکنه */
}

.top-images {
  display: flex;
  justify-content: center;
  gap: 1rem; /* فاصله بین دوتا عکس بالا */
  width: 100%;
}

.top-images img {
  width: 100%;
  max-width: 250px; /* هر کدوم حداکثر 250px */
  height: auto;
}

.bottom-image img {
  width: 100%;
  max-width: 500px; /* چون دو تا بالا کنار هم 250 + 250 میشن */
  height: auto;
}

@media (max-width: 600px) {
  .top-images {
    flex-direction: column;
    align-items: center;
  }

  .top-images img,
  .bottom-image img {
    max-width: 100%;
  }
}