:root {
    --bg-color: #36f5e1; /* لون الخلفية السماوي */
    --card-bg: #f20ec6;  /* لون الكارت الوردي الفاقع */
    --text-white: #ffffff;
    --text-dark: #333333;
    --header-bg: #ffffff;
    --border-radius-hero: 30px;
    --btn-radius: 20px;
}

body.dark-mode {
    --bg-color: #121212;
    --card-bg: #b90b91;
    --header-bg: #1e1e1e;
    --text-white: #e0e0e0;
    --text-dark: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

/* الهيدر الجديد */
.top-header {
    background-color: var(--header-bg);
    padding: 2rem 1rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    text-align: center;
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.5rem;
}

.logo-area img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    margin-bottom: 15px;
}
body.dark-mode .logo-area img {
    filter: brightness(0) invert(1);
}

.store-title {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--card-bg); /* اللون الوردي للعنوان ليكون بارزاً */
    margin-bottom: 0.3rem;
    letter-spacing: -1px;
}

.store-description {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding: 0 1rem;
    line-height: 1.5;
    opacity: 0.9;
}

.social-links-top {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
}

.social-links-top .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--bg-color);
    color: var(--text-dark);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.social-links-top .social-icon:hover {
    background-color: var(--card-bg);
    color: #fff;
    transform: translateY(-3px);
}

.nav-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    max-width: 450px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    flex-grow: 1;
}

.search-box input {
    width: 100%;
    background-color: #f5f5f5;
    border: none;
    border-radius: 20px;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    font-family: 'Cairo', sans-serif;
    outline: none;
    font-size: 1rem;
    color: #333;
}
body.dark-mode .search-box input {
    background-color: #333;
    color: #fff;
}
.search-box .search-icon {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* المحتوى الأساسي */
.main-content {
    max-width: 600px; 
    margin: 0 auto;
    padding: 0 1rem;
}

/* شبكة المنتجات */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    padding-bottom: 4rem;
}

.product-card {
    background-color: var(--header-bg);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}

.product-image-container {
    width: 100%;
    padding-top: 100%; /* تصميم مربع 1:1 */
    position: relative;
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* تظهر كاملة ولا تنقص */
    transition: transform 0.3s ease;
}

.product-info {
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--card-bg);
    margin-bottom: 0.8rem;
    margin-top: auto;
}

.product-btn {
    background-color: #25D366; 
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.product-btn:hover {
    background-color: #1ebd5a;
}

/* الفوتر ومواقع التواصل */
.bottom-footer {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    margin-top: 3rem;
    background-color: var(--header-bg);
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.03);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--bg-color);
    color: var(--text-dark);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.social-icon:hover {
    background-color: var(--card-bg);
    color: #fff;
    transform: translateY(-3px);
}

.footer-links {
    margin-bottom: 1.5rem;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--text-dark);
    color: var(--header-bg);
    text-decoration: none;
    padding: 0.6rem 2rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.2s;
}
.admin-link:hover {
    transform: scale(1.05);
}

.copyright {
    font-size: 0.85rem;
    color: #888;
}

body.dark-mode .copyright {
    color: #bbb;
}

@media (min-width: 601px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
    .main-content { max-width: 900px; margin-top: 2rem;}
}
