@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');


:root {
    --primary-bg: #0A373B;
    --secondary-bg: #d3cabb;
    --accent-color: #c5a88a;
    --accent-hover: #c5a88a;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Inter', sans-serif;
    background: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-container {
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: #42403c;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    justify-content: center;
}

.logo img {
    border-radius: 50%;
    margin-top: +10px;
    width: 140px;
    height: 60px;
    object-fit: cover;
}

.auth-card h1 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 500;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
}

.input-with-icon input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.input-with-icon input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: var(--secondary-bg);
    color: var(--primary-bg);
}

.btn-primary:hover {
    background: #b9aa9a;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-bg);
    color: var(--primary-bg);
}

.btn-outline:hover {
    background: var(--primary-bg);
    color: #eddcc8;
}

.btn-danger {
    background: var(--primary-bg);
    color: #eddcc8;
}



.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}
.aap {
    background: #c5bcb2;
    color: rgb(44, 46, 45);
}

.error-message {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #ff6b6b;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
    text-align: left;
}

.error-message i {
    margin-left: 8px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    background: transparent;
}


.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-password:hover {
    color: white;
    text-decoration: underline;
}

.auth-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    text-align: center;
}

.auth-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background: #d3cabb;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: rgb(44, 46, 45);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: rgb(65, 95, 80);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge, .discount-badge {
    background: var(--primary-bg);
    color: #eddcc8;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.discount-badge {
    background: var(--success-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

.product-card {
    background: var(--secondary-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.product-image {
    height: 200px;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    image-rendering: crisp-edges;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    color: rgb(44, 46, 45);
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.product-description {
    color: rgba(56, 40, 11, 0.8);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.product-price {
    color: var(--primary-bg);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: block;
}

.product-stock {
    color: var(--primary-bg);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.cart-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    flex: 1;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    background: #42403c;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}


.cart-item-info h4 {
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--accent-color);
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cart-summary {
    background: #42403c;
    padding: 1.5rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-total {
    border-top: 2px solid var(--accent-color);
    border-bottom: none;
    padding-top: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.discount-text {
    color: var(--success-color);
    font-size: 0.9rem;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
}

.notification-success {
    background: var(--success-color);
}

.notification-error {
    background: var(--danger-color);
}

.notification-info {
    background: var(--accent-color);
}

.notification-warning {
    background: var(--warning-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: white;
}

.empty-state p {
    font-size: 0.9rem;
}

.footer {
    background: rgb(49, 49, 49);
    padding: 3rem 2rem 1rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #eddcc8;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.contact-info {
    list-style: none;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.contact-info i {
    color: #eddcc8;
    width: 20px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}


.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.page-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.page-content {
    background: var(--secondary-bg);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.page-content h2 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.page-content h3 {
    color: white;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.page-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.page-content ul {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* أنماط معرض الصور */
.image-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-image {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.product-image:hover {
    transform: scale(1.02);
}

/* أنماط معاينة الصور في لوحة التحكم */
.image-preview-item {
    transition: var(--transition);
    position: relative;
}

.image-preview-item:hover {
    transform: scale(1.05);
}

/* أنماط التنقل في المعرض */
.gallery-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    transform: translateY(-50%);
}

.gallery-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.gallery-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* تحسين العرض على الجوال */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .nav-actions {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .cart-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .auth-card {
        margin: 1rem;
        padding: 1.5rem;
    }

    .notification {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .social-links {
        justify-content: center;
    }

    .footer {
        padding: 2rem 1rem 1rem;
    }

    .page-container {
        padding: 1rem;
    }

    .page-content {
        padding: 1.5rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .gallery-thumbnails {
        padding: 0.5rem;
    }
    
    .gallery-thumbnails img {
        width: 60px;
        height: 60px;
    }
    
    .gallery-controls {
        padding: 0 1rem;
    }
    
    .gallery-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .cart-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .page-container {
        padding: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 320px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .page-content {
        padding: 1rem;
    }
}

.skeleton-loader {
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .navbar,
    .notification,
    .btn,
    .footer {
        display: none !important;
    }
}

.password-strength {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    background: #ff4757;
    width: 33%;
}

.password-strength-bar.medium {
    background: #ffa502;
    width: 66%;
}

.password-strength-bar.strong {
    background: #2ed573;
    width: 100%;
}

/* Page-specific subtle color adjustments */
.page-about {
    --secondary-bg: #f7efe6; /* slightly warmer light card */
    --accent-color: #c28f6a; /* a touch warmer accent */
}

.page-cart {
    --secondary-bg: #f2eadf; /* slightly neutral light card */
    --accent-color: #b98a66; /* mild accent shift */
}
