@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600&display=swap');
@font-face {
    font-family: 'CustomFont';
    src: url('fonts/font.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    font-family: 'Tajawal', sans-serif;
}
:root {
    --red: #e74c3c;
    --white: #E0FFFF;
    --black: #222;
    --light-color: #777;
    --border: .2rem solid var(--black);
    --border-color: #ccc;
    --background-color: #E0FFFF;
    --text-color: #000;
    --link-hover-color: #601cfc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
    text-decoration: none;
    transition: .2s linear;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #00b7b3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

.navbar {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#sidebarToggle {
    font-size: 2rem;
    background: transparent;
    border: none;
    color: black;
    cursor: pointer;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo img {
    width: 90px;
    margin-top: 5px;
}

.cart-btn {
    font-size: 2rem;
    color: black;
    position: relative;
}

.cart-count {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 1rem;
    margin-left: 5px;
}

.sidebar {
    width: 250px;
    height: 100vh;
    background: #00b7b3;
    backdrop-filter: blur(15px);
    position: fixed;
    top: 0;
    left: -250px;
    padding: 20px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar .nav-link {
    color: black;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.sidebar .menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}


/* كارتات المنتجات */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    width: 100%;
}

.container {
    background: rgba(54, 76, 92, 0.5);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 20px;
    padding: 15px;
    width: 250px; /* عرض ثابت */
    height: 450px; /* ارتفاع ثابت */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card {
    width: 100%;
    perspective: 1200px;
}


/* تحسينات الصورة */
.cover {
    width: 100%;
       background-position: center;
    background-size: cover;
    height: 180px; /* ارتفاع ثابت للصورة */
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* لضمان ملء المساحة دون تشويه */
filter: brightness(0.8) contrast(1.4) saturate(1.4);
    transition: transform 0.8s ease, filter 0.5s ease;
    
}

.container:hover .cover img {
    transform: scale(1.05);
}

.cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.5));
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

.container:hover .cover::before {
    opacity: 0.4;
}

/* تحسينات النص */
.card h1 {
    margin: 12px 0;
    font-size: 1.8rem;
    color: white;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* عدد الأسطر */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.6rem; /* ارتفاع ثابت للنص */
}

.card .price {
    margin: 8px 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #9f1826;
}

.card p {
    color: #f0f0f0;
    font-size: 1.4rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* عدد الأسطر */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 15px;
    min-height: 5.6rem; /* ارتفاع ثابت للوصف */
}

/* زر الإضافة إلى السلة */
.add-to-cart-btn {
    width: calc(100%);
    padding: 12px;
    margin-top: auto; /* لدفع الزر إلى الأسفل */
    margin-bottom: 10px;
    /* باقي الخصائص كما هي */
}

/* التأكيد على ثبات الأبعاد */
.container > * {
    flex-shrink: 0; /* منع العناصر من التقلص */
}

main, section, footer, .content-wrapper, header {
    transition: transform 0.3s ease;
    width: 100%;
box-sizing: border-box;
}

.body-shift main,
.body-shift section,
.body-shift footer,
.body-shift .content-wrapper,
.body-shift header {
    transform: translateX(250px);
    transition: all 0.2s ease;
}

.body-shift .card-container,
.body-shift .container,
.body-shift .footer .box-container {
       margin-right: 0 !important;
   
  
    transform: none !important;
}

       


*::selection {
    background-color:#00b7b3 ;
    color: var(--black);
}

html {
    font-size: 62.5%; 
      width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 8rem;
}

/* scrollbar  */
::-webkit-scrollbar {
    height: .5rem;
    width: 1rem;
}
.modal {
    display: none; 
    position: fixed;
    z-index: 1025;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: rgba(0,0,0,0.4);
}

.modal.showModal{
    display: flex;
}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 50%; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    position: relative; 
}

/* The Close Button */
.close {
    position: absolute; 
    top: 10px;
    right: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}


::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #00b7b3;
    border-radius: 5rem;
}

