:root {
    --primary-color: #6BFFDF;
    --secondary-color: #ffb8c6;
    --light-color: #fff5f7;
    --dark-color: #3a3a3a;
    --font-primary: 'Tajawal', sans-serif;
}

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

/* body {
    font-family: var(--font-primary);
    direction: rtl;
    color: var(--dark-color);
    background-color: #f9f9f9;
    line-height: 1.6;
} */


/* التصميمات الأساسية للصفحات */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
    text-align: center;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0px 15px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
}

.btn:hover {
    background: #e05575;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* أنماط عامة */
:root {
    --primary-color: #ff6b8b;
    --secondary-color: #ff85a2;
    --light-pink: #fff0f3;
    --dark-color: #3a3a3a;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --black: #000000;
    --font-arabic: 'Tajawal', sans-serif;
    --font-elegant: 'Playfair Display', serif;
}

body {
    font-family: var(--font-arabic);
    direction: rtl;
    color: var(--dark-color);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 9px;
}

/* شريط التنبيهات العلوي */
.top-bar {
    background: linear-gradient(to right, #c3cfe2 0%, #ff85a2 100%);;
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offer-text i {
    margin-left: 8px;
}

.top-links a {
    color: var(--white);
    text-decoration: none;
    margin-right: 15px;
    transition: opacity 0.3s;
}

.top-links a:hover {
    opacity: 0.8;
}

.top-links a i {
    margin-left: 5px;
}

/* الهيدر الرئيسي */
.main-header {
    padding: 20px 0;
    background: linear-gradient(to right, #c3cfe2 0%, #ff85a2 100%);;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    width: 30px;
}

.logo img {
    height: 80px;
    width: auto;
}

.logo-text {
    font-family: var(--font-elegant);
    font-size: 24px;
    font-weight: 600;
    margin-left: 10px;
    color: var(--primary-color);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-family: var(--font-arabic);
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(232, 62, 140, 0.2);
}

.search-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 16px;
}

.header-icons {
    display: flex;
    align-items: center;
}

.icon-link {
    color: var(--dark-color);
    font-size: 18px;
    margin-right: 15px;
    position: relative;
    transition: color 0.3s;
}

.icon-link:hover {
    color: var(--primary-color);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    left: -8px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 5px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-content a {
    color: var(--dark-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: var(--light-pink);
    color: var(--primary-color);
}

.dropdown-content a i {
    margin-left: 8px;
    width: 18px;
    text-align: center;
}

.user-dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* القائمة الرئيسية */
.main-nav {
    background: linear-gradient(to right, #c3cfe2 0%, #ff85a2 100%);;
}

.nav-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-list>li {
    position: relative;
}

.nav-list>li>a {
    color: var(--white);
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    font-weight: 500;
    transition: background-color 0.3s;
}

.nav-list>li>a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-list>li.dropdown>a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 8px;
    font-size: 12px;
}

.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    border-top: 2px solid var(--primary-color);
}

.dropdown:hover .mega-menu {
    display: block;
}

.mega-menu-content {
    display: flex;
    padding: 20px;
}

.mega-menu-col {
    flex: 1;
    padding: 0 15px;
}

.mega-menu-col h4 {
    color: var(--primary-color);
    font-family: var(--font-elegant);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.mega-menu-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-col ul li {
    margin-bottom: 8px;
}

.mega-menu-col ul li a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

.mega-menu-col ul li a:hover {
    color: var(--primary-color);
}

.mega-menu-banner {
    flex: 0 0 300px;
}

.mega-menu-banner img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}




.mobile-submenu {
    display: none;
        padding-left: 15px;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        overflow: hidden;
}

/* عند التفعيل */
.mobile-sub-dropdown.active>.mobile-submenu {
    display: block;
}

.mobile-sub-dropdown>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-sub-dropdown>a i {
    transition: transform 0.3s ease;
}

/* تدوير السهم عند الفتح */
.mobile-sub-dropdown.active>a i {
    transform: rotate(180deg);
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu li {
    border-bottom: none !important;
}

.mobile-submenu li a {
    padding-right: 30px !important;
    font-size: 14px;
}

.mobile-dropdown>a i {
    transition: transform 0.3s;
}

/* الفوتر */
.main-footer {
    background-color: #2a2a2a;
    color: #ccc;
    padding-top: 50px;
}

.footer-top {
    padding-bottom: 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0px;
}

.footer-col {
    margin-bottom: 30px;
}

.footer-title {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
    font-family: var(--font-elegant);
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-about .footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.footer-about .footer-logo img {
    height: 30px;
    margin-left: 10px;
}

.footer-about .footer-logo span {
    font-family: var(--font-elegant);
    font-size: 20px;
    color: var(--white);
}

.footer-description {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    transition: all 0.3s;
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 14px;
}

.contact-info i {
    color: var(--primary-color);
    margin-left: 10px;
    margin-top: 3px;
}

.newsletter h5 {
    color: var(--white);
    margin-bottom: 10px;
    font-size: 16px;
}

.newsletter-form {
    display: flex;
    margin-bottom: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 25px 0 0 25px;
    font-family: var(--font-arabic);
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 20px;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-form button:hover {
    background-color: var(--secondary-color);
}

.newsletter p {
    font-size: 12px;
    color: #999;
}

.footer-bottom {
    background-color: #1a1a1a;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-size: 13px;
    color: #999;
}

.copyright a {
    color: var(--primary-color);
    text-decoration: none;
}

.payment-methods {
    display: flex;
    gap: 10px;
}

.payment-methods img {
    height: 25px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.payment-methods img:hover {
    filter: grayscale(0);
    opacity: 1;
}


/* الهدر والفوتر */
/* أنماط القائمة المنسدلة العامة */
.dropdown {
    position: relative;
}

.dropdown>a {
    display: flex;
    align-items: center;
}

.dropdown>a i {
    margin-right: 5px;
    font-size: 12px;
    transition: transform 0.3s;
}

.dropdown:hover>a i {
    transform: rotate(180deg);
}

/* تعديل خلفيه المنيو حق المنتجات */
.mega-menu {
    position: absolute;
    right: 0;
    left: 0;
    width: 200px;
    background-color: var(--white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    border-top: 2px solid var(--primary-color);
    padding: 20px 0;
}

.dropdown:hover .mega-menu {
    display: block;
}

.mega-menu-content {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.mega-menu-section {
    flex: 1;
    min-width: 250px;
    padding: 0 15px;
    margin-bottom: 20px;
}

.section-title {
    color: var(--primary-color);
    font-family: var(--font-elegant);
    width: 150px;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--primary-color);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-left: 8px;
    font-size: 16px;
}

.section-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-links li {
    margin-bottom: 8px;
}

.section-links a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 15px;
    display: block;
    padding: 5px 0;
}

.section-links a:hover {
    color: var(--primary-color);
    padding-right: 5px;
}

.mega-menu-banner {
    flex: 0 0 300px;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    display: none;
}

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

.banner-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 10px;
}

.banner-overlay h3 {
    font-size: 24px;
    margin-bottom: 5px;
    font-family: var(--font-elegant);
}

.banner-overlay p {
    margin-bottom: 15px;
}

.banner-overlay .btn {
    background: var(--white);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
}

.banner-overlay .btn:hover {
    background: var(--primary-color);
    color: var(--white);
}


/* الهدر والفوتر */

/* صفحة المنتج */
.product-page {
    padding: 30px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #ff6b8b;
    text-decoration: none;
}

.breadcrumb span {
    color: #999;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnail {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}

.thumbnail.active {
    border-color: #ff6b8b;
}

.thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 0 20px;
}

.product-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars {
    color: #ffc107;
}

.review-count {
    font-size: 14px;
    color: #666;
}

.product-code {
    font-size: 14px;
    color: #666;
}

.product-availability {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.product-availability.in-stock {
    color: #28a745;
}

.product-availability.out-of-stock {
    color: #dc3545;
}

.product-price {
    margin: 20px 0;
}

/* تنسيقات السعر في صفحه تفاصيل المنتج */
.current-price {
    font-size: 28px;
    font-weight: 700;
    color: #ff6b8b;
}

.old-price {
    font-size: 18px;
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
}

.product-description {
    margin: 30px 0;
    line-height: 1.8;
    color: #555;
}

.product-description h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.add-to-cart-form {
    margin-top: 40px;
}

.quantity-selector {
    margin-bottom: 20px;
}

.quantity-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: #ff6b8b;
    color: white;
}

.quantity-btn i {
    pointer-events: none;
}

.quantity-controls input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.btn-add-to-cart {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-bottom: 20px;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.wishlist-btn {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.wishlist-btn.added {
    color: #ff6b8b;
}

.wishlist-btn:hover {
    color: #ff6b8b;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-share span {
    font-size: 14px;
    color: #666;
}

.social-share a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-share a.facebook {
    background: #3b5998;
}

.social-share a.twitter {
    background: #1da1f2;
}

.social-share a.instagram {
    background: #e1306c;
}

.social-share a:hover {
    transform: translateY(-3px);
}

/* المنتجات ذات الصلة */
.related-products {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.section-title {
    font-size: 24px;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background: #ff6b8b;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 منتجات في الصف */
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));

    padding: 20px;
    justify-items: center;
}

/* تفاصيل المنتج في الصفحه ارئيسيه */
.product-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 230px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    display: block;
    height: 250px;
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-details {
    padding: 15px;
}

.product-name {
    margin-bottom: 10px;
}

.product-name a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.product-name a:hover {
    color: #ff6b8b;
}

.product-price {
    margin: 10px 0;
}

.product-price .price {
    font-weight: 600;
    color: #000000;
}

.product-price .old-price {
    font-size: 14px;
    text-decoration: line-through;
    color: #999;
    margin-right: 5px;
}

.btn-outline {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #ff6b8b;
    color: #ff6b8b;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: #ff6b8b;
    color: white;
}


/* التقسيم إلى صفحات (pagination) */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 14px;
    background: #eee;
    color: #333;
    border-radius: 4px;
    text-decoration: none;
}

.pagination a.active,
.pagination a:hover {
    background: #3498db;
    color: #fff;
}

.slides {
    position: relative;
}

.slide {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateX(100%);
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 1;
}

.custom-slider {
    position: relative;
    max-width: 100%;
    margin: 30px auto;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 300px;
    /* يمكنك تعديل الارتفاع */
}

.slides-container {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.slide {
    min-width: 100%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide img {
    max-height: 100%;
    object-fit: contain;
    border-radius: 15px;
    padding: 10px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 30px;
    border-radius: 50%;
    transform: translateY(-50%);
    user-select: none;
    z-index: 10;
    transition: background 0.3s ease;
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
}

.slider-arrow.prev {
    left: 15px;
}

.slider-arrow.next {
    right: 15px;
}



body {
    border: 0px solid red !important;
}

/* تصميم عرض الخصم في صفحه cart */
.shipping-info .alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    font-size: 0.9rem;
}

.shipping-discount .alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
    font-size: 0.9rem;
}

.totals-table tr:last-child {
    border-top: 2px solid #dee2e6;
}

.totals-table th {
    font-weight: 600;
}

.cart-totals {
    position: sticky;
    top: 20px;
}

/* تعديل حجم السعر في الصفحه الرئيسيه */
#price_in_index {
    font-size:0.9em
}
/* ------------------- */

/* التصميم المتجاوب */
/* التصميم المتجاوب */
@media (max-width: 992px) {
    .product-image {
        height: 240px;
        /* زيادة من 180px إلى 240px */
    }

    .featured-products {
        font-size: 13px;
        text-align: center;
    }

    .main-header {
        padding: 0;
    }

    .container {
        font-size: 16px;
    }

    .logo img {
        padding-top: 7px;
        height: 50px;
        width: auto;
    }

    #price_in_index {
        font-size: 0.6em
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-bar {
        margin: 15px 0;
        max-width: 100%;
    }

    .main-header .container {
        flex-wrap: wrap;
    }

    .logo {
        order: 1;
    }

    .header-icons {
        order: 2;
        margin-right: auto;
    }

    .search-bar {
        order: 3;
        flex: 0 0 100%;
    }

    .mega-menu-content {
        flex-wrap: wrap;
    }

    .mega-menu-banner {
        display: none;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        /* 3 منتجات في الصف */
        gap: 20px;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));

        padding: 20px;
        justify-items: center;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-col {
        margin-bottom: 30px;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .mega-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        padding: 10px 0;
    }

    .mega-menu-content {
        flex-direction: column;
    }

    .mega-menu-section {
        min-width: 100%;
        padding: 0;
    }

    .section-title {
        font-size: 16px;
        cursor: pointer;
    }

    .section-links {
        display: none;
        padding-right: 20px;
    }

    .section-links a {
        font-size: 14px;
    }

    /* إظهار الأقسام عند النقر على العناوين في الهاتف */
    .section-title.active+.section-links {
        display: block;
    }

    /* تعديل شبكة المنتجات */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 5px;
    }

    /* تكبير حجم الصور وجعلها تظهر بالكامل */
    .product-slider-container {
        height: 300px !important;
        border-radius: 8px;
        overflow: hidden;
        background-color: #f9f9f9;
    }

    .product-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        /* تغيير من cover إلى contain */
        object-position: center;
    }

    /* تقليل المسافات الداخلية لبطاقة المنتج */
    .product-card {
        padding: 5px !important;
        margin-bottom: 8px;
        border-radius: 8px;
        overflow: hidden;
    }

    .product-details {
        padding: 5px 3px !important;
        margin-top: 0 !important;
    }

    /* تصغير حجم خط اسم المنتج */
    .product-name {
        font-size: 11px !important;
        line-height: 1.2;
        margin: 2px 0 !important;
        height: 1.2em;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-align: center;
        font-weight: 600;
    }

    /* تصغير حجم خط السعر */
    .product-price {
        margin: 2px 0 !important;
        text-align: center;
        display: grid;
    }

    .price {
        font-size: 12px !important;
        font-weight: 700;
    }

    .original-price {
        font-size: 10px !important;
    }

    .discounted-price {
        font-size: 12px !important;
    }

    .save-amount {
        font-size: 9px !important;
    }

    /* تقليل حجم شارة الخصم */
    .discount-badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
        top: 5px !important;
        left: 5px !important;
    }

    /* إخفاء بعض العناصر غير الضرورية */
    .slider-indicators {
        display: none !important;
    }

    .slider-prev,
    .slider-next {
        display: none !important;
    }

    /* تعديلات خاصة بقسم العروض */
    .offer-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* تعديل حجم صور التصنيفات */
    .category-image {
        width: 60px;
        height: 60px;
    }

    .category-name {
        font-size: 10px;
    }

    /* الاحتفاظ بالتعديلات الأصلية */
    .main-image {
        height: 400px;
    }

    /* تحسين المسافات للسعر والخصم */
    .price-container {
        display: grid;
        flex-wrap: wrap;
        gap: 3px;
        align-items: center;
        margin-bottom: 0%;
    }

    .original-price,
    .discounted-price,
    .save-amount {
        font-size: 11px !important;
        margin: 0 !important;
    }

    .product-image {
        height: 300px !important;
        margin-bottom: 5px;
        object-fit: contain;
        /* تغيير من cover إلى contain */
    }

    .product-name h3 {
        font-size: 12px !important;
        margin: 2px 0 !important;
        padding: 0 !important;
    }

    .product-name a {
        font-size: 14px;
    }

    .product-price {
        margin: 3px 0 !important;
        display: grid;
    }

    .product-price .price {
        font-size: 14px;
    }

    .product-price .old-price {
        font-size: 11px;
    }

    /* تقليل المسافة بين العناصر داخل البطاقة */
    .product-colors,
    .product-sizes {
        margin: 1px;
        transform: scale(0.8);
    }

    .color-dot,
    .size-badge {
        margin: 2px;
    }

    .discount-badge {
        font-size: 9px;
        padding: 2px 4px;
        top: 3px;
        right: 3px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding: 3px;
    }

    /* تكبير حجم الصور أكثر وجعلها تظهر بالكامل */
    .product-slider-container {
        height: 280px !important;
        background-color: #f9f9f9;
    }

    .product-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        /* تغيير من cover إلى contain */
        object-position: center;
    }

    /* تقليل المسافات أكثر */
    .product-card {
        padding: 3px !important;
        margin-bottom: 5px;
    }

    .product-details {
        padding: 3px 2px !important;
    }

    /* تصغير خط اسم المنتج أكثر */
    .product-name {
        font-size: 10px !important;
        margin: 1px 0 !important;
    }

    /* تصغير خط السعر أكثر */
    .price {
        font-size: 11px !important;
    }

    .original-price {
        font-size: 9px !important;
    }

    .discounted-price {
        font-size: 11px !important;
    }

    /* إخفاء المزيد من العناصر */
    .save-amount {
        display: none !important;
    }

    .main-image {
        height: 300px;
    }

    .thumbnail-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-actions {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .social-share {
        width: 100%;
        justify-content: space-between;
    }

    /* تعديل حجم الصور في قسم العروض */
    .offer-products .product-slider-container {
        height: 260px !important;
    }

    .offer-products .product-slide img {
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding: 3px;
    }

    /* تكبير حجم الصور أكثر وجعلها تظهر بالكامل */
    .product-slider-container {
        height: 260px !important;
        background-color: #f9f9f9;
    }

    .product-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        /* تغيير من cover إلى contain */
        object-position: center;
    }

    /* تقليل المسافات أكثر */
    .product-card {
        padding: 3px !important;
        margin-bottom: 5px;
    }

    .product-details {
        padding: 3px 2px !important;
    }

    /* تصغير خط اسم المنتج أكثر */
    .product-name {
        font-size: 9px !important;
        margin: 1px 0 !important;
    }

    /* تصغير خط السعر أكثر */
    .price {
        font-size: 10px !important;
    }

    .original-price {
        font-size: 8px !important;
    }

    .discounted-price {
        font-size: 10px !important;
    }

    /* إخفاء المزيد من العناصر */
    .save-amount {
        display: none !important;
    }

    .product-image {
        height: 260px !important;
        object-fit: contain;
        /* تغيير من cover إلى contain */
    }

    .product-name a {
        font-size: 13px;
    }

    .product-price .price {
        font-size: 12px;
    }

    .learn-more-btn {
        padding: 8px 16px;
        font-size: 0.4rem;
        padding-bottom: 10px;
    }

    .product-details {
        padding: 3px 1px !important;
    }

    /* تعديل حجم الصور في قسم العروض */
    .offer-products .product-slider-container {
        height: 240px !important;
    }

    .offer-products .product-slide img {
        object-fit: contain;
    }
}

/* تعديلات خاصة لهواتف S20 Ultra وأحجام مشابهة */
@media (max-width: 412px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding: 3px;
    }

    /* تكبير حجم الصور وجعلها تظهر بالكامل */
    .product-slider-container {
        height: 250px !important;
        background-color: #f9f9f9;
    }

    .product-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        /* تغيير من cover إلى contain */
        object-position: center;
    }

    /* تقليل المسافات */
    .product-card {
        padding: 3px !important;
        margin-bottom: 5px;
    }

    .product-details {
        padding: 3px 2px !important;
    }

    /* تصغير خط اسم المنتج */
    .product-name {
        font-size: 9px !important;
        margin: 1px 0 !important;
    }

    /* تصغير خط السعر */
    .price {
        font-size: 10px !important;
    }

    .original-price {
        font-size: 8px !important;
    }

    .discounted-price {
        font-size: 10px !important;
    }

    /* إخفاء بعض العناصر */
    .save-amount {
        display: none !important;
    }

    .product-image {
        height: 250px !important;
        object-fit: contain;
        /* تغيير من cover إلى contain */
    }

    .product-name {
        font-size: 9px !important;
        /* استبدل 16px بالحجم الذي تريده */
    }

    .price {
        font-size: 9px !important;
    }

    /* تعديل حجم الصور في قسم العروض */
    .offer-products .product-slider-container {
        height: 230px !important;
    }

    .offer-products .product-slide img {
        object-fit: contain;
    }
}

