/* ==================================================
   OVER HUG — MOBILE LABEL SYSTEM
   ================================================== */

@keyframes overhug-mobile-label-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@media (max-width: 767px) {

  /* =========================================
     1 — التصنيفات الرئيسية
     ========================================= */

  .overhug-categories .square-links__item-title {
    width: fit-content !important;
    min-height: 34px !important;

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

    margin: 8px auto 0 !important;
    padding: 7px 14px !important;

    background: #F0EDE4 !important;

    border: 1px solid rgba(132, 87, 67, .35) !important;
    border-radius: 999px !important;

    color: #392820 !important;

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

    box-shadow:
      0 4px 12px rgba(132, 87, 67, .08) !important;

    animation:
      overhug-mobile-label-in .45s ease both;

    transition:
      transform .18s ease,
      background .18s ease,
      color .18s ease !important;
  }


  .overhug-categories
  .square-links__item-title::after {
    display: none !important;
  }


  .overhug-categories
  [data-selia="home-square-links-item"]:active
  .square-links__item-title {
    transform: scale(.96) !important;

    background: #845743 !important;
    color: #F0EDE4 !important;
  }



  /* =========================================
     2 — اختر قهوتك حسب
     المنشأ / المعالجة
     ========================================= */

  .overhug-coffee-by
  .rectangular-links__item-title {
    width: fit-content !important;
    min-height: 35px !important;

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

    margin: 8px auto 0 !important;
    padding: 7px 17px !important;

    background: #F0EDE4 !important;

    border: 1px solid rgba(132, 87, 67, .35) !important;
    border-radius: 999px !important;

    color: #392820 !important;

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

    box-shadow:
      0 4px 12px rgba(132, 87, 67, .08) !important;

    animation:
      overhug-mobile-label-in .5s ease both;

    transition:
      transform .18s ease,
      background .18s ease,
      color .18s ease !important;
  }


  .overhug-coffee-by
  .rectangular-links__item-title::after {
    display: none !important;
  }


  .overhug-coffee-by
  .rectangular-list-item:active
  .rectangular-links__item-title {
    transform: scale(.96) !important;

    background: #845743 !important;
    color: #F0EDE4 !important;
  }



  /* =========================================
     3 — بلد المنشأ / المعالجة
     السعودية، إثيوبيا، مجففة...
     ========================================= */

  #overhug-subcategories .oh-category-name {
    width: calc(100% - 12px) !important;
    min-height: 38px !important;

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

    margin: 6px auto 7px !important;
    padding: 7px 8px !important;

    background: #F0EDE4 !important;

    border: 1px solid rgba(132, 87, 67, .30) !important;
    border-radius: 11px !important;

    color: #392820 !important;

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

    box-shadow:
      0 3px 10px rgba(132, 87, 67, .07) !important;

    animation:
      overhug-mobile-label-in .45s ease both;
  }


  #overhug-subcategories
  .oh-category-name::after {
    display: none !important;
  }


  #overhug-subcategories
  .oh-category-card:active
  .oh-category-name {
    transform: scale(.97) !important;

    background: #845743 !important;
    color: #F0EDE4 !important;
  }



  /* =========================================
     4 — معلومات المنتجات في الصفحة الرئيسية
     ========================================= */

  body.index .product-card__content {
    margin-top: 7px !important;
    padding: 10px 10px 9px !important;

    background: rgba(240, 237, 228, .82) !important;

    border: 1px solid rgba(132, 87, 67, .20) !important;
    border-radius: 12px !important;

    box-shadow:
      0 4px 12px rgba(132, 87, 67, .06) !important;

    animation:
      overhug-mobile-label-in .5s ease both;

    transition:
      transform .18s ease,
      background .18s ease !important;
  }


  body.index
  .product-card:active
  .product-card__content {
    transform: scale(.985) !important;

    background: #F0EDE4 !important;
  }

}
/* =========================================
   OVER HUG — DESKTOP HERO NAVIGATION
   ========================================= */