/* Section defaults */
section {
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* Button styling */

.btn {
    background-color: rgba(0, 183, 179, 0.5); 
    backdrop-filter: blur(15px);
    color: var(--black);
    display: inline-block;
    margin-top: 1rem;
    padding: 1.3rem 3rem;
    cursor: pointer;
    font-size: 2rem;
    text-transform: capitalize;
    text-align: center;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn:hover:hover {
    letter-spacing: .2rem;
    background-color: rgba(0, 183, 179, 0.7); 
}

.whatsapp-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1010;
    font-size: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.whatsapp-icon:hover {
    background-color: white;
    color:#25d366;
}





body {
    padding-top: 40px; 
      width: 100%;
    overflow-x: hidden;
}



.home {
    width: 100%;
    margin: 0 auto;
}

.home .swiper-slider {
    width: 100%;
}

.home .slide {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home .slide .image {
    width: 100%;
    height: 60vh; 
    margin-top:0.5%;
    Border-radius :25px;
    overflow: hidden;
}

.home .slide .image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* لضمان ملء الصورة بشكل كامل */
}

.home .slide .content {
    text-align: center;
    margin-top: 1rem;
}

.home .slide .content h3 {
    font-size: 2.5rem;
    color: #000;
}


.swiper-pagination-bullet-active {
    background-color: #00b7b3;
}

.category {
    width: 100%; 
    overflow: hidden; 
    background-color: #f1f1f1; 
    padding: 10px 0; 
}

.title {
    display: block; 
    text-align: center;
    font-size: 2rem;
    border-radius: 20px;
    color: #fff;
    margin-top: 30px;
    border: 1px solid black;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(54, 76, 92, 0.5); /* جعل الخلفية شفافة باستخدام قيمة ألفا */
    padding: 10px 0;
}

.box-container {
    display: flex; 
    justify-content: center;
    gap: 20px;

}

.box {
    box-shadow: #777 3px;
    border-radius: 10px;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    text-decoration: none;
}

.box img {
        border-radius: 10px;

    width: 50px; 
    height: 50px; 
}

.box h3 {
    margin-top: 5px;
}










.footer .credit {
    background-color: var(--black);
    text-align: center;
    padding: 3rem 2rem;
    font-size: 2rem;
    color: var(--white);
    max-height: 100px;
    justify-content: center;
    padding-bottom: 10rem; 
}
.credit a ion-icon {
    padding: 10px;
    color: #800000;
    border: 1px solid #00b7b3;
    border-radius: 50%;
    background-color: #ffffff;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 22px;
    height: 22px;
    margin-top: 5px;
}
.credit a ion-icon:hover{
    background-color: #800000;
    color:  #ffffff;
}
li i.fa-solid {
    font-size: 2rem;
    padding-right: 10px;
    color: #192b2b;
}

.footer .credit span {
    color: #00b7b3;
}

.footer .credit .name {
    color: #00b7b3;
    text-decoration: none;
    transition: 0.7s ease;
}


.container {
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(54, 76, 92, 0.5); /* جعل الخلفية شفافة باستخدام قيمة ألفا */
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    width: 220px;
    justify-content: center;
    text-align: center;
    position: relative;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    overflow: hidden;
    transform-style: preserve-3d;
}

.container:hover {
    transform: translateY(-20px) rotateY(10deg); /* تدوير الكارد في المحور Y */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 40px 80px rgba(0, 0, 0, 0.3); /* زيادة تأثير الظلال */
}



.add-to-cart-btn {
    background: #9f1826; /* لون خلفية موحد */
    color: rgba(255, 255, 255, 0.95); /* لون النص */
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    margin-top: 15px;
    font-size: 1.4em;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.5s ease;
    box-shadow: 0 10px 20px rgba(159, 24, 38, 0.4), 0 20px 40px rgba(159, 24, 38, 0.3); /* ظل بلون #9f1826 */
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2); /* تأثير شفاف */
    transition: opacity 0.5s ease;
    opacity: 0;
}

.add-to-cart-btn:hover::before {
    opacity: 1;
    transform: scale(1.2); /* توسيع الإضاءة عند التمرير */
}

.add-to-cart-btn:hover {
    transform: scale(1.05); /* تكبير طفيف عند التمرير */
    box-shadow: 0 10px 20px rgba(159, 24, 38, 0.5), 0 25px 50px rgba(159, 24, 38, 0.4); /* ظل بلون #9f1826 */
}

.add-to-cart-btn span {
    position: relative;
    z-index: 1; /* وضع النص فوق التأثيرات */
    font-weight: bold;
    letter-spacing: 1px;
}

.add-to-cart-btn::after {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 80%);
    transition: all 0.6s ease;
    transform: scale(0);
}

.add-to-cart-btn:hover::after {
    transform: scale(1.5);
    opacity: 0;
}






.products .more-btn {
    margin-top: 2rem;
    text-align: center;
}





.footer .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(27rem, 1fr));
    gap: 1.5rem;
    align-items: flex-start;
}

.footer .box-container .box {
    text-align: center;
    padding: 2rem;
    border: var(--border);
}

.box ion-icon {
    font-size: 4rem;
    color: #800000;
    margin-bottom: 1rem; 
}

.footer .box-container .box h3 {
    margin: 1rem 0;
    font-size: 2rem;
    color: var(--black);
}

.footer .box-container .box a,
.footer .box-container .box p {
    line-height: 2;
    font-size: 1.5rem;
    color: var(--light-color);
    display: block;
}

