/**
 * ATHETHA — Side Panel Menu Overrides
 * Add this in Salla: Design → Theme Customization → Custom CSS
 * Or link as external stylesheet if your theme supports it.
 */

/* ========== 1. Reduce global side panel font size ========== */
:root {
  --sidepanel-fontsize: 15px;
}

/* ========== 2. Side panel container ========== */
#storemenu-panel.storemenu-panel.side-panel,
aside#storemenu-panel.side-panel {
  --side-panel-padding-x: 20px;
}

.side-panel__content {
  padding-top: 12px;
  padding-bottom: 16px;
}

/* ========== 3. Main category list — compact & refined ========== */
.aside-main-menu .main-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-main-menu .main-menu-item {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  overflow: hidden;
}

/* Menu links — smaller, readable, with hover */
.aside-main-menu .main-menu-item .quicklinks-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: var(--sidepanel-fontsize) !important;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  border-radius: 6px;
  border: none;
  min-height: unset;
}

.aside-main-menu .main-menu-item .quicklinks-item:hover {
  background-color: rgba(95, 105, 84, 0.08);
  color: var(--color-primary, #5f6954);
}

.aside-main-menu .main-menu-item .quicklinks-item:active,
.aside-main-menu .main-menu-item .quicklinks-item:focus-visible {
  background-color: rgba(95, 105, 84, 0.12);
  outline: 2px solid var(--color-primary, #5f6954);
  outline-offset: 2px;
}

/* Remove excessive spacing from inner span */
.aside-main-menu .main-menu-item .quicklinks-item span.pointer-events-none {
  font-size: inherit;
  font-weight: inherit;
}

/* ========== 4. Section divider above "التوثيق" ========== */
.main-menu-wrap {
  margin-bottom: 16px;
}

.main-menu-wrap::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent);
  margin: 16px 0 12px;
}

/* ========== 5. Secondary / Documentation links ========== */
.secondary-menu-wrap .widget {
  padding-top: 4px;
}

.secondary-menu-wrap .store-links-items a,
.secondary-menu-wrap .footer-list a {
  display: block;
  padding: 6px 14px;
  font-size: 13px !important;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 4px;
  margin-bottom: 2px;
}

