@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --bg-color: #06090e;
    --card-bg-start: #111827;
    --card-bg-end: #0d1117;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --primary-color: #3b82f6;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #ef4444;
    --border-color: #1f2937;
    --border-hover: #374151;
    --radius-lg: 20px;
    --radius-md: 14px;
    --transition: all 0.3s ease;
}

/* تنسيق اللوجو */
.header-logo {
    display: inline-block;
    margin-bottom: 20px;
    transition: var(--transition);
}

.header-logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.header-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    background-image: radial-gradient(circle at top, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
}

.prod-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--success-color);
    margin: 0 0 12px 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.prod-price .currency {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: bold;
}

.page-container {
    width: 100%;
    max-width: 1200px;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    margin-bottom: 40px;
}

.page-header {
    padding: 50px 30px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    margin: 0 0 15px;
    font-size: 36px;
    font-weight: 800;
    color: #fff;
}

.page-header p {
    margin: 0 auto;
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
}

.page-body {
    padding: 40px;
    min-height: 500px;
}

/* الأقسام */
.photo-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.photo-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    height: 250px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.photo-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.15);
}

.bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
    z-index: 1;
}

.photo-card:hover .bg-img {
    transform: scale(1.05);
}

.img-win { background-image: url('https://images.unsplash.com/photo-1593640408182-31c70c8268f5?auto=format&fit=crop&w=800&q=80'); }
.img-mac { background-image: url('https://images.unsplash.com/photo-1517336714731-489689fd1ca8?auto=format&fit=crop&w=800&q=80'); }
.img-all { background-image: url('https://images.unsplash.com/photo-1525547719571-a2d4ac8945e2?auto=format&fit=crop&w=800&q=80'); }
.img-hybrid { background-image: url('https://images.unsplash.com/photo-1729376169862-2297351f9e1f?q=80&w=1171&auto=format&fit=crop'); }

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(6, 9, 14, 0.98) 10%, rgba(6, 9, 14, 0.6) 50%, transparent 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}

.card-overlay h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.card-overlay p {
    margin: 0;
    color: #a1a1aa;
    font-size: 14px;
    line-height: 1.5;
}

/* المنتجات */
#products-view { display: none; animation: slideUp 0.5s ease; }
.cat-section { display: none; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 35px;
    font-family: inherit;
    transition: var(--transition);
}

