/**
 * Header + category circles – TSC reference match
 */

:root {
  --hdr-navy: #0B2545;
  --hdr-navy-hover: #163A5F;
  --cat-circle: 84px;
  --cat-gap: 14px;
  /* Cool soft white — golden product photos stay visible */
  --cat-grad: radial-gradient(circle at 42% 32%, #ffffff 0%, #f5f7fa 55%, #e6ecf2 100%);
  --cat-grad-hover: radial-gradient(circle at 42% 28%, #ffffff 0%, #eef2f6 50%, #dce3eb 100%);
}

/* Logo baseline (dashboard upload path must always render) */
.site-header .logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-header .logo-img {
  display: block;
  width: auto;
  height: 40px;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
}

/* ========== Desktop header ========== */
@media (min-width: 992px) {
  .site-header .container.header-inner,
  .site-header .header-inner {
    display: grid;
    grid-template-columns: 152px minmax(0, 1fr) auto;
    align-items: center;
    height: 64px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
    gap: 10px;
    overflow: visible;
  }

  .header-col-left {
    display: flex;
    align-items: center;
    justify-self: start;
  }

  .header-col-center {
    justify-self: stretch;
    display: flex;
    justify-content: flex-start;
    min-width: 0;
    overflow: hidden;
  }

  .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: 42px;
    max-width: 148px;
    object-fit: contain;
    object-position: left center;
  }

  .site-header .main-nav {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 6px 14px;
    min-width: 0;
    width: 100%;
    flex-wrap: nowrap;
  }

  .site-header .main-nav .nav-item,
  .site-header .main-nav .nav-item-link {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--hdr-navy);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    border-bottom: none;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .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: 6px;
    flex-wrap: nowrap;
  }

  .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: 8px 12px 8px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--hdr-navy) !important;
    border-radius: 999px;
    color: #fff !important;
    margin-left: 4px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .site-header .btn-project-cta {
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #D0122A !important;
    border-radius: 999px;
    color: #fff !important;
    margin-left: 4px;
    text-decoration: none;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .site-header .btn-bulk-enquiry {
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #0B2545 !important;
    border: 0;
    border-radius: 999px;
    color: #fff !important;
    margin-left: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
  }
}

@media (min-width: 992px) and (max-width: 1360px) {
  .site-header .nav-ico {
    display: none !important;
  }
}

/* ========== Category circles – TSC (10 per row + scroll) ========== */
.category-circles-bar {
  --cat-circle: 88px;
  --cat-gap: 14px;
  --cat-grad: radial-gradient(circle at 35% 28%, #ffffff 0%, #F5F7FA 42%, #eef2f6 100%);
  --cat-grad-hover: radial-gradient(circle at 35% 28%, #ffffff 0%, #e8eef5 40%, #c5d4e8 100%);
  padding: 14px 0 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 246, 237, 0.95) 100%);
  border-bottom: 1px solid rgba(208, 18, 42, 0.12);
  margin: 0;
  overflow: visible;
  position: relative;
}

.category-circles-bar::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(208, 18, 42, 0.35), transparent);
  pointer-events: none;
}

.category-circles-shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

.cat-nav-btn {
  position: absolute;
  top: 36%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(11, 37, 69, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: #0B2545;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(11, 37, 69, 0.1);
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.cat-nav-btn:hover:not(:disabled):not(.is-disabled) {
  background: #0B2545;
  color: #ffffff;
  border-color: #0B2545;
  box-shadow: 0 8px 22px rgba(11, 37, 69, 0.18);
  transform: translateY(-50%) scale(1.04);
}

.cat-nav-btn:disabled,
.cat-nav-btn.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.cat-nav-prev { left: 6px; }
.cat-nav-next { right: 6px; }

.category-circles-bar .category-swiper {
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 4px 10px;
  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;
  transition: transform 0.22s ease;
}

.category-circles-bar .circle-item:hover {
  transform: translateY(-3px);
}

.category-circles-bar .circle-item:focus-visible {
  outline: none;
}

.category-circles-bar .circle-item:focus-visible .circle-img {
  box-shadow:
    0 0 0 3px rgba(208, 18, 42, 0.35),
    0 12px 28px rgba(11, 37, 69, 0.16);
}

.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:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -8px 18px rgba(11, 37, 69, 0.06),
    0 8px 22px rgba(11, 37, 69, 0.1);
  border: 1px solid rgba(11, 37, 69, 0.08);
  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, border-color 0.3s ease;
  isolation: isolate;
}

.category-circles-bar .circle-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 50% 50%, rgba(208, 18, 42, 0.28) 0%, rgba(208, 18, 42, 0.08) 42%, transparent 68%);
  animation: cat-light-pulse 2.6s ease-in-out infinite;
}

.category-circles-bar .circle-sparkles {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 1) 0 1.6px, transparent 2.4px),
    radial-gradient(circle at 78% 28%, rgba(255, 236, 170, 0.95) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 70% 74%, rgba(255, 255, 255, 0.9) 0 1.3px, transparent 2.3px),
    radial-gradient(circle at 28% 72%, rgba(232, 196, 90, 0.85) 0 1px, transparent 2px);
  animation: cat-sparkle-twinkle 2s ease-in-out infinite;
  mix-blend-mode: plus-lighter;
  opacity: 0.85;
}

.category-circles-bar .circle-img::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  padding: 1.5px;
  background: conic-gradient(from 180deg, transparent 0%, rgba(208, 18, 42, 0.15) 20%, rgba(255, 240, 180, 0.95) 40%, rgba(208, 18, 42, 0.55) 55%, transparent 75%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: cat-ring-spin 5s linear infinite;
  opacity: 0.9;
  z-index: 1;
  pointer-events: none;
}

.category-circles-bar .circle-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  position: relative;
  z-index: 3;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.category-circles-bar .circle-img img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  filter: contrast(1.08) saturate(1.05) drop-shadow(0 4px 10px rgba(11, 37, 69, 0.22));
  pointer-events: none;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.category-circles-bar .circle-label,
.category-circles-bar .circle-item > span.circle-label {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 500 !important;
  color: #2f2a20 !important;
  margin-top: 8px !important;
  line-height: 1.25 !important;
  text-align: center !important;
  display: block !important;
  width: 100%;
  max-width: 100%;
  padding: 0 2px;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.category-circles-bar .circle-item:hover .circle-label {
  color: #163A5F !important;
}

.category-circles-bar .circle-item:hover .circle-img {
  background: var(--cat-grad-hover) !important;
  border-color: rgba(208, 18, 42, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 0 0 1px rgba(208, 18, 42, 0.2),
    0 10px 28px rgba(11, 37, 69, 0.14),
    0 0 24px rgba(208, 18, 42, 0.22);
}

.category-circles-bar .circle-item:hover .circle-glow {
  animation-duration: 1.3s;
}

.category-circles-bar .circle-item:hover .circle-img img {
  transform: scale(1.06) !important;
  filter: contrast(1.12) saturate(1.08) drop-shadow(0 8px 14px rgba(11, 37, 69, 0.28));
}

@keyframes cat-light-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes cat-sparkle-twinkle {
  0%, 100% { opacity: 0.3; transform: rotate(0deg) scale(1); }
  35% { opacity: 1; transform: rotate(10deg) scale(1.05); }
  70% { opacity: 0.5; transform: rotate(-6deg) scale(0.98); }
}

@keyframes cat-ring-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .category-circles-bar .circle-glow,
  .category-circles-bar .circle-sparkles,
  .category-circles-bar .circle-img::before {
    animation: none !important;
  }
}

/* Desktop: force 10 slots + gap between */
@media (min-width: 992px) {
  .category-circles-bar .category-swiper {
    --cat-visible: 10;
    padding-left: 8px;
    padding-right: 8px;
  }

  .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 #F5F7FA;
}

@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-shell {
    padding: 0 36px;
  }

  .cat-nav-btn {
    width: 34px;
    height: 34px;
    top: 34%;
  }

  .cat-nav-prev { left: 2px; }
  .cat-nav-next { right: 2px; }

  .category-circles-bar .category-swiper {
    overflow: hidden;
    padding: 6px 0 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);
  }
}
