/* =========================================================
   ROSE BOUTIQUE — COMPLETE CUSTOM CSS
========================================================= */


/* =========================================================
   01. DESIGN TOKENS
========================================================= */

:root {
    /* Brand */
    --brand-primary: #d66f7a;
    --brand-primary-dark: #a84f5b;
    --brand-primary-deep: #8f4653;
    --brand-primary-light: #e3aab1;

    /* Backgrounds */
    --brand-background: #fffafa;
    --brand-background-soft: #f9eeee;
    --brand-background-card: #ffffff;
    --brand-background-image: #fdf7f7;

    /* Text */
    --brand-text: #493639;
    --brand-text-muted: #90777b;
    --brand-text-light: #a9979a;

    /* Borders */
    --brand-border: #efdddf;
    --brand-border-light: #f4e8e9;

    /* Radius */
    --brand-radius-xs: 7px;
    --brand-radius-sm: 10px;
    --brand-radius-md: 14px;
    --brand-radius-lg: 18px;

    /* Shadows */
    --brand-shadow-sm:
        0 5px 18px rgba(91, 52, 59, 0.07);

    --brand-shadow-md:
        0 12px 28px rgba(91, 52, 59, 0.12);

    --brand-shadow-section:
        0 10px 30px rgba(80, 40, 45, 0.10);

    --brand-transition: 0.25s ease;
}


/* =========================================================
   02. GLOBAL BASE
========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--brand-background);
    color: var(--brand-text);
}

body,
button,
input,
textarea,
select {
    color: var(--brand-text);
}

a {
    transition:
        color var(--brand-transition),
        opacity var(--brand-transition);
}

a:hover {
    color: var(--brand-primary);
}


/* =========================================================
   03. GLOBAL BUTTONS
========================================================= */

.s-button-primary,
.s-button-primary-outline {
    border-radius: var(--brand-radius-xs) !important;
}

.s-button-primary:not(.s-button-outline) {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

.s-button-primary:not(.s-button-outline):hover {
    background: var(--brand-primary-dark) !important;
    border-color: var(--brand-primary-dark) !important;
    color: #ffffff !important;
}

.s-button-primary-outline,
.s-button-outline.s-button-primary-outline {
    background: #ffffff !important;
    border-color: var(--brand-primary) !important;
    color: var(--brand-primary) !important;
}

.s-button-primary-outline:hover,
.s-button-outline.s-button-primary-outline:hover {
    background: var(--brand-background-soft) !important;
    border-color: var(--brand-primary-dark) !important;
    color: var(--brand-primary-dark) !important;
}


/* =========================================================
   04. MAIN LINKS — OVERLAP HERO
========================================================= */

section[data-testid="store-home-main-links"] {
    position: relative !important;
    z-index: 20 !important;

    margin-top: -70px !important;
    padding-top: 0 !important;
}

section[data-testid="store-home-main-links"] > .container {
    position: relative;

    padding: 20px 24px !important;

    background: #ffffff !important;
    border: 1px solid var(--brand-border-light) !important;
    border-radius: var(--brand-radius-lg) !important;

    box-shadow: var(--brand-shadow-section) !important;
}

/* إخفاء رأس السلايدر الفارغ */
section[data-testid="store-home-main-links"]
.s-slider-block__title {
    display: none !important;
}

section[data-testid="store-home-main-links"]
.s-slider-container {
    padding: 0 !important;
}

section[data-testid="store-home-main-links"]
.s-slider-swiper-wrapper {
    align-items: stretch !important;
}


/* =========================================================
   05. MAIN LINKS — IMAGE CATEGORIES
========================================================= */

section[data-testid="store-home-main-links"]
.slide--cat-entry {
    width: 100% !important;
    min-height: 118px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;

    gap: 9px !important;
    padding: 3px 7px !important;

    color: var(--brand-text) !important;
    text-align: center !important;

    transition:
        transform var(--brand-transition),
        color var(--brand-transition);
}

/* إخفاء أيقونات القالب */
section[data-testid="store-home-main-links"]
.slide--cat-entry > i {
    display: none !important;
}

/* دائرة الصورة المضافة من JavaScript */
section[data-testid="store-home-main-links"]
.main-link-image {
    position: relative;

    width: 78px !important;
    height: 78px !important;
    flex: 0 0 78px;

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

    background: #fff1f3 !important;
    border: 1px solid #f1dadd !important;
    border-radius: 50% !important;

    overflow: hidden !important;

    transition:
        transform var(--brand-transition),
        border-color var(--brand-transition),
        box-shadow var(--brand-transition);
}

section[data-testid="store-home-main-links"]
.main-link-image img {
    display: block !important;

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

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: center !important;

    border-radius: inherit !important;
}

/* fallback */
section[data-testid="store-home-main-links"]
.main-link-image.has-image-error {
    background:
        radial-gradient(
            circle,
            #f8dfe3 0%,
            #fff2f4 70%
        ) !important;
}

/* النص */
section[data-testid="store-home-main-links"]
.slide--cat-entry h2 {
    max-width: 110px !important;

    margin: 0 !important;

    color: var(--brand-text) !important;

    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;

    text-align: center !important;
}

@media (hover: hover) {
    section[data-testid="store-home-main-links"]
    .slide--cat-entry:hover {
        transform: translateY(-4px) !important;
    }

    section[data-testid="store-home-main-links"]
    .slide--cat-entry:hover
    .main-link-image {
        transform: scale(1.04);

        border-color: var(--brand-primary) !important;

        box-shadow:
            0 8px 18px rgba(214, 111, 122, 0.18) !important;
    }

    section[data-testid="store-home-main-links"]
    .slide--cat-entry:hover h2 {
        color: var(--brand-primary) !important;
    }
}


/* =========================================================
   06. GLOBAL PRODUCT SECTION TITLES
========================================================= */

salla-products-slider {
    display: block;
}

salla-products-slider .s-slider-block__title {
    position: relative;

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

    min-height: 70px;
    margin-bottom: 22px !important;

    text-align: center;
}

salla-products-slider .s-slider-block__title-right {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

salla-products-slider
.s-slider-block__title-right h2 {
    position: relative;

    margin: 0 !important;
    padding-bottom: 31px;

    color: var(--brand-text) !important;

    font-size: 27px !important;
    font-weight: 600 !important;
    line-height: 1.4;

    text-align: center;
}

/* الخط أسفل العنوان */
salla-products-slider
.s-slider-block__title-right
h2::before {
    content: "";

    position: absolute;
    right: 50%;
    bottom: 15px;

    width: 38px;
    height: 1px;

    background: var(--brand-primary);

    transform: translateX(50%);
}

/* الزخرفة */
salla-products-slider
.s-slider-block__title-right
h2::after {
    content: "❀";

    position: absolute;
    right: 50%;
    bottom: -3px;

    padding: 0 7px;

    background: var(--brand-background);
    color: var(--brand-primary);

    font-size: 20px;
    line-height: 1;

    transform: translateX(50%);
}

/* إخفاء عرض الكل والأسهم من الأعلى */
salla-products-slider
.s-slider-block__title-left {
    display: none !important;
}

salla-products-slider
.s-slider-container {
    padding-top: 5px;
    padding-bottom: 15px;
}

salla-products-slider
.s-slider-swiper-wrapper {
    align-items: stretch;
}

.s-products-slider-card {
    height: auto !important;
}

.s-products-slider-card
custom-salla-product-card {
    display: block;
    height: 100%;
}


/* =========================================================
   07. GLOBAL PRODUCT CARD
========================================================= */

.s-product-card-entry {
    height: 100% !important;

    display: flex !important;
    flex-direction: column;

    background: var(--brand-background-card) !important;
    border: 1px solid var(--brand-border) !important;
    border-radius: var(--brand-radius-md) !important;

    overflow: hidden !important;

    box-shadow: var(--brand-shadow-sm) !important;

    transition:
        transform var(--brand-transition),
        box-shadow var(--brand-transition);
}

@media (hover: hover) {
    .s-product-card-entry:hover {
        transform: translateY(-5px);

        box-shadow: var(--brand-shadow-md) !important;
    }
}


/* =========================================================
   08. PRODUCT IMAGE
========================================================= */

.s-product-card-entry
.s-product-card-image {
    position: relative;

    width: 100%;
    aspect-ratio: 1 / 0.88;

    background: var(--brand-background-image) !important;

    overflow: hidden;
}

.s-product-card-entry
.s-product-card-image > a {
    display: block;

    width: 100%;
    height: 100%;
}

.s-product-card-entry
.s-product-card-image img {
    display: block;

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

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: center !important;

    transition: transform 0.35s ease;
}

@media (hover: hover) {
    .s-product-card-entry:hover
    .s-product-card-image img {
        transform: scale(1.035);
    }
}


/* =========================================================
   09. PRODUCT WISHLIST
========================================================= */

.s-product-card-entry
.s-product-card-wishlist-btn {
    position: absolute !important;

    top: 10px !important;
    left: 10px !important;
    right: auto !important;

    z-index: 5;
}

.s-product-card-entry
.s-product-card-wishlist-btn
.s-button-element {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;

    padding: 0 !important;

    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid #ead5d8 !important;
    border-radius: 50% !important;

    color: var(--brand-primary) !important;

    box-shadow: none !important;
}

.s-product-card-entry
.s-product-card-wishlist-btn
.s-button-element:hover {
    background: var(--brand-background-soft) !important;
    border-color: var(--brand-primary) !important;
    color: var(--brand-primary-dark) !important;
}


/* =========================================================
   10. PRODUCT DISCOUNT BADGE
========================================================= */

.s-product-card-entry
.s-product-card-promotion-title {
    position: absolute;

    top: 10px !important;
    right: 10px !important;
    left: auto !important;

    padding: 4px 9px !important;

    background: var(--brand-primary) !important;
    color: #ffffff !important;

    border-radius: 20px !important;

    font-size: 11px !important;
    font-weight: 600;
    line-height: 1.4;
}


/* =========================================================
   11. PRODUCT CONTENT
========================================================= */

.s-product-card-entry
.s-product-card-content {
    flex: 1;

    display: flex;
    flex-direction: column;

    padding: 10px 12px 11px !important;

    text-align: center;
}

.s-product-card-entry
.s-product-card-content-main {
    flex: initial;
}


/* =========================================================
   12. PRODUCT TITLE
========================================================= */

.s-product-card-entry
.s-product-card-content-title {
    min-height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 0 4px !important;

    text-align: center !important;
}

.s-product-card-entry
.s-product-card-content-title a {
    display: -webkit-box;

    overflow: hidden;

    color: var(--brand-text) !important;

    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.45;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.s-product-card-entry
.s-product-card-content-title a:hover {
    color: var(--brand-primary) !important;
}


/* =========================================================
   13. PRODUCT PRICE
========================================================= */

.s-product-card-entry
.s-product-card-content-sub {
    min-height: 25px;

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

    text-align: center !important;
}

.s-product-card-entry
.s-product-card-price {
    margin: 0 !important;

    color: var(--brand-primary-deep) !important;

    font-size: 14px !important;
    font-weight: 700 !important;
}

.s-product-card-entry
.s-product-card-sale-price {
    width: 100%;

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

    gap: 7px;
}

.s-product-card-entry
.s-product-card-sale-price h4 {
    margin: 0;

    color: var(--brand-primary-deep) !important;

    font-size: 14px !important;
    font-weight: 700 !important;
}

.s-product-card-entry
.s-product-card-sale-price span {
    color: var(--brand-text-light) !important;

    font-size: 12px !important;
}


/* =========================================================
   14. ADD TO CART BUTTON
========================================================= */

.s-product-card-entry
.s-product-card-content-footer {
    width: 100%;

    margin-top: auto !important;
    padding-top: 8px;
}

.s-product-card-entry
.s-product-card-content-footer
.s-button-element {
    width: 100%;
    min-height: 35px !important;

    padding: 6px 10px !important;

    background: var(--brand-primary) !important;
    border: 1px solid var(--brand-primary) !important;
    border-radius: var(--brand-radius-xs) !important;

    color: #ffffff !important;

    font-size: 12px !important;
    font-weight: 500 !important;

    box-shadow: none !important;

    transition:
        background-color var(--brand-transition),
        border-color var(--brand-transition);
}

.s-product-card-entry
.s-product-card-content-footer
.s-button-element:hover {
    background: var(--brand-primary-dark) !important;
    border-color: var(--brand-primary-dark) !important;
    color: #ffffff !important;
}

.s-product-card-entry
.s-product-card-content-footer
.s-button-element i {
    color: inherit !important;
}


/* =========================================================
   15. FEATURES SECTION
========================================================= */

section[data-testid="store-home-features"] {
    margin-top: 36px !important;
    margin-bottom: 36px !important;
}

section[data-testid="store-home-features"]
> .grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 !important;

    width: 100% !important;

    padding: 18px 20px !important;

    background: #fff7f8 !important;
    border: 1px solid #f0e0e2 !important;
    border-radius: 16px !important;

    box-shadow:
        0 8px 22px rgba(91, 52, 59, 0.06) !important;
}

section[data-testid="store-home-features"]
.s-block--features__item {
    position: relative !important;

    display: grid !important;
    grid-template-columns: 60px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;

    column-gap: 14px !important;
    row-gap: 2px !important;

    align-items: center !important;

    min-height: 78px !important;

    padding: 4px 28px !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    text-align: right !important;
}

/* الفاصل بين العناصر */
section[data-testid="store-home-features"]
.s-block--features__item:not(:last-child)::after {
    content: "";

    position: absolute !important;

    top: 10px !important;
    bottom: 10px !important;
    left: 0 !important;

    width: 1px !important;

    background: #ead9dc !important;
}

/* صندوق الأيقونة */
section[data-testid="store-home-features"]
.feature-icon {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;

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

    width: 60px !important;
    height: 60px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    color: var(--brand-primary) !important;
}

/* الأيقونة */
section[data-testid="store-home-features"]
.feature-icon i {
    margin: 0 !important;

    color: var(--brand-primary) !important;

    font-size: 40px !important;
    line-height: 1 !important;
}

/* العنوان */
section[data-testid="store-home-features"]
.s-block--features__item h2 {
    grid-column: 2 !important;
    grid-row: 1 !important;

    align-self: end !important;

    margin: 0 !important;
    padding: 0 !important;

    color: var(--brand-text) !important;

    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;

    text-align: right !important;
}

/* الوصف */
section[data-testid="store-home-features"]
.s-block--features__item p {
    grid-column: 2 !important;
    grid-row: 2 !important;

    align-self: start !important;

    margin: 0 !important;
    padding: 0 !important;

    color: var(--brand-text-muted) !important;

    font-size: 11px !important;
    line-height: 1.55 !important;

    text-align: right !important;
}

@media (hover: hover) {
    section[data-testid="store-home-features"]
    .s-block--features__item {
        transition: transform 0.2s ease;
    }

    section[data-testid="store-home-features"]
    .s-block--features__item:hover {
        transform: translateY(-2px);
    }
}


/* =========================================================
   16. LOADING SCREEN
========================================================= */

html.is-store-loading,
html.is-store-loading body {
    overflow: hidden !important;
}

#loading-screen {
    position: fixed;
    inset: 0;

    z-index: 2147483647;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at center,
            #ffffff 0%,
            #fff8f9 60%,
            #fbecee 100%
        );

    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

#loading-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-screen__content {
    display: flex;
    flex-direction: column;
    align-items: center;

    transform: translateY(-10px);
}

.loading-logo {
    display: block;

    width: 170px !important;
    max-width: 55vw;
    height: auto !important;

    margin-bottom: 20px;

    object-fit: contain;

    animation:
        loadingLogoPulse 1.7s ease-in-out infinite;
}

.loading-flower {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;
}

.loading-flower span {
    display: block;

    width: 9px;
    height: 9px;

    background: var(--brand-primary);
    border-radius: 50%;

    animation:
        loadingDot 1.1s ease-in-out infinite;
}

.loading-flower span:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-flower span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes loadingLogoPulse {
    0%,
    100% {
        opacity: 0.85;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

@keyframes loadingDot {
    0%,
    100% {
        opacity: 0.35;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-7px);
    }
}


/* =========================================================
   17. TABLET
========================================================= */

@media (max-width: 991px) {
    salla-products-slider
    .s-slider-block__title {
        min-height: 68px;
        margin-bottom: 20px !important;
    }

    salla-products-slider
    .s-slider-block__title-right h2 {
        font-size: 24px !important;
    }

    section[data-testid="store-home-features"]
    > .grid {
        padding: 14px 10px !important;
    }

    section[data-testid="store-home-features"]
    .s-block--features__item {
        grid-template-columns: 48px minmax(0, 1fr) !important;

        padding: 4px 14px !important;
    }

    section[data-testid="store-home-features"]
    .feature-icon {
        width: 48px !important;
        height: 48px !important;
    }

    section[data-testid="store-home-features"]
    .feature-icon i {
        font-size: 32px !important;
    }

    section[data-testid="store-home-features"]
    .s-block--features__item h2 {
        font-size: 13px !important;
    }

    section[data-testid="store-home-features"]
    .s-block--features__item p {
        font-size: 10px !important;
    }
}


/* =========================================================
   18. MOBILE
========================================================= */

@media (max-width: 767px) {
    /* Main links */
    section[data-testid="store-home-main-links"] {
        margin-top: -35px !important;

        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    section[data-testid="store-home-main-links"]
    > .container {
        padding: 14px 7px !important;

        border-radius: 14px !important;
    }

    section[data-testid="store-home-main-links"]
    .slide--cat-entry {
        min-height: 98px !important;

        gap: 6px !important;
        padding: 0 3px !important;
    }

    section[data-testid="store-home-main-links"]
    .main-link-image {
        width: 61px !important;
        height: 61px !important;

        flex-basis: 61px;
    }

    section[data-testid="store-home-main-links"]
    .slide--cat-entry h2 {
        max-width: 80px !important;

        font-size: 11px !important;
    }

    /* Product section titles */
    salla-products-slider
    .s-slider-block__title {
        min-height: 65px;
        margin-bottom: 16px !important;
    }

    salla-products-slider
    .s-slider-block__title-right h2 {
        padding-bottom: 27px;

        font-size: 21px !important;
    }

    /* Product card */
    .s-product-card-entry {
        border-radius: 11px !important;
    }

    .s-product-card-entry
    .s-product-card-image {
        aspect-ratio: 1 / 0.92;
    }

    .s-product-card-entry
    .s-product-card-content {
        padding: 8px 9px 9px !important;
    }

    .s-product-card-entry
    .s-product-card-content-title {
        min-height: 34px;

        margin-bottom: 4px !important;
    }

    .s-product-card-entry
    .s-product-card-content-title a {
        font-size: 12px !important;
    }

    .s-product-card-entry
    .s-product-card-price,
    .s-product-card-entry
    .s-product-card-sale-price h4 {
        font-size: 12px !important;
    }

    .s-product-card-entry
    .s-product-card-sale-price span {
        font-size: 10px !important;
    }

    .s-product-card-entry
    .s-product-card-content-footer {
        padding-top: 6px;
    }

    .s-product-card-entry
    .s-product-card-content-footer
    .s-button-element {
        min-height: 34px !important;

        padding: 6px 5px !important;

        font-size: 10px !important;
    }

    .s-product-card-entry
    .s-product-card-wishlist-btn {
        top: 7px !important;
        left: 7px !important;
    }

    .s-product-card-entry
    .s-product-card-wishlist-btn
    .s-button-element {
        width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
    }

    .s-product-card-entry
    .s-product-card-promotion-title {
        top: 7px !important;
        right: 7px !important;

        font-size: 10px !important;
    }

    /* Features */
    section[data-testid="store-home-features"] {
        padding-right: 12px !important;
        padding-left: 12px !important;
    }

    section[data-testid="store-home-features"]
    > .grid {
        grid-template-columns: 1fr !important;

        padding: 8px 14px !important;

        border-radius: 14px !important;
    }

    section[data-testid="store-home-features"]
    .s-block--features__item {
        grid-template-columns: 52px minmax(0, 1fr) !important;

        min-height: 75px !important;

        padding: 12px 4px !important;
    }

    section[data-testid="store-home-features"]
    .s-block--features__item:not(:last-child)::after {
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        width: auto !important;
        height: 1px !important;
    }

    section[data-testid="store-home-features"]
    .feature-icon {
        width: 52px !important;
        height: 52px !important;
    }

    section[data-testid="store-home-features"]
    .feature-icon i {
        font-size: 34px !important;
    }

    section[data-testid="store-home-features"]
    .s-block--features__item h2 {
        font-size: 14px !important;
    }

    section[data-testid="store-home-features"]
    .s-block--features__item p {
        font-size: 11px !important;
    }

    /* Loading */
    .loading-logo {
        width: 135px !important;
    }
}


/* =========================================================
   19. ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }

    .loading-logo,
    .loading-flower span {
        animation: none !important;
    }
}