a{
    text-decoration: none;
    color: #000000;
    font-size: 2rem;
}


.search-container {
    position: relative; 
    margin-left: 23%;
    border-radius: 10px;
    margin-top: 10px;
    width: 50%; 
    display: flex; 
    justify-content: center; 
    
}

.search-container input[type="text"] {
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.5); 
    border: none;
    padding: 8px;
    border-radius: 10px 0 0 10px; 
    width: 200px; 
    flex: 1; 
}

.search-container input[type="text"]:hover {
    border: 1px solid #9e7af2;
    box-shadow: 4px 4px 4px rgba(187, 147, 239, 0.5);
}

.search-container input[type="text"]:hover + button {
    border: 1px solid #9e7af2;
    box-shadow: 4px 4px 4px rgba(187, 147, 239, 0.5);
}

.search-container button {
    border: none;
    padding: 8px;
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.5); 
    color: white;
    font-size: 1.5rem;
    border-radius: 0 10px 10px 0; 
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.search-container button ion-icon {
    vertical-align: middle;
    font-size: 1.5rem;
}

.search-container button:hover{
    border: 1px solid #9e7af2;
    box-shadow: 4px 4px 4px rgba(187, 147, 239, 0.5);


}










.cart-count {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 1rem;

}


.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--white);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader img {
    width: 35rem;
}




.sort-container {
    display: flex;
    align-items: center; /* لمحاذاة العناصر عموديًا في المنتصف */
    justify-content: center; /* لمحاذاة العناصر أفقيًا في المنتصف */
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    
    background-color: #f9f9f9; 
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2), 
                -4px -4px 8px rgba(255, 255, 255, 0.2); /* إضافة تأثير ثلاثي الأبعاد */
    
    /* إضافة تأثير العمق */
    transform: perspective(500px) rotateX(2deg) rotateY(2deg);
    transition: all 0.3s;
}

.sort-container:hover {
    transform: perspective(500px) rotateX(0deg) rotateY(0deg) scale(1.05); /* تأثير التكبير عند التحويم */
}

.sort-container label {
    margin-right: 10px;
    font-weight: bold;
    font-size: 1.4em; 
    color: #333;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); /* إضافة ظل للنص لإبراز التأثير */
}

.sort-container select {
    padding: 8px 12px; 
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff; 
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2), 
                inset -2px -2px 4px rgba(255, 255, 255, 0.2); /* تأثير ثلاثي الأبعاد داخلي */
}

.sort-container select:focus {
    border-color: #007bff; 
    outline: none;
}

.sort-container select option {
    padding: 10px; 
}


@media (max-width: 1023px) {
    header {
        padding: 12px 20px;
    }
    .title {
        font-size: 1.8em;
    }
    section {
        padding: 20px;
    }
    .main-content h2 {
        font-size: 1em;
    }
    .main-content h3 {
        font-size: 1.6em;
    }
    .content {
        flex-direction: column;
        align-items: center;
    }
      .body-shift main,
  .body-shift section,
  .body-shift footer,
  .body-shift .content-wrapper,
  .body-shift header {
    margin-right: 250px;
  }
  
  /* استثناء الكروت */
  .body-shift .card-container,
  .body-shift .container,
  .body-shift .footer .box-container{
    margin-right: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    transform: none !important;
  }
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    .body-shift main,
    .body-shift section,
    .body-shift footer,
    .body-shift .content-wrapper,
    .body-shift header {
        margin-right: 200px;
        width: calc(100% - 200px);

    }
    .cover {
        height: 120px;
        width: 100%;
        margin-left: 0;
    }
    .add-to-cart-btn {
        padding: 10px 20px;
        font-size: 1em;
    }
  
}

@media (max-width: 641px) {
    .container {
        width: 45%;
        height: auto;
    }
    .card-container {
        flex-direction: row;
        align-items: center;
    }
   
}

@media (max-width: 576px) {
    .sidebar {
        width: 180px;
    }
    .body-shift main,
    .body-shift section,
    .body-shift footer,
    .body-shift .content-wrapper,
    .body-shift header {
        transform: translateX(180px);
        width: calc(100% - 180px);
    }
    .body-shift .card-container,
  .body-shift .container,
  .body-shift .footer .box-container{
    margin-right: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    transform: none !important;
  }
}

@media (max-width: 480px) {
    .cover {
        height: 100px;
        width: 100%;
        margin-left: 0;
    }
    .home .slide .image {
        width: 100%;
        height: 30vh;
    }
    .add-to-cart-btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }
   
}

@media (max-width: 300px) {
    .container {
        width: 90%;
        height: auto;
    }
    body {
        font-size: 10px;
    }
}