@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding: 3px;
    }

    .product-card {
        max-width: 100%;
    }

    /* تكبير حجم الصور وجعلها تظهر بالكامل */
    .product-slider-container {
        height: 240px !important;
        background-color: #f9f9f9;
    }

    .product-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        /* تغيير من cover إلى contain */
        object-position: center;
    }

    /* تقليل المسافات */
    .product-card {
        padding: 3px !important;
        margin-bottom: 5px;
    }

    .product-details {
        padding: 3px 2px !important;
    }

    /* تصغير خط اسم المنتج */
    .product-name {
        font-size: 9px !important;
        margin: 1px 0 !important;
    }

    /* تصغير خط السعر */
    .price {
        font-size: 9px !important;
    }

    .original-price {
        font-size: 8px !important;
    }

    .discounted-price {
        font-size: 9px !important;
    }

    /* إخفاء بعض العناصر */
    .save-amount {
        display: none !important;
    }

    .product-image {
        height: 240px !important;
        object-fit: contain;
        /* تغيير من cover إلى contain */
    }

    .product-name {
        font-size: 9px !important;
        /* استبدل 16px بالحجم الذي تريده */
    }

    .price {
        font-size: 9px !important;
    }

    /* تعديل حجم الصور في قسم العروض */
    .offer-products .product-slider-container {
        height: 220px !important;
    }

    .offer-products .product-slide img {
        object-fit: contain;
    }
}

/* تنسيقات الزائر */
.guest-welcome {
    padding: 10px 15px;
    color: #6c757d;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    display: block;
}

.guest-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.guest-notice h5 {
    margin-top: 0;
    color: #856404;
}

.guest-notice ul {
    margin-bottom: 0;
}

.guest-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-guest {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-guest:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: white;
}