.btn-back:hover { background: var(--border-hover); color: #fff; }
.btn-back svg { width: 16px; height: 16px; fill: currentColor; }

.section-title-wrapper { margin: 0 0 25px; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; }
.sec-title { font-size: 26px; font-weight: 800; color: #fff; display: block; margin-bottom: 5px; }
.sec-desc { font-size: 14px; color: var(--text-muted); }

.sub-sec-title {
    font-size: 20px; font-weight: 800; color: var(--accent-color);
    margin: 35px 0 20px; display: flex; align-items: center; gap: 10px;
}
.sub-sec-title::before { content: ""; width: 8px; height: 24px; background: var(--primary-color); border-radius: 4px; }

.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

.product-card {
    background: linear-gradient(145deg, var(--card-bg-start), var(--card-bg-end));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 15px;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; cursor: pointer; transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px); border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.product-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: transparent; transition: var(--transition); border-radius: 14px 14px 0 0;
}
.product-card:hover::before { background: var(--primary-color); }
.product-card.badge-recommended { border-color: rgba(16, 185, 129, 0.4); }
.product-card.badge-recommended:hover::before { background: var(--success-color); }

.rec-tag-mini {
    position: absolute; top: 10px; right: 10px; background: var(--success-color);
    color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 11px;
    font-weight: bold; z-index: 5; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* SEO Update: Image styling for standard <img> instead of div background */
.prod-image {
    width: 100%;
    height: 160px;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: contain; /* Important: prevents stretching */
    background-color: transparent;
    transition: transform 0.4s ease;
}

.product-card:hover .prod-image { transform: scale(1.06); }

.prod-name { font-size: 18px; font-weight: 800; color: #fff; margin: 0 0 10px 0; }

.tag-type {
    background: #1f2937; color: #d1d5db; padding: 4px 10px;
    border-radius: 6px; font-size: 11px; font-weight: 600; margin-bottom: 15px;
}
.tag-bind {
    background: rgba(14, 165, 233, 0.1); color: var(--accent-color);
    border: 1px solid rgba(14, 165, 233, 0.2);
}
.click-hint { font-size: 12px; color: var(--text-muted); font-weight: bold; margin-top: 15px; transition: var(--transition); }
.product-card:hover .click-hint { color: var(--primary-color); }

/* محتوى الـ SEO (لأرشفة قوية للكلمات الدلالية الطويلة) */
.seo-content-block {
    margin: 50px 40px 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
}
.seo-content-block h3 { color: #fff; margin-bottom: 15px; font-size: 20px; }
.seo-content-block p { color: var(--text-muted); font-size: 15px; line-height: 1.8; }
.seo-content-block strong { color: var(--accent-color); }
.seo-content-block em { color: #d1d5db; font-style: normal; font-weight: 600;}

/* المودال */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px);
    z-index: 1000; display: none; justify-content: center; align-items: center;
    padding: 20px; opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-content {
    background: var(--card-bg-start); border: 1px solid var(--border-hover);
    border-radius: 24px; width: 100%; max-width: 550px; position: relative;
    overflow: hidden; transform: translateY(30px); transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-close {
    position: absolute; top: 15px; left: 15px; background: rgba(255, 255, 255, 0.1);
    border: none; color: #fff; width: 35px; height: 35px; border-radius: 50%;
    font-size: 18px; cursor: pointer; display: flex; justify-content: center;
    align-items: center; transition: var(--transition);
}
.modal-close:hover { background: #ef4444; }

.modal-header { padding: 30px 30px 20px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.modal-title { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 10px; }

.modal-highlight {
    background: rgba(16, 185, 129, 0.1); border-right: 4px solid var(--success-color);
    padding: 15px; margin: 0 30px 20px; border-radius: 8px 0 0 8px; color: #fff;
    font-size: 14px; font-weight: 700;
}

.modal-body { padding: 0 30px 20px; }
.modal-desc {
    font-size: 15px; color: #e2e8f0; background: rgba(255, 255, 255, 0.03);
    padding: 18px 20px; border-radius: 12px; margin-bottom: 25px; line-height: 1.8;
    border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}
.modal-desc::before {
    content: '"'; position: absolute; top: -10px; right: 15px;
    font-size: 40px; color: rgba(255, 255, 255, 0.05); font-family: serif;
}

.modal-points { list-style: none; margin-bottom: 25px; }
.modal-points li { font-size: 14px; color: #e5e7eb; margin-bottom: 12px; position: relative; padding-right: 25px; }
.modal-points li::before { content: "✔"; color: var(--success-color); position: absolute; right: 0; font-weight: bold; }
.modal-points li.warning-text { color: var(--warning-color); font-weight: bold; }
.modal-points li.warning-text::before { content: "⚠️"; color: var(--warning-color); }

.modal-apps { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.app-ico {
    width: 32px; height: 32px; border-radius: 8px; display: flex;
    align-items: center; justify-content: center; font-size: 14px;
    font-weight: 800; color: #ffffff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ico-w { background: linear-gradient(135deg, #185abd, #103f8a); }
.ico-x { background: linear-gradient(135deg, #107c41, #0b572d); }
.ico-p { background: linear-gradient(135deg, #c84025, #98311c); }
.ico-o { background: linear-gradient(135deg, #0078d4, #005a9e); }
.ico-n { background: linear-gradient(135deg, #7719aa, #541279); }
.ico-a { background: linear-gradient(135deg, #a4373a, #7a292b); }
.ico-pb { background: linear-gradient(135deg, #077568, #055249); }

.modal-footer { padding: 20px 30px 30px; }
.buy-btn {
    display: block; width: 100%; padding: 18px; text-align: center; text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color), #2563eb); color: #fff;
    border-radius: 12px; font-size: 20px; font-weight: 800; box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
    transition: var(--transition); border: none; cursor: pointer; font-family: inherit;
}
.buy-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(37, 99, 235, 0.6); }

@media (max-width: 768px) {
    body { padding: 20px 10px; }
    .page-header h1 { font-size: 28px; }
    .photo-categories { grid-template-columns: 1fr; }
    .photo-card { height: 200px; }
    .seo-content-block { margin: 30px 10px 10px; }
    .modal-content { margin-top: 10vh; max-height: 80vh; overflow-y: auto; }
}
.breadcrumb-nav { padding: 15px 30px; font-size: 14px; background: rgba(0,0,0,0.2); border-bottom: 1px solid var(--border-color); }
.breadcrumb-nav ol { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; }
.breadcrumb-nav a { color: var(--primary-color); text-decoration: none; font-weight: bold; }
.breadcrumb-nav span[aria-current="page"] { color: var(--text-muted); }
.separator { color: var(--text-muted); }