/* === عام === */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #2cb9b7;
    color: #000;
}

html {
    scroll-padding-top: 170px;
    scroll-behavior: smooth;
}

header {
    background-color: transparent;
    text-align: center;
    padding: 20px;
}

header h1 {
    margin: 0;
    font-size: 28px;
    color: #00796b;
}

header img {
    height: 130px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}


/* === الفئات === */

.categories {
    background-color: #2cb9b7;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.category-slider {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 15px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
}

.category-slider:active {
    cursor: grabbing;
}

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

.category {
    flex: 0 0 auto;
    width: 100px;
    height: auto;
    background-color: transparent;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
}

.category img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    pointer-events: none;
    display: block;
    background-color: #2a2a2a;
    transition: transform 0.3s ease;
}

.category span {
    margin-top: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    user-select: none;
    display: block;
    text-align: center;
}


/* === المنتجات === */

#products-container {
    padding: 20px;
}

.product-category {
    margin-bottom: 40px;
}

.product-category h2 {
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 15px;
    color: #000;
}

.product-columns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.product-column {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-card {
    display: flex;
    background: #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.product-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.product-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-info h3,
.product-info span,
.product-info p {
    color: #f0f0f0;
}

.product-info h3 {
    margin: 0;
    font-size: 18px;
}

.product-info p {
    font-size: 14px;
    margin: 5px 0;
}

.product-info span {
    font-weight: bold;
}

/* ** الكود الجديد: أنماط زر إضافة للطلب داخل بطاقة المنتج ** */
.product-info .add-to-order {
    background-color: #00796b;
    color: white;
    border: none;
    padding: 5px 10px;
    margin-top: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    max-width: 120px; /* لتحديد عرض الزر */
}

.product-info .add-to-order:hover {
    background-color: #004d40;
}
/* ** نهاية الكود الجديد ** */


/* === استجابة للموبايل === */

@media (max-width: 768px) {
    .category {
        flex: 0 0 auto;
        width: 100px;
        height: auto;
        background-color: transparent;
        text-align: center;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        user-select: none;
    }

    .category img {
        width: 100px;
        height: 100px;
        object-fit: cover;
        border-radius: 10px;
        pointer-events: none;
        display: block;
        background-color: #2a2a2a;
        transition: transform 0.3s ease;
    }
}

.category span {
    margin-top: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    user-select: none;
    display: block;
    text-align: center;
}


/* === زر الرجوع للأعلى === */

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background-color: #00796b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    display: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

#backToTop:hover {
    background-color: #004d40;
}

/* ** الكود الجديد: أنماط زر إرسال الطلب العائم ** */
#sendOrder {
    position: fixed;
    bottom: 30px;
    left: 30px; /* في الجهة المقابلة لزر BackToTop */
    z-index: 999;
    background-color: #25D366; /* لون الواتساب */
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    display: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.2s;
}

#sendOrder:hover {
    background-color: #1DA851;
    transform: scale(1.05);
}
/* ** نهاية الكود الجديد ** */


/* === اللودر === */

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #eee;
    border-top: 6px solid #00796b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* === انستغرام === */

.insta-icon {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 2000;
}

.insta-icon img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.insta-icon img:hover {
    transform: scale(1.7);
}


/* === الفوتر === */

.site-footer {
    background-color: #00796b;
    color: white;
    text-align: center;
    padding: 15px 10px;
    font-size: 14px;
    margin-top: 30px;
}

.site-footer a.whatsapp-link {
    display: inline-block;
    color: #ffffff;
    margin-top: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.site-footer a.whatsapp-link:hover {
    color: #d0fefb;
}


/* === Map iframe === */

.iframe-container {
    position: relative;
    width: 88%;
    padding-top: 56.25%;
    margin: 10px;
    /* This sets a 16:9 aspect ratio (9 / 16 = 0.5625) */
    /* Adjust padding-top for different aspect ratios:
       - 4:3 aspect ratio: padding-top: 75%; (3 / 4 = 0.75)
       - 1:1 aspect ratio (square): padding-top: 100%;
    */
    overflow: hidden;
    /* Hides any content that might overflow the container */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* for mobile view ################## */
@media only screen and (max-width:767px) {
    .iframe-container {
        position: relative;
        width: 97%;
        height: 400px;
        padding-top: 56.25%;
        margin: 10px;
    }


}

/* === Location Pin === */

.location-icon {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 2000;
}

.location-icon img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.location-icon img:hover {
    transform: scale(1.7);
}

div.branches {
    display: flex;
    justify-content: space-evenly;
    padding: 20px;

}

.branch {
    padding: 12px 20px;
    margin: 12px 20px;
    border-radius: 10px;
    color: #fdfdfd;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    background: #010605;
}

.branch:hover{
    transform: scale(1.3);
    background: #ce5a5a;
}