.secondary-menu-wrap .store-links-items a:hover,
.secondary-menu-wrap .footer-list a:hover {
  color: var(--color-primary, #5f6954);
  background-color: rgba(95, 105, 84, 0.06);
}

/* ========== 6. Side panel top (logo area) ========== */
.side-panel__top .navbar-brand img {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

/* ========== 7. Bottom settings area ========== */
.side-panel__bottom .inner {
  padding-top: 12px;
  padding-bottom: 12px;
}

.side-panel__bottom small {
  font-size: 11px;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

/* ========== 8. Optional: first item slightly emphasized ========== */
.aside-main-menu .main-menu-item:first-child .quicklinks-item {
  background-color: rgba(95, 105, 84, 0.06);
  color: var(--color-primary, #5f6954);
}

.aside-main-menu .main-menu-item:first-child .quicklinks-item:hover {
  background-color: rgba(95, 105, 84, 0.12);
}

/* ========== 9. تقديمات رمضان — special Ramadan item (creative & eye-catching) ========== */

/* Pulse glow animation */
@keyframes ath-ramadan-glow {
  0%, 100% { box-shadow: 0 0 14px rgba(251, 191, 36, 0.25), 0 0 24px rgba(251, 191, 36, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
  50%       { box-shadow: 0 0 20px rgba(251, 191, 36, 0.4),  0 0 36px rgba(251, 191, 36, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
}

/* Shimmer sweep (LTR) */
@keyframes ath-ramadan-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Shimmer sweep (RTL) */
@keyframes ath-ramadan-shimmer-rtl {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

#storemenu-panel .aside-main-menu .main-menu-item.ath-menu-item-ramadan {
  margin: 10px 0;
}

#storemenu-panel .aside-main-menu .main-menu-item.ath-menu-item-ramadan .quicklinks-item {
  position: relative;
  overflow: hidden;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(180, 140, 45, 0.06) 50%, rgba(251, 191, 36, 0.08) 100%);
  color: #92400e;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(251, 191, 36, 0.5);
  animation: ath-ramadan-glow 2.5s ease-in-out infinite;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

/* Star & crescent icon before text */
#storemenu-panel .aside-main-menu .main-menu-item.ath-menu-item-ramadan .quicklinks-item::before {
  content: "\262A\00A0";
  font-size: 1.15em;
  color: #b45309;
  margin-inline-end: 8px;
  display: inline-block;
  vertical-align: middle;
}

/* Gradient text (gold shine) */
#storemenu-panel .aside-main-menu .main-menu-item.ath-menu-item-ramadan .quicklinks-item span.pointer-events-none {
  background: linear-gradient(135deg, #b45309 0%, #d97706 40%, #fbbf24 70%, #d97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* Shimmer overlay (light sweep) */
#storemenu-panel .aside-main-menu .main-menu-item.ath-menu-item-ramadan .quicklinks-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: ath-ramadan-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

[dir="rtl"] #storemenu-panel .aside-main-menu .main-menu-item.ath-menu-item-ramadan .quicklinks-item::after {
  animation-name: ath-ramadan-shimmer-rtl;
}

#storemenu-panel .aside-main-menu .main-menu-item.ath-menu-item-ramadan .quicklinks-item:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(180, 140, 45, 0.12) 100%);
  border-color: rgba(251, 191, 36, 0.7);
  animation-duration: 1.5s;
}

#storemenu-panel .aside-main-menu .main-menu-item.ath-menu-item-ramadan .quicklinks-item:hover span.pointer-events-none {
  background: linear-gradient(135deg, #78350f 0%, #b45309 50%, #fcd34d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/**
 * ATHETHA — Promotion badge: "with value" style as default for all (except out-of-stock).
 * Uses --card-promotion-with-number-bg and offset shadow. Out-of-stock stays gray.
 */

.promotion-badge {
  border-radius: 0.125rem;
  font-size: 0.75rem;
  line-height: 1rem;
  padding: 0.125rem 0.5rem;
  position: absolute;
  top: 0.625rem;
  z-index: 1;
  background-color: #b7633d;
  color: #f5f1ea;
  unicode-bidi: plaintext;
  transition-duration: 0.3s;
  transition-property: box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

input[type=radio].sr-only div.promotion-badge {
  transition: all 0.3s;
}

input[type=radio].sr-only:checked ~ div.promotion-badge {
  border-color: var(--color-main);
}

@media (min-width: 1024px) {
  .promotion-badge {
    font-size: 0.875rem;
    line-height: 1.25rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }
}

.promotion-badge:where([dir=ltr], [dir=ltr] *) {
  left: 0.625rem;
  box-shadow: 2px 2px 0 0 #f5f1ea;
}

.promotion-badge:where([dir=rtl], [dir=rtl] *) {
  box-shadow: -2px 2px 0 0 #f5f1ea;
}

.product-entry:hover .promotion-badge:where([dir=ltr], [dir=ltr] *) {
  box-shadow: 4px 4px 0 0 #f5f1ea;
}

.product-entry:hover .promotion-badge:where([dir=rtl], [dir=rtl] *) {
  box-shadow: -4px 4px 0 0 #f5f1ea;
}

html[dir=rtl] .promotion-badge {
  right: 0.625rem;
}

/* Out-of-stock only: flat gray, no value style */
.out-of-stock .promotion-badge {
  background-color: #e5e7eb;
  color: #6b7280;
  box-shadow: none;
}

.has-calories-badge .promotion-badge {
  top: 2rem;
}

.has-calories-badge .promotion-badge:where([dir=ltr], [dir=ltr] *) {
  left: 2rem;
  right: auto;
}

.has-calories-badge .promotion-badge:where([dir=rtl], [dir=rtl] *) {
  left: auto;
  right: 2rem;
}

/* ========== Glow + small falling stars inside promotion badge ========== */
@keyframes ath-promo-glow {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 2px rgba(255, 255, 255, 0.2)); }
  50%      { filter: brightness(1.08) drop-shadow(0 0 6px rgba(255, 255, 255, 0.35)); }
}

@keyframes ath-promo-stars-fall {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.promotion-badge {
  overflow: hidden;
  animation: ath-promo-glow 2.5s ease-in-out infinite;
}

/* Small star-like dots falling through the badge */
.promotion-badge::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 200%;
  top: -100%;
  background-repeat: repeat;
  background-image:
    radial-gradient(circle 1.2px at 15% 10%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
    radial-gradient(circle 1px at 55% 25%, rgba(255, 255, 255, 0.85) 0%, transparent 70%),
    radial-gradient(circle 1.2px at 85% 15%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
    radial-gradient(circle 1px at 25% 55%, rgba(255, 255, 255, 0.8) 0%, transparent 70%),
    radial-gradient(circle 1.2px at 70% 50%, rgba(255, 255, 255, 0.85) 0%, transparent 70%),
    radial-gradient(circle 1px at 40% 80%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
    radial-gradient(circle 1px at 90% 70%, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
  background-size: 100% 50%;
  animation: ath-promo-stars-fall 3s linear infinite;
  pointer-events: none;
}

.promotion-badge::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 200%;
  top: -100%;
  background-repeat: repeat;
  background-image:
    radial-gradient(circle 1px at 45% 5%, rgba(255, 255, 255, 0.75) 0%, transparent 70%),
    radial-gradient(circle 1.2px at 75% 35%, rgba(255, 255, 255, 0.85) 0%, transparent 70%),
    radial-gradient(circle 1px at 20% 45%, rgba(255, 255, 255, 0.8) 0%, transparent 70%),
    radial-gradient(circle 1px at 60% 65%, rgba(255, 255, 255, 0.75) 0%, transparent 70%),
    radial-gradient(circle 1.2px at 35% 90%, rgba(255, 255, 255, 0.85) 0%, transparent 70%);
  background-size: 100% 50%;
  animation: ath-promo-stars-fall 3.6s linear infinite;
  animation-delay: -1.2s;
  pointer-events: none;
}

.out-of-stock .promotion-badge,
.out-of-stock .promotion-badge::before,
.out-of-stock .promotion-badge::after {
  animation: none !important;
  filter: none;
}

.out-of-stock .promotion-badge::before,
.out-of-stock .promotion-badge::after {
  display: none;
}
/**
 * ATHETHA — Promotion badge: "with value" style as default for all (except out-of-stock).
 * Uses --card-promotion-with-number-bg and offset shadow. Out-of-stock stays gray.
 */

.promotion-badge {
  border-radius: 0.125rem;
  font-size: 0.75rem;
  line-height: 1rem;
  padding: 0.125rem 0.5rem;
  position: absolute;
  top: 0.625rem;
  z-index: 1;
  background-color: #b7633d;
  color: #f5f1ea;
  unicode-bidi: plaintext;
  transition-duration: 0.3s;
  transition-property: box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

input[type=radio].sr-only div.promotion-badge {
  transition: all 0.3s;
}

input[type=radio].sr-only:checked ~ div.promotion-badge {
  border-color: var(--color-main);
}

@media (min-width: 1024px) {
  .promotion-badge {
    font-size: 0.875rem;
    line-height: 1.25rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }
}

.promotion-badge:where([dir=ltr], [dir=ltr] *) {
  left: 0.625rem;
  box-shadow: 2px 2px 0 0 #f5f1ea;
}

.promotion-badge:where([dir=rtl], [dir=rtl] *) {
  box-shadow: -2px 2px 0 0 #f5f1ea;
}

.product-entry:hover .promotion-badge:where([dir=ltr], [dir=ltr] *) {
  box-shadow: 4px 4px 0 0 #f5f1ea;
}

.product-entry:hover .promotion-badge:where([dir=rtl], [dir=rtl] *) {
  box-shadow: -4px 4px 0 0 #f5f1ea;
}

html[dir=rtl] .promotion-badge {
  right: 0.625rem;
}

/* Out-of-stock only: flat gray, no value style */
.out-of-stock .promotion-badge {
  background-color: #e5e7eb;
  color: #6b7280;
  box-shadow: none;
}

.has-calories-badge .promotion-badge {
  top: 2rem;
}

.has-calories-badge .promotion-badge:where([dir=ltr], [dir=ltr] *) {
  left: 2rem;
  right: auto;
}

.has-calories-badge .promotion-badge:where([dir=rtl], [dir=rtl] *) {
  left: auto;
  right: 2rem;
}

/* ========== Glow + small falling stars inside promotion badge ========== */
@keyframes ath-promo-glow {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 2px rgba(255, 255, 255, 0.2)); }
  50%      { filter: brightness(1.08) drop-shadow(0 0 6px rgba(255, 255, 255, 0.35)); }
}

@keyframes ath-promo-stars-fall {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.promotion-badge {
  overflow: hidden;
  animation: ath-promo-glow 2.5s ease-in-out infinite;
}

/* Small star-like dots falling through the badge */
.promotion-badge::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 200%;
  top: -100%;
  background-repeat: repeat;
  background-image:
    radial-gradient(circle 1.2px at 15% 10%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
    radial-gradient(circle 1px at 55% 25%, rgba(255, 255, 255, 0.85) 0%, transparent 70%),
    radial-gradient(circle 1.2px at 85% 15%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
    radial-gradient(circle 1px at 25% 55%, rgba(255, 255, 255, 0.8) 0%, transparent 70%),
    radial-gradient(circle 1.2px at 70% 50%, rgba(255, 255, 255, 0.85) 0%, transparent 70%),
    radial-gradient(circle 1px at 40% 80%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
    radial-gradient(circle 1px at 90% 70%, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
  background-size: 100% 50%;
  animation: ath-promo-stars-fall 3s linear infinite;
  pointer-events: none;
}

.promotion-badge::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 200%;
  top: -100%;
  background-repeat: repeat;
  background-image:
    radial-gradient(circle 1px at 45% 5%, rgba(255, 255, 255, 0.75) 0%, transparent 70%),
    radial-gradient(circle 1.2px at 75% 35%, rgba(255, 255, 255, 0.85) 0%, transparent 70%),
    radial-gradient(circle 1px at 20% 45%, rgba(255, 255, 255, 0.8) 0%, transparent 70%),
    radial-gradient(circle 1px at 60% 65%, rgba(255, 255, 255, 0.75) 0%, transparent 70%),
    radial-gradient(circle 1.2px at 35% 90%, rgba(255, 255, 255, 0.85) 0%, transparent 70%);
  background-size: 100% 50%;
  animation: ath-promo-stars-fall 3.6s linear infinite;
  animation-delay: -1.2s;
  pointer-events: none;
}

.out-of-stock .promotion-badge,
.out-of-stock .promotion-badge::before,
.out-of-stock .promotion-badge::after {
  animation: none !important;
  filter: none;
}

.out-of-stock .promotion-badge::before,
.out-of-stock .promotion-badge::after {
  display: none;
}