@media (min-width: 1024px) {

    /* صف الفئات فقط */
    body.index.trans_header .main-menu-row {
        height: 46px !important;
        min-height: 46px !important;
        margin: 0 !important;
        padding: 0 !important;

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

        background: rgba(240, 237, 228, 0.22) !important;

        -webkit-backdrop-filter: blur(7px) saturate(110%);
        backdrop-filter: blur(7px) saturate(110%);

        border-top: 1px solid rgba(132, 87, 67, 0.07) !important;
        border-bottom: 1px solid rgba(132, 87, 67, 0.10) !important;

        box-shadow: none !important;
    }

    /* القائمة الموجودة داخل الصف */
    body.index.trans_header .main-menu-row .main-menu {
        height: 46px !important;
        width: auto !important;

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

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

        gap: 26px !important;

        background: transparent !important;
        border: 0 !important;
    }

    /* كل فئة */
    body.index.trans_header .main-menu-row .main-menu__desktop-item {
        height: 46px !important;
        margin: 0 !important;
        padding: 0 !important;

        display: flex !important;
        align-items: center !important;
    }

    /* النص */
    body.index.trans_header .main-menu-row .main-menu__desktop-item > a,
    body.index.trans_header .main-menu-row .main-menu__parent-label {
        height: 46px !important;
        margin: 0 !important;
        padding: 0 2px !important;

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

        color: #392820 !important;

        font-size: 15px !important;
        font-weight: 600 !important;
        line-height: 1 !important;

        opacity: 0.96;

        background: transparent !important;
        text-shadow: none !important;

        transition:
            color 0.2s ease,
            opacity 0.2s ease !important;
    }

    /* Hover هادئ من لون الهوية */
    body.index.trans_header .main-menu-row .main-menu__desktop-item > a:hover,
    body.index.trans_header .main-menu-row .main-menu__parent-label:hover {
        color: #845743 !important;
        opacity: 1 !important;
    }

/* OVER HUG — Exact Animated Image Border */

@property --overhug-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.overhug-categories .square-links__image-wrap {
    position: relative !important;
    isolation: isolate;
}

/* الليزر على حدود الصورة نفسها */
.overhug-categories .square-links__image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;

    border-radius: inherit;
    padding: 2px;

    background: conic-gradient(
        from var(--overhug-angle),
        transparent 0deg,
        transparent 245deg,
        #845743 285deg,
        #F0EDE4 315deg,
        #845743 340deg,
        transparent 360deg
    );

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: 0;
    pointer-events: none;
}

/* يظهر فقط عند المرور على نفس البطاقة */
.overhug-categories .group:hover .square-links__image-wrap::after {
    opacity: 1;
    animation: overhug-laser-border 1.5s linear infinite;
}

@keyframes overhug-laser-border {
    to {
        --overhug-angle: 360deg;
    }
}

  /* OVER HUG — Category Titles */

.overhug-categories .square-links__item-title {
    position: relative !important;
    width: fit-content !important;

    margin: 10px auto 0 !important;
    padding: 0 0 6px !important;

    color: #392820 !important;

    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;

    transition:
        color .25s ease,
        transform .25s ease !important;
}


/* الخط أسفل الاسم */
.overhug-categories .square-links__item-title::after {
    content: "";
    position: absolute;

    left: 50%;
    bottom: 0;

    width: 0;
    height: 2px;

    background: #845743;
    border-radius: 999px;

    transform: translateX(-50%);
    transition: width .3s ease;
}


/* Hover على بطاقة التصنيف نفسها */
.overhug-categories
[data-selia="home-square-links-item"]:hover
.square-links__item-title {
    color: #845743 !important;
    transform: translateY(-1px);
}


.overhug-categories
[data-selia="home-square-links-item"]:hover
.square-links__item-title::after {
    width: 30px;
}

  /* OVER HUG — Coffee By / Rectangular Laser */

.overhug-coffee-by .rectangular-links__image-wrap {
    position: relative !important;
    isolation: isolate;
}

/* Laser على حدود الصورة نفسها */
.overhug-coffee-by .rectangular-links__image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;

    border-radius: inherit;
    padding: 2px;

    background: conic-gradient(
        from var(--overhug-angle),
        transparent 0deg,
        transparent 255deg,
        rgba(132, 87, 67, 0.35) 280deg,
        #845743 305deg,
        #F0EDE4 325deg,
        #845743 345deg,
        transparent 360deg
    );

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: 0;
    pointer-events: none;
}

/* يظهر عند المرور */
.overhug-coffee-by
.rectangular-list-item:hover
.rectangular-links__image-wrap::after {
    opacity: 1;
    animation: overhug-laser-border 1.8s linear infinite;
}
  /* OVER HUG — Coffee By Titles */

.overhug-coffee-by .rectangular-links__item-title {
    position: relative !important;
    width: fit-content !important;

    margin: 10px auto 0 !important;
    padding: 0 0 6px !important;

    color: #392820 !important;

    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;

    transition:
        color .25s ease,
        transform .25s ease !important;
}

/* الخط الصغير أسفل العنوان */
.overhug-coffee-by .rectangular-links__item-title::after {
    content: "";
    position: absolute;

    left: 50%;
    bottom: 0;

    width: 0;
    height: 2px;

    background: #845743;
    border-radius: 999px;

    transform: translateX(-50%);
    transition: width .3s ease;
}

/* Hover */
.overhug-coffee-by
.rectangular-list-item:hover
.rectangular-links__item-title {
    color: #845743 !important;
    transform: translateY(-1px);
}

.overhug-coffee-by
.rectangular-list-item:hover
.rectangular-links__item-title::after {
    width: 32px;
}
}


/* =========================================
   OVER HUG — ALL HOMEPAGE PRODUCT CARDS
   ========================================= */

/* الصورة فقط */
body.index .product-card__image > a {
    position: relative !important;
    display: block !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    isolation: isolate;
}

/* الليزر */
body.index .product-card__image > a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;

    border-radius: inherit;
    padding: 2px;

    background: conic-gradient(
        from var(--overhug-angle),
        transparent 0deg,
        transparent 250deg,
        rgba(132, 87, 67, .30) 280deg,
        #845743 305deg,
        #F0EDE4 326deg,
        #845743 346deg,
        transparent 360deg
    );

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: 0;
    pointer-events: none;
}

/* تشغيل الليزر */
body.index .product-card:hover .product-card__image > a::after {
    opacity: 1;
    animation: overhug-laser-border 1.6s linear infinite;
}


/* =========================================
   OVER HUG — ORIGIN / PROCESSING CARDS
   ========================================= */

#overhug-subcategories .oh-category-media {
    position: relative !important;
    isolation: isolate;
    border-radius: 14px 14px 0 0 !important;
}

/* الليزر حول الصورة */
#overhug-subcategories .oh-category-media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    border-radius: inherit;
    padding: 2px;

    background: conic-gradient(
        from var(--overhug-angle),
        transparent 0deg,
        transparent 250deg,
        rgba(132, 87, 67, .30) 280deg,
        #845743 305deg,
        #F0EDE4 326deg,
        #845743 346deg,
        transparent 360deg
    );

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);

    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: 0;
    pointer-events: none;
}

/* تشغيل الليزر */
#overhug-subcategories .oh-category-card:hover
.oh-category-media::after {
    opacity: 1;
    animation: overhug-laser-border 1.6s linear infinite;
}


/* اسم الدولة / المعالجة */
#overhug-subcategories .oh-category-name {
    position: relative !important;
    width: fit-content !important;
    min-height: auto !important;

    margin: 0 auto !important;
    padding: 12px 4px 16px !important;

    color: #392820 !important;
    font-size: 14px !important;
    font-weight: 600 !important;

    transition:
        color .25s ease,
        transform .25s ease !important;
}


/* الخط أسفل الاسم */
#overhug-subcategories .oh-category-name::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 9px;

    width: 0;
    height: 2px;

    background: #845743;
    border-radius: 999px;

    transform: translateX(-50%);
    transition: width .3s ease;
}


/* Hover */
#overhug-subcategories .oh-category-card:hover
.oh-category-name {
    color: #845743 !important;
    transform: translateY(-1px);
}

#overhug-subcategories .oh-category-card:hover
.oh-category-name::after {
    width: 30px;




  @media (max-width: 767px) {

  .overhug-categories
  [data-selia="home-square-links-item"] {
    width: 42% !important;
    flex: 0 0 42% !important;
  }

  .overhug-categories .swiper-wrapper {
    gap: 12px !important;
  }

  .overhug-categories .square-links__item-title {
    font-size: 13px !important;
    margin-top: 7px !important;
  }
@media (max-width: 767px) {

  .overhug-coffee-by .rectangular-list {
    gap: 8px !important;
  }

  .overhug-coffee-by .rectangular-list-item {
    flex: 0 0 calc(50% - 4px) !important;
    width: calc(50% - 4px) !important;
  }

  .overhug-coffee-by .rectangular-links__image-wrap {
    width: 100% !important;
  }

  .overhug-coffee-by .rectangular-links__image-wrap img {
    width: 100% !important;
    height: auto !important;
  }

}
}
}
}