/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.logo h1 {
    color: #dc3545;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
}

.logo i {
    margin-right: 0.3rem;
    color: #dc3545;
}

.search-bar {
    display: flex;
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
    border-radius: 25px;
    margin-right: 93px;
    /* مساحة من اليمين */
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 25px 0 0 25px;
    outline: none;
    font-size: 1rem;
}

.search-bar button {
    padding: 0.75rem 1.5rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: bold;
    font-size: 1rem;
}

.search-bar button:hover {
    background: #c82333;
}

.header-actions {
    display: flex;
    align-items: center;
    color: #dc3545;
    padding-right: 20px;
}

.both-pan-cart {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 30px;
    /* مساحة من اليمين */
}

.user-actions {
    margin-left: auto;
    /* يدزها لليمين */
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 30px;
    /* مساحة من اليمين */
}

.user-menu {
    gap: 25px;
    display: flex;
    align-items: center;
    margin-left: 150px;
}

.user-menu a {
    text-decoration: none;
    color: #d50932;
    font-weight: bold;
}

/* Navigation */
.navbar {
    padding: 0.5rem 0;

}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #dc3545;
}

.nav-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 2rem;
    margin-right: 30px;
    /* مساحة من اليمين */
}

.nav-menu a {
    text-decoration: none;
    color: #dc3545;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #dc3545;
    color: white;
}

.cta-button {
    background: white;
    color: #dc3545;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
}

.products {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    color: #333;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    background: white;
    color: #333;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.product-info {
    padding: 1.5rem;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #dc3545;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.add-to-cart {
    flex: 1;
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #c82333;
}

.quick-view {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #ddd;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-view:hover {
    background: #333;
    color: white;
    border-color: #333;
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, #333, #555);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 0;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 25px 0 0 25px;
    outline: none;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #c82333;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #dc3545;
}

.footer-section p,
.footer-section li {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #dc3545;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #dc3545;
    border-radius: 50%;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    opacity: 0.7;
}

/* Product Detail Page */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
}

.breadcrumb a {
    color: #dc3545;
    text-decoration: none;
}

.breadcrumb span {
    color: #666;
}

.product-detail {
    padding: 3rem 0;
    background: white;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-images {
    top: 100px;
}

.main-image {
    margin-bottom: 1rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.thumbnail-images {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumbnail-images img:hover {
    border-color: #dc3545;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #ffc107;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.current-price {
    font-size: 2rem;
    font-weight: bold;
    color: #dc3545;
}

.old-price {
    font-size: 1.2rem;
    text-decoration: line-through;
    color: #999;
}

.discount {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
}

.product-description,
.product-specs {
    margin-bottom: 2rem;
}

.product-description h3,
.product-specs h3 {
    margin-bottom: 1rem;
    color: #333;
}

.product-specs ul {
    list-style: none;
}

.product-specs li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.product-actions {
    margin-bottom: 2rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-controls button {
    background: #f8f9fa;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.quantity-controls button:hover {
    background: #dc3545;
    color: white;
}

.quantity-controls input {
    border: none;
    padding: 0.5rem;
    width: 60px;
    text-align: center;
    outline: none;
}

.add-to-cart-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-right: 1rem;
    transition: background 0.3s;
}

.add-to-cart-btn:hover {
    background: #c82333;
}

.wishlist-btn {
    background: white;
    color: #dc3545;
    border: 2px solid #dc3545;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.wishlist-btn:hover {
    background: #dc3545;
    color: white;
}

.product-features {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #28a745;
    font-weight: 500;
}

.feature i {
    font-size: 1.2rem;
}

.related-products {
    padding: 3rem 0;
    background: #f8f9fa;
}

.related-products h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

/* Cart Page */
.cart-section {
    padding: 3rem 0;
    min-height: 60vh;
}

.cart-section h1 {
    margin-bottom: 2rem;
    color: #333;
}

.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.item-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.item-info p {
    color: #666;
    font-size: 0.9rem;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.item-price {
    font-weight: bold;
    color: #dc3545;
    font-size: 1.1rem;
}

.remove-item {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.remove-item:hover {
    background: #c82333;
}

.cart-summary {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.summary-line.total {
    border-top: 2px solid #eee;
    padding-top: 1rem;
    font-weight: bold;
    font-size: 1.2rem;
    color: #dc3545;
}

.checkout-btn {
    width: 100%;
    background: #dc3545;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin: 1.5rem 0;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background: #c82333;
}

.payment-methods h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1rem;
}

.payment-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.payment-icons i {
    font-size: 2rem;
    color: #666;
}

.empty-cart {
    text-align: center;
    padding: 4rem 0;
}

.empty-cart i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-cart h2 {
    margin-bottom: 1rem;
    color: #666;
}

.continue-shopping {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.continue-shopping:hover {
    background: #c82333;
}

/* Contact Page */
.contact-section {
    padding: 3rem 0;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: grid;
    gap: 1.5rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card i {
    font-size: 2.5rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.contact-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.contact-form-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #dc3545;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    display: block;
}

.submit-btn {
    width: 100%;
    background: #dc3545;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #c82333;
}

.faq-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    margin-bottom: 1rem;
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-top {
        flex-direction: column;
        gap: 1rem;
    }

    .search-bar {
        margin: 0;
        max-width: 100%;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        text-align: center;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    .item-quantity,
    .item-price,
    .remove-item {
        grid-column: 2;
        justify-self: end;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }

    .newsletter-form input,
    .newsletter-form button {
        border-radius: 25px;
    }

    .product-features {
        flex-direction: column;
        gap: 1rem;
    }

    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .logo {
        margin-left: 0px;
    }

    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .search-bar {
        margin: 0;
        margin-top: 1rem;
        max-width: 100%;
        margin-left: 10px;
    }

    .user-actions,
    .user-menu {
        flex-direction: column;
        gap: 10px;
        padding-right: 0;
    }

    .nav-toggle {
        display: flex;
        margin-left: 10px;
        cursor: pointer;
        font-size: 1.8rem;
        color: #dc3545;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white;
        position: absolute;
        bottom: 60px;
        left: 0;
        padding: 1rem 0;
    }

    .nav-menu.active {
        display: flex;
        flex-direction: row;
        top: 210px;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .product-info h1 {
        font-size: 1.5rem;
    }

    .product-price .current-price {
        font-size: 1.5rem;
    }

    .product-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.4rem;
    }

    .search-bar button,
    .search-bar input,
    .newsletter-form input,
    .newsletter-form button {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .product-card {
        padding: 1rem;
    }

    .product-info {
        padding: 1rem;
    }

    .main-image img {
        margin-top: 190px;
        height: 250px;
    }

    .cta-button,
    .add-to-cart-btn,
    .wishlist-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        border-radius: 25px;
        width: 100%;
    }

    .thumbnail-images {
        flex-wrap: wrap;
    }
}
