/* Belly Bee homepage refinements */
body[data-template="home"] .section-title {
  display: block;
  width: 100%;
  text-align: center !important;
}

body[data-template="home"] .section-title::after,
body[data-template="home"] .section-title::before {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
}

html,
body {
  direction: rtl;
}

html[lang^="en"] body {
  direction: rtl !important;
}

/* Desktop-only Belly Bee cursor */
@media (hover: hover) and (pointer: fine) and (min-width: 992px) {
  html,
  body {
    cursor: url("https://media.zid.store/cdn-cgi/image/w=72,q=100,f=auto/https://media.zid.store/5f2a4bd4-7028-4508-877b-e0e4dab9f7e8/8d907124-e513-4a7a-a311-f09f5e55804e.png") 6 6, auto !important;
  }

  a,
  button,
  [role="button"],
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .clickable,
  .clickable-span {
    cursor: url("https://media.zid.store/cdn-cgi/image/w=72,q=100,f=auto/https://media.zid.store/5f2a4bd4-7028-4508-877b-e0e4dab9f7e8/8d907124-e513-4a7a-a311-f09f5e55804e.png") 6 6, pointer !important;
  }

  input,
  textarea,
  [contenteditable="true"] {
    cursor: text !important;
  }
}

/* Category title and breadcrumb background */
body[data-template="category_details"] .breadcrumb-section,
body[data-template="category_details"] .subTitle-detail,
body[data-template="category_details"] .breadcrumb {
  background: #F3EEE6 !important;
}

/* Footer rebuild */
.footer .footer-store-section,
.footer .footer-companies,
.footer .footer-copyrights-vat-certificate {
  background: #252321 !important;
  color: #f9f6f1 !important;
}

.footer .bb-footer {
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) repeat(3, minmax(135px, 0.8fr)) minmax(185px, 1fr);
  gap: 28px;
  align-items: start;
  direction: ltr;
  padding: 28px 0 24px;
}

.footer .bb-footer__column {
  min-width: 0;
  direction: rtl;
  text-align: right;
}

.footer .bb-footer__title {
  margin: 0 0 12px;
  padding: 0;
  color: #f9f6f1 !important;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.footer .bb-footer__text,
.footer .bb-footer__link,
.footer .bb-footer__contact a,
.footer .bb-footer__contact .bb-footer__location {
  color: rgba(249, 246, 241, 0.82) !important;
  font-size: 0.92rem;
  line-height: 1.9;
}

.footer .bb-footer__text {
  margin: 0 0 12px;
}

.footer .bb-footer__link {
  display: block;
  text-decoration: none !important;
  margin: 0 0 5px;
  transition: color 0.2s ease;
}

.footer .bb-footer__link:hover,
.footer .bb-footer__contact a:hover {
  color: #ffffff !important;
}

.footer .bb-footer__newsletter-form {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 310px;
  direction: ltr;
  border: 1px solid rgba(249, 246, 241, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

.footer .bb-footer__newsletter-form {
  margin-right: 0;
  margin-left: auto;
}

.footer .bb-footer__newsletter-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f9f6f1;
  padding: 0 14px;
  font-family: inherit;
  font-size: 0.9rem;
}

.footer .bb-footer__newsletter-input {
  direction: rtl;
  text-align: right;
}

.footer .bb-footer__newsletter-input::placeholder {
  color: rgba(249, 246, 241, 0.62);
}

.footer .bb-footer__newsletter-button {
  width: 44px;
  min-width: 44px;
  border: 0;
  border-right: 1px solid rgba(249, 246, 241, 0.22);
  background: transparent;
  color: #f9f6f1;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.footer .bb-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.footer .bb-footer__logo {
  display: block;
  width: auto;
  max-width: 175px;
  max-height: 86px;
  object-fit: contain;
}

.footer .bb-footer__brand-text {
  margin: 0;
  color: rgba(249, 246, 241, 0.82);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer .bb-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.footer .bb-footer__social .social-icons {
  gap: 8px;
  justify-content: flex-end;
}

.footer .bb-footer__social .social-icons a,
.footer .bb-footer__social .social-icons a span {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.75) !important;
}

.footer .bb-footer__social .social-icons a span {
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  border-radius: 50% !important;
  background: transparent !important;
}

.footer .footer-copyrights-vat-certificate,
.footer .footer-copyrights-vat-certificate p {
  color: rgba(249, 246, 241, 0.82) !important;
}

.footer .footer-copyrights,
.footer .footer-copyrights a[href*="zid.sa"],
.footer .footer-copyrights-vat-certificate {
  display: none !important;
}

.footer .footer-copyrights-vat-certificate,
.footer .footer-copyrights-vat-certificate .container,
.footer .footer-copyrights-vat-certificate .footer-store-section-bars {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
}

.language-currency,
.language-currency-menu,
.bb-footer__language,
[href*="/en"],
[href*="lang=en"] {
  display: none !important;
}

@media (max-width: 991.98px) {
  .footer .bb-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 22px;
  }
}

@media (max-width: 767.98px) {
  body[data-template="category_details"] .category-page-slider,
  body[data-template="category_details"] .category-page-slider .home-categories-section,
  body[data-template="category_details"] .category-page-slider .slider-container,
  body[data-template="category_details"] .category-page-slider .d-flex.flex-column,
  body[data-template="category_details"] .category-page-slider .categories-slider-wrapper,
  body[data-template="category_details"] .category-page-slider .categories-slider,
  body[data-template="category_details"] .category-page-slider .slick-list,
  body[data-template="category_details"] .category-page-slider .slick-track {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body[data-template="category_details"] .category-page-slider .categories-slider-wrapper {
    display: block !important;
    padding-bottom: 18px;
  }

  body[data-template="category_details"] .category-page-slider .categories-slider.s-slider {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    position: static !important;
  }

  body[data-template="category_details"] .category-page-slider .categories-slider.s-slider .slick-track {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: auto !important;
    transform: none !important;
  }

  body[data-template="category_details"] .category-page-slider .categories-slider.s-slider .slick-list {
    display: block !important;
    width: 100% !important;
  }

  body[data-template="category_details"] .category-page-slider .categories-slider.s-slider .cat-col {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  body[data-template="category_details"] .category-page-slider .category-item,
  body[data-template="category_details"] .category-page-slider .category-item a {
    height: 100%;
  }

  body[data-template="category_details"] .category-page-slider .category-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  body[data-template="category_details"] .category-page-slider .category-item h3 {
    line-height: 1.45;
    white-space: normal;
  }
}

@media (max-width: 575.98px) {
  .footer .bb-footer {
    grid-template-columns: 1fr;
    padding: 24px 0 20px;
  }

  .footer .bb-footer__column,
  .footer .bb-footer__brand,
  .footer .bb-footer__contact {
    text-align: center;
    align-items: center;
  }

  .footer .bb-footer__newsletter-form {
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
  }

  .footer .bb-footer__social .social-icons {
    justify-content: center;
  }
}

/* Mobile Bottom Navigation */
.bb-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  padding-bottom: env(safe-area-inset-bottom);
}

.bb-mobile-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  color: #333333;
  padding: 10px 4px 6px;
  position: relative;
  transition: color 0.2s ease;
}

.bb-mobile-nav__item:hover,
.bb-mobile-nav__item--active {
  color: #a88d5e !important;
}

.bb-mobile-nav__icon {
  position: relative;
  width: 24px;
  height: 24px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bb-mobile-nav__icon svg {
  width: 100%;
  height: 100%;
}

.bb-mobile-nav__badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: #5d4037;
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  height: 16px;
  min-width: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid #ffffff;
  line-height: 1;
}

.bb-mobile-nav__label {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: 68px !important;
  }
  
  .bb-mobile-nav {
    display: flex;
  }
}