/* Add custom CSS styles below */ 
/* Add to Cart button */
.product-form .s-button-primary,
.product-form .s-button-element {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}


/* Product price under the product name */
[data-testid="store-product-price"] p,
[data-testid="store-product-price"] span {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* Total price next to "الإجمالي:" */
.price-wrapper .total-price,
.price-wrapper .total-price * {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}


/* PRODUCT PAGE — align entire size section to the right */

salla-product-options,
salla-product-options > div,
.product-options-wrapper,
.product-options-wrapper > div {
    text-align: right !important;
    direction: rtl !important;
}

/* Size title */
salla-product-options label,
salla-product-options .label,
salla-product-options h3,
salla-product-options h4 {
    text-align: right !important;
}

/* Size boxes container */
salla-product-options .flex,
salla-product-options ul,
salla-product-options [class*="option"] {
    justify-content: flex-start !important;
    text-align: right !important;
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* Remove rounded corners from size options */
salla-product-options button,
salla-product-options label,
salla-product-options [class*="option"] {
    border-radius: 0 !important;
}


img,
picture,
picture *,
salla-slider,
salla-slider *,
[class*="image"],
[class*="image"] *,
[class*="photo"],
[class*="photo"] *,
[class*="thumbnail"],
[class*="thumbnail"] * {
    border-radius: 0 !important;
}

/* Remove rounded corners from images */
img,
.image-container,
[class*="image"],
[class*="thumbnail"] {
    border-radius: 0 !important;
}


.container.mb-3:has(
    salla-products-slider[data-testid="store-product-related"]
) {
    display: none !important;
}


footer {
    transform: translateY(-22px) !important;
    margin-bottom: -20px !important;
}


/* Hide "لا يوجد المزيد لعرضه" */
.infinite-scroll-status,
.infinite-scroll-last,
.pagination-end {
    display: none !important;
}



/* Footer navigation links */
footer nav a,
footer [class*="links"] a,
footer [class*="menu"] a {
    margin: 0 !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    line-height: 1 !important;
}


/* ========================================
   FOOTER — FINAL LAYOUT
   ======================================== */

/* Hide footer titles */
footer h3,
footer h4,
footer [class*="title"] {
    display: none !important;
}

/* Hide contact section completely */
footer .footer-list:last-of-type {
    display: none !important;
}


/* ========================================
   DESKTOP
   Logo LEFT / Links RIGHT
   ======================================== */

@media (min-width: 768px) {

    footer .container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    /* LOGO — FAR LEFT */
    footer .store-footer__inner {
        order: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
        align-items: flex-start !important;
    }

    footer .store-footer__inner img,
    footer .store-footer__inner .logo {
        display: block !important;
        margin: 0 !important;
    }

    /* LINKS — FAR RIGHT */
    footer .footer-list:first-of-type {
        order: 2 !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: right !important;
        align-items: flex-end !important;
    }

    footer .footer-list:first-of-type * {
        text-align: right !important;
    }
}


/* ========================================
   MOBILE
   Everything CENTERED
   ======================================== */

@media (max-width: 767px) {

    footer .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 25px !important;
    }

    /* LOGO */
    footer .store-footer__inner {
        order: 1 !important;
        width: 100% !important;
        text-align: center !important;
        align-items: center !important;
        margin: 0 auto !important;
    }

    footer .store-footer__inner img,
    footer .store-footer__inner .logo {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* LINKS */
    footer .footer-list:first-of-type {
        order: 2 !important;
        width: 100% !important;
        text-align: center !important;
        align-items: center !important;
        margin: 0 auto !important;
    }

    footer .footer-list:first-of-type * {
        text-align: center !important;
        justify-content: center !important;
    }
}

/* FOOTER — TOP & BOTTOM SPACING */

footer .container {
    padding-top: 30px !important;
    padding-bottom: 80px !important;
}


/* MOBILE ONLY — CENTER FOOTER LINKS */

@media (max-width: 767px) {

    footer .s-menu-footer-list {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        text-align: center !important;
    }

    footer .s-menu-footer-item {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* SIZE CHART LINK */
.ascend-size-chart-link {
    display: block;
    width: fit-content;
    margin-top: 14px;
    margin-right: 0;
    font-size: 13px;
    color: #888;
    text-decoration: underline;
    cursor: pointer;
}

/* POPUP */
.ascend-size-chart-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.ascend-size-chart-popup.active {
    display: flex;
}

.ascend-size-chart-popup img {
    max-width: 700px;
    max-height: 85vh;
    width: 80%;
    height: auto;
    object-fit: contain;
    border-radius: 0 !important;
}

.ascend-size-chart-link {
    display: block;
    width: fit-content;

    margin-top: -40px !important;
    margin-bottom: 70px !important;
    margin-right: 0;
    font-size: 13px;
    color: #888;
    text-decoration: underline;
    cursor: pointer;
}

/* HOMEPAGE MARQUEE — STATIC + CENTERED */

/* Stop movement */
.r-marquee,
.r-marquee *,
.r-marquee__slide,
.r-marquee__text {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Keep only the first text */
.r-marquee__slide:not(:first-child) {
    display: none !important;
}

/* Center the remaining slide */
.r-marquee__slide:first-child {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

/* Center the text */
.r-marquee__text {
    width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
  padding-right: 9vh;
}

/* Remove generated/repeated text */
.r-marquee__text::before,
.r-marquee__text::after {
    display: none !important;
    content: none !important;
}


.ascend-full-description {
    direction: rtl;
    text-align: right;
    white-space: normal !important;
    overflow: visible !important;
    max-height: none !important;
}

.ascend-full-description p {
    display: block !important;
    margin: 0 0 6px !important;
    line-height: 1.2 !important;
}

.ascend-full-description ul {
    margin: 10px 0 0 !important;
    padding-right: 20px !important;
    list-style: disc !important;
}

.ascend-full-description li {
    display: list-item !important;
    margin-bottom: 4px !important;
    line-height: 1.2 !important;
}

.ascend-description-space {
    height: 15px;
}


/* ENGLISH PRODUCT DESCRIPTION */

.ascend-full-description-en {
    direction: ltr !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: visible !important;
    max-height: none !important;
}

.ascend-full-description-en p {
    display: block !important;
    margin: 0 0 6px !important;
    line-height: 1.2 !important;
    text-align: left !important;
}

.ascend-full-description-en ul {
    margin: 8px 0 0 !important;
    padding-left: 20px !important;
    padding-right: 0 !important;
    list-style: disc !important;
    text-align: left !important;
}

.ascend-full-description-en li {
    display: list-item !important;
    margin-bottom: 4px !important;
    line-height: 1.2 !important;
    text-align: left !important;
}


/* ENGLISH VERSION — ALIGN SIZE OPTIONS LEFT */

html[dir="ltr"] salla-product-options,
html[dir="ltr"] salla-product-options > div,
html[dir="ltr"] .product-options-wrapper,
html[dir="ltr"] .product-options-wrapper > div {
    direction: ltr !important;
    text-align: left !important;
}

/* Size title */
html[dir="ltr"] salla-product-options label,
html[dir="ltr"] salla-product-options .label,
html[dir="ltr"] salla-product-options h3,
html[dir="ltr"] salla-product-options h4 {
    text-align: left !important;
}

/* Size boxes */
html[dir="ltr"] salla-product-options .flex,
html[dir="ltr"] salla-product-options ul,
html[dir="ltr"] salla-product-options [class*="option"] {
    justify-content: flex-start !important;
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

#main-content *,
#main-content *::before,
#main-content *::after {
    border-radius: 0 !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    mask: none !important;
    -webkit-mask: none !important;
}


salla-split-content-overlap-kaskq8 .grid-layout {
    display: block !important;
}


/* CART — CHECKOUT BUTTON */

salla-button[width="wide"],
.cart-summary salla-button,
.cart-summary button[type="submit"],
.cart-summary .s-button-primary,
.cart-summary .btn--checkout,
.cart-summary a[href*="checkout"] {
    background: #000 !important;
    background-color: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

salla-button[width="wide"] *,
.cart-summary salla-button *,
.cart-summary button[type="submit"] *,
.cart-summary .s-button-primary *,
.cart-summary .btn--checkout *,
.cart-summary a[href*="checkout"] * {
    color: #fff !important;
}


/* CART — CONTINUE SHOPPING */

.cart-summary a:not([href*="checkout"]),
.cart-summary .continue-shopping,
.cart-summary [class*="continue"] {
    color: #000 !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
    background: transparent !important;
}

.cart-summary a:not([href*="checkout"]) * {
    color: #000 !important;
    text-decoration: underline !important;
}

/* CART — SELECTED SIZE */

/* Selected size box */
salla-product-options label:has(input[type="radio"]:checked) {
    background-color: #000000 !important;
    border-color: #000000 !important;
}

/* Selected size text */
salla-product-options label:has(input[type="radio"]:checked)
.s-product-options-grid-mode-span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Keep unselected sizes white */
salla-product-options label:not(:has(input[type="radio"]:checked)) {
    background-color: #ffffff !important;
}

salla-product-options label:not(:has(input[type="radio"]:checked))
.s-product-options-grid-mode-span {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* =========================================
   MOBILE CART — FINAL FIX
   ========================================= */

@media (max-width: 767px) {

    /* -----------------------------------------
       1. CHECKOUT BUTTON — إتمام الطلب
       ----------------------------------------- */

    salla-button button.s-button-element.s-button-primary {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;

        width: 100% !important;
        height: 54px !important;
        min-height: 54px !important;

        align-items: center !important;
        justify-content: center !important;

        background: #000 !important;
        background-color: #000 !important;
        border: 1px solid #000 !important;
        border-radius: 0 !important;

        color: #fff !important;
    }

    /* Checkout text */
    salla-button button.s-button-element.s-button-primary .s-button-text {
        color: #fff !important;
        -webkit-text-fill-color: #fff !important;
        opacity: 1 !important;
        visibility: visible !important;
    }


    /* -----------------------------------------
       2. CONTINUE SHOPPING — متابعة التسوق
       ----------------------------------------- */

    .cart-summary {
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;

        padding: 0 !important;
        margin: 20px 0 !important;

        background: transparent !important;
    }

    .cart-summary__continue {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        height: 54px !important;
        min-height: 54px !important;

        padding: 0 20px !important;
        margin: 0 !important;

        border: 1px solid #000 !important;
        border-radius: 0 !important;

        background: #fff !important;
        color: #000 !important;

        text-decoration: underline !important;
        text-underline-offset: 3px !important;
    }
}

@media (max-width: 768px) {

    section:has(.hero-bg),
    section:has(.hero-bg) > *,
    section:has(.hero-bg) > * > * {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .hero-bg {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
}


/* ABOUT PAGE — show full image on mobile */
@media (max-width: 768px) {

    .image-column {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    .image-column .image-wrapper {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        overflow: visible !important;
    }

    .image-column .image-wrapper img {
        display: block !important;

        width: 100% !important;
        height: auto !important;

        min-height: 0 !important;
        max-height: none !important;

        object-fit: contain !important;
        object-position: center center !important;
    }
}

button.s-fast-checkout-button.outline {
    display: none !important;
    visibility: hidden !important;
}