/**
 * Header + category circles – TSC reference match
 */

:root {
  --hdr-navy: #5a4f24;
  --hdr-navy-hover: #6d5e28;
  --cat-circle: 84px;
  --cat-gap: 14px;
  --cat-grad: linear-gradient(180deg, #e0c060 0%, #f5e0a8 45%, #fffbf0 100%);
  --cat-grad-hover: linear-gradient(180deg, #5a4f24 0%, #a68b30 42%, #f0d890 100%);
}

/* ========== Desktop header ========== */
@media (min-width: 992px) {
  .site-header .header-inner {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
    align-items: center;
    height: 64px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 16px;
  }

  .header-col-left {
    display: flex;
    align-items: center;
    justify-self: start;
  }

  .header-col-center {
    justify-self: center;
    display: flex;
    justify-content: center;
  }

  .header-col-right {
    display: flex;
    justify-content: flex-end;
    justify-self: end;
  }

  .site-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
  }

  .site-header .logo-icon svg {
    width: 32px;
    height: 32px;
    display: block;
  }

  .site-header .logo-text {
    font-family: 'Urbanist', 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.0625rem;
    letter-spacing: 0.03em;
    color: var(--hdr-navy);
    white-space: nowrap;
  }

  .site-header .logo-img {
    display: block;
    width: auto;
    height: 48px;
    max-width: 320px;
    object-fit: contain;
    object-position: left center;
  }

  .site-header .main-nav {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 36px;
  }

  .site-header .main-nav .nav-item,
  .site-header .main-nav .nav-item-link {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--hdr-navy);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
    border-bottom: none;
    text-decoration: none;
    cursor: pointer;
  }

  .site-header .main-nav .nav-item:hover,
  .site-header .main-nav .nav-item.active,
  .site-header .main-nav .nav-item-link:hover {
    color: var(--hdr-navy-hover);
  }

  .site-header .header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .site-header .header-actions .icon-btn {
    width: 40px;
    height: 40px;
    color: var(--hdr-navy);
  }

  .site-header .header-actions .icon-btn svg {
    width: 22px;
    height: 22px;
  }

  .site-header .header-actions .icon-btn .badge {
    background: var(--hdr-navy);
  }

  .site-header .btn-find-store {
    padding: 10px 20px 10px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--hdr-navy) !important;
    border-radius: 999px;
    color: #fff !important;
    margin-left: 6px;
  }
}

/* ========== Category circles – TSC (10 per row + scroll) ========== */
.category-circles-bar {
  padding: 8px 0 14px;
  background: #fff;
  margin: 0;
  overflow: hidden;
}

.category-circles-bar .category-swiper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px 18px 8px;
  overflow: hidden;
  scrollbar-width: none;
}

.category-circles-bar .category-swiper::-webkit-scrollbar {
  display: none;
}

.category-circles-bar .swiper-wrapper {
  align-items: flex-start;
}

.category-circles-bar .swiper-slide {
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  box-sizing: border-box;
}

.category-circles-bar .circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 112px;
  margin: 0 auto;
  text-decoration: none;
  color: inherit;
}

.category-circles-bar .circle-img {
  width: var(--cat-circle) !important;
  height: var(--cat-circle) !important;
  border-radius: 50%;
  background: var(--cat-grad) !important;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.2);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  margin: 0 auto 6px;
  position: relative;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.category-circles-bar .circle-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.category-circles-bar .circle-img img {
  width: 96% !important;
  height: 96% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: translateY(-6%) !important;
  filter: drop-shadow(0 6px 12px rgba(74, 63, 26, 0.14));
  pointer-events: none;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.category-circles-bar .circle-label,
.category-circles-bar .circle-item > span {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--hdr-navy) !important;
  margin-top: 14px !important;
  line-height: 1.25 !important;
  text-align: center !important;
  display: block !important;
  width: 100%;
  padding: 0 4px;
}

/* Hover – halka sa bahar (TSC) */
.category-circles-bar .circle-item:hover .circle-img {
  background: var(--cat-grad-hover) !important;
  box-shadow: 0 8px 22px rgba(18, 34, 68, 0.16);
}

.category-circles-bar .circle-item:hover .circle-img img {
  transform: translateY(-10%) scale(1.06) !important;
  filter: drop-shadow(0 12px 18px rgba(18, 34, 68, 0.2));
}

/* Desktop: force 10 slots + gap between */
@media (min-width: 992px) {
  .category-circles-bar .category-swiper {
    --cat-visible: 10;
    padding-left: 20px;
    padding-right: 20px;
  }

  .category-circles-bar .swiper-slide {
    width: calc((100% - (var(--cat-visible) - 1) * var(--cat-gap)) / var(--cat-visible)) !important;
    padding: 0 2px;
  }

  .category-circles-bar .circle-item {
    max-width: 100%;
  }
}

.page-home .header-sticky-wrap,
.page-home .header-top,
.page-home .category-circles-bar {
  background: #fff !important;
}

body.header-fixed.page-home .header-sticky-wrap {
  background: #fff;
  border-bottom: 1px solid #faf6ed;
}

@media (min-width: 992px) {
  .header-sticky-wrap {
    background: #fff;
  }
}

/* ========== Mobile ========== */
@media (max-width: 991.98px) {
  .site-header .header-inner {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    height: 56px;
    padding: 0 12px;
    gap: 8px;
  }

  .header-col-left { display: contents; }
  .header-col-left .hamburger-tsc { grid-column: 1; }
  .header-col-left .logo { grid-column: 2; justify-self: start; }
  .header-col-right { grid-column: 3; }
  .header-col-center { display: none !important; }

  .site-header .logo {
    min-width: 0;
    max-width: calc(100vw - 210px);
  }

  .site-header .logo-img {
    height: 30px;
    max-width: 170px;
  }

  .site-header .logo-text {
    font-size: 0.78rem;
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .category-circles-bar {
    --cat-circle: 76px;
    --cat-gap: 10px;
  }

  .category-circles-bar .category-swiper {
    overflow: visible;
    padding: 4px 12px 8px;
  }

  .category-circles-bar .swiper-slide {
    width: 96px !important;
  }
}

@media (max-width: 480px) {
  .site-header .logo-img {
    height: 26px;
    max-width: 140px;
  }

  .site-header .logo {
    max-width: calc(100vw - 190px);
  }
}
