@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #0d6efd;
    --glow-color: rgba(13, 110, 253, 0.5);
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #333;
    --success-color: #28a745;
    --danger-color: #dc3545;
}

/* === Global Reset & Box Sizing === */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    direction: rtl;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCIgdmlld0JveD0iMCAwIDEwMCAxMDAiPgo8ZmlsdGVyIGlkPSJub2lzZSI+CiAgPGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9IjAuOCIgbnVtT2N0YXZlcz0iMSIgc3RpdGNoVGlsZXM9InN0aXRjaCIgLz4KICA8ZmVDb2xvck1hdHJpeCB0eXBlPSJzYXR1cmF0ZSIgdmFsdWVzPSIwIiAvPgo8L2ZpbHRlcj4KPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI25vaXNlKSIgb3BhY2l0eT0iMC4wMiIgLz4KPC9zdmc+');
}

/* === General Image Handling === */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Images on Review Pages */
.product-image,
.product-image-inset {
    width: 100%;
    object-fit: cover; /* Ensures image covers the frame without distortion */
}

.product-image-inset {
    border-radius: 8px;
}

/* Images on Homepage Grid */
.product-grid-card img {
    width: 100%;
    height: 320px; /* Set height as per user request */
    object-fit: contain; /* Shows the full image */
    background-color: #000; /* Added a black background for the empty space */
}

/* === Navbar === */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(30, 30, 30, 0.7);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-brand { font-size: 1.6rem; font-weight: 700; color: var(--primary-color); text-decoration: none; text-shadow: 0 0 10px var(--glow-color); }
.nav-links { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 1rem; transition: color 0.3s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text-color); }

/* === Hero Section (Homepage) === */
.hero { text-align: center; padding: 3rem 1.5rem; }
.hero h1 { margin: 0; font-size: 2.5rem; font-weight: 700; color: var(--text-color); }
.hero .tagline { margin: 0.5rem 0 0; color: var(--text-muted); font-size: 1.1rem; }

main {
    padding: 2rem 1rem;
    max-width: 880px; /* Reduced width for a more compact layout */
    margin: 0 auto;
    overflow: hidden; /* Added to prevent any potential horizontal scroll */
}

/* === Sections (Homepage & General) === */
.product-grid-container h2, .notifications-promo h3, .about-section h2 { text-align: center; font-size: 2rem; margin-bottom: 2.5rem; color: var(--text-color); }
.product-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

.product-grid-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-grid-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.4), 0 0 15px var(--glow-color); }
.product-grid-card-info { padding: 1rem 1.2rem; }
.product-grid-card-info h3 { margin: 0 0 0.5rem; font-size: 1.4rem; color: var(--primary-color); }
.product-grid-card-info p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }
.read-more { display: inline-block; margin-top: 1rem; font-weight: 600; color: var(--primary-color); transition: color 0.3s ease; }

/* === Review Page: Product Card === */
.product-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.product-image { border-bottom: 1px solid var(--border-color); }
.product-image-inset { margin: 1rem 0; }
.product-info { padding: 1.5rem; }
.product-info h1 { font-size: 1.8rem; font-weight: 700; text-align: center; margin-bottom: 2rem; }
.product-info h2 { font-size: 2rem; font-weight: 700; color: var(--primary-color); border-bottom: 2px solid var(--primary-color); padding-bottom: 0.5rem; margin-bottom: 1.5rem; }
.product-info h3 { font-size: 1.6rem; font-weight: 600; color: var(--text-color); margin-top: 2rem; margin-bottom: 1rem; }
.product-info p { font-size: 1rem; color: var(--text-muted); text-align: justify; }
.product-info ul { list-style: none; padding-right: 0; }
.product-info ul li { background-color: rgba(0,0,0,0.2); padding: 0.8rem 1rem; margin-bottom: 0.5rem; border-radius: 8px; border-right: 4px solid var(--primary-color); font-size: 1rem; transition: background-color 0.3s ease; }
.product-info ul li:hover { background-color: rgba(13, 110, 253, 0.1); }
strong { font-weight: 600; color: #58a6ff; }

/* User Feedback Blockquote */
.user-feedback { margin: 1.5rem 0; padding: 1rem; background-color: rgba(13, 110, 253, 0.05); border-right: 3px solid var(--primary-color); border-radius: 8px; }
.user-feedback h4 { margin: 0 0 0.5rem; font-size: 1.1rem; color: var(--primary-color); }
.user-feedback p { margin: 0; font-style: italic; color: var(--text-muted); font-size: 0.95rem; }

/* Pros and Cons Section */
.pros-cons { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2rem;}
.pros-cons h4 { font-size: 1.3rem; margin-bottom: 1rem; }
.pros-cons .pros h4 { color: var(--success-color); }
.pros-cons .cons h4 { color: var(--danger-color); }
.pros-cons ul li { border: none; padding-right: 1.5rem; position: relative; }
.pros-cons .pros li { border-right: 4px solid var(--success-color); }
.pros-cons .cons li { border-right: 4px solid var(--danger-color); }

/* User Reviews Section */
.user-reviews { margin-top: 3rem; }
.user-reviews h3 { text-align: center; font-size: 2rem; margin-bottom: 2rem; color: var(--text-color); }
.review-item {
    background-color: rgba(0,0,0,0.2);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-right: 4px solid var(--primary-color);
}
.review-text {
    font-style: italic;
    color: var(--text-muted);
    margin: 0 0 1rem;
    text-align: justify;
}
.reviewer-name {
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
    display: block;
}

/* Notifications & About Sections */
.notifications-promo, .about-section { background-color: var(--surface-color); padding: 2.5rem 1.5rem; border-radius: 12px; margin-top: 3rem; text-align: center; }
.notifications-promo button { background-color: var(--primary-color); color: white; border: none; padding: 0.8rem 1.8rem; font-size: 1rem; font-family: 'Vazirmatn', sans-serif; border-radius: 8px; cursor: pointer; transition: background-color 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 0 15px var(--glow-color); }
.notifications-promo button:hover { background-color: #0b5ed7; box-shadow: 0 0 25px var(--glow-color); }

/* Footer */
footer { text-align: center; padding: 2rem 1rem; margin-top: 2rem; background-color: #1a1a1a; border-top: 1px solid var(--border-color); font-size: 0.9rem; color: var(--text-muted); }

/* --- Tablet & Desktop Overrides --- */
@media (min-width: 768px) {
    .nav-links { display: flex; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .pros-cons { flex-direction: row; }
    .hero h1 { font-size: 3.5rem; }
    .hero .tagline { font-size: 1.3rem; }
    .product-info { padding: 2.5rem; }
    .product-info h1 { font-size: 2.5rem; }
    .product-info h2 { font-size: 2.5rem; }
    .product-info h3 { font-size: 2rem; }
}

@media (min-width: 992px) {
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}
