/* === شاشة البداية (Splash) === */
#splash-page {
    background: linear-gradient(135deg, #8B4513 0%, #C17817 50%, #D4A574 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.splash-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: pulse 2s infinite;
    backdrop-filter: blur(10px);
}

.splash-logo i {
    font-size: 55px;
    color: white;
}

.splash-name {
    font-size: 36px;
    font-weight: 900;
    color: white;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.splash-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.splash-loader {
    margin-top: 50px;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === صفحة تسجيل الدخول === */
#auth-page {
    display: flex;
    flex-direction: column;
    padding: 60px 24px 24px;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 20px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.auth-logo i {
    font-size: 36px;
    color: white;
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-light);
}

.auth-form {
    flex: 1;
}

.auth-toggle {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-light);
}

.auth-toggle a {
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.auth-skip {
    text-align: center;
    margin-top: 12px;
}

.auth-skip a {
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
}

/* === الصفحة الرئيسية === */
#home-page {
    padding-top: 50px;
}

.home-greeting {
    padding: 16px 20px 8px;
}

.greeting-text {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.greeting-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

/* البحث */
.search-bar {
    margin: 12px 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 14px;
    font-family: 'Tajawal', sans-serif;
    color: var(--text);
    background: var(--bg-card);
    transition: var(--transition);
    outline: none;
}

.search-bar input:focus {
    border-color: var(--primary);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
}

/* البانر السلايدر */
.banner-slider {
    padding: 8px 20px;
    overflow-x: auto;
    display: flex;
    gap: 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.banner-slider::-webkit-scrollbar {
    display: none;
}

.banner-slider .banner-card {
    scroll-snap-align: center;
    flex-shrink: 0;
}

/* الأقسام */
.categories-section {
    padding: 8px 0;
}

.categories-grid {
    display: flex;
    justify-content: space-around;
    padding: 8px 20px;
    gap: 8px;
}

/* المنتجات المميزة */
.featured-section {
    padding: 8px 0;
}

.featured-slider {
    display: flex;
    gap: 12px;
    padding: 4px 20px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.featured-slider::-webkit-scrollbar {
    display: none;
}

.featured-slider .featured-card {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* المنتجات الشائعة */
.popular-section {
    padding: 8px 0 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 4px 20px;
}

/* === صفحة القسم === */
#category-page {
    padding-top: 50px;
}

.category-banner {
    width: calc(100% - 40px);
    height: 160px;
    margin: 16px 20px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
}

.category-banner-title {
    font-size: 22px;
    font-weight: 800;
}

.category-banner-count {
    font-size: 12px;
    opacity: 0.9;
}

.category-products {
    padding: 0 20px;
}

.category-products .products-grid {
    padding: 4px 0;
}

/* === صفحة تفاصيل المنتج === */
#product-page {
    padding-top: 0;
}

.product-hero {
    width: 100%;
    height: 300px;
    position: relative;
}

.product-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 60px 20px 16px;
    background: linear-gradient(rgba(0, 0, 0, 0.3), transparent);
    display: flex;
    justify-content: space-between;
}

.product-hero .back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.product-hero .back-btn:active {
    transform: scale(0.9);
}

.product-details {
    padding: 24px 20px;
    margin-top: -30px;
    background: var(--bg);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;
}

.product-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.product-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.product-price-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.product-main-price {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
}

.product-main-price small {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.product-add-bar {
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.product-qty {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    padding: 6px;
    border-radius: var(--radius-sm);
}

.product-add-btn {
    flex: 1;
}

/* === صفحة السلة === */
#cart-page {
    padding-top: 50px;
}

.cart-content {
    padding: 16px 20px;
}

.cart-footer {
    position: absolute;
    bottom: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

/* === صفحة إتمام الطلب === */
#checkout-page {
    padding-top: 50px;
}

.checkout-content {
    padding: 16px 20px;
}

.checkout-section {
    margin-bottom: 24px;
}

.checkout-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

/* === صفحة الملف الشخصي === */
#profile-page {
    padding-top: 50px;
}

.profile-content {
    padding: 20px;
}

.profile-header {
    text-align: center;
    padding: 16px 0 24px;
}

.profile-section {
    margin-bottom: 20px;
}

.profile-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

/* === صفحة نتائج البحث === */
#search-page {
    padding-top: 50px;
}

.search-page-bar {
    margin: 16px 20px;
    position: relative;
}

.search-page-bar input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 14px;
    font-family: 'Tajawal', sans-serif;
    color: var(--text);
    background: var(--bg-card);
    outline: none;
    transition: var(--transition);
}

.search-page-bar input:focus {
    border-color: var(--primary);
}

.search-page-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-results {
    padding: 0 20px;
}

.search-results .products-grid {
    padding: 4px 0;
}
