/* ==========================================================================
   WAGTAIL TRADERS LIMITED - OFFICIAL BOOTSTRAP 5 STYLESHEET
   Brand Palette: Warm Ivory (#FAF6EE), Deep Ivory (#F1EADB),
                  Deep Teal (#0F4C52), Dark Teal (#0A3A3F), Coral Orange (#FF6B4A)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-ivory: #FAF6EE;
  --bg-ivory-deep: #F1EADB;
  --teal-deep: #0F4C52;
  --teal-dark: #0A3A3F;
  --coral: #FF6B4A;
  --coral-hover: #E5533A;
  --text-main: #0A3A3F;
  --text-muted: #386064;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Global Reset & Typography */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-ivory);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--coral);
  color: var(--teal-dark);
}

a {
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  letter-spacing: -0.025em;
  font-weight: 800;
}

/* Custom Buttons (Compact, Modern, Proportionate) */
.btn {
  font-family: var(--font-family);
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.btn:active {
  transform: scale(0.97);
}

.btn-coral {
  background-color: var(--coral);
  color: var(--teal-dark);
  border: 1px solid var(--coral);
  box-shadow: 0 4px 14px rgba(255, 107, 74, 0.25);
}

.btn-coral:hover, .btn-coral:focus {
  background-color: var(--coral-hover);
  color: var(--teal-dark);
  border-color: var(--coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 74, 0.35);
}

.btn-teal {
  background-color: var(--teal-deep);
  color: var(--bg-ivory);
  border: 1px solid var(--teal-deep);
}

.btn-teal:hover, .btn-teal:focus {
  background-color: var(--teal-dark);
  color: var(--bg-ivory);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 76, 82, 0.2);
}

.btn-outline-teal {
  background-color: transparent;
  color: var(--teal-deep);
  border: 2px solid rgba(15, 76, 82, 0.4);
}

.btn-outline-teal:hover, .btn-outline-teal:focus {
  background-color: var(--bg-ivory-deep);
  color: var(--teal-deep);
  border-color: var(--teal-deep);
  transform: translateY(-2px);
}

.btn-outline-light-custom {
  background-color: transparent;
  color: var(--bg-ivory);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-light-custom:hover, .btn-outline-light-custom:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  color: var(--bg-ivory);
  transform: translateY(-2px);
}

.btn-sm-custom {
  padding: 0.375rem 0.9rem;
  font-size: 0.8rem;
  border-radius: 0.5rem;
}

.btn-lg-custom {
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  border-radius: 0.85rem;
}

/* Badges */
.badge-custom {
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.badge-coral {
  background-color: rgba(255, 107, 74, 0.15);
  color: #d84523;
  border: 1px solid rgba(255, 107, 74, 0.3);
}

.badge-teal {
  background-color: rgba(15, 76, 82, 0.1);
  color: var(--teal-deep);
  border: 1px solid rgba(15, 76, 82, 0.2);
}

/* Section Headings */
.section-heading-block {
  margin-bottom: 3rem;
}

.section-title {
  color: var(--teal-deep);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-eyebrow {
  color: var(--coral);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  display: inline-block;
}

/* Header & Utility Bar */
.top-utility-bar {
  background-color: var(--teal-dark);
  color: var(--bg-ivory);
  font-size: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-utility-bar a {
  color: var(--bg-ivory);
}

.top-utility-bar a:hover {
  color: var(--coral);
}

.navbar-wagtail {
  background-color: var(--teal-deep);
  padding: 0.85rem 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(10, 58, 63, 0.2);
}

.navbar-wagtail.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 6px 20px rgba(10, 58, 63, 0.35);
}

.navbar-wagtail .nav-link {
  color: var(--bg-ivory);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0.85rem;
  transition: color 0.2s ease;
}

.navbar-wagtail .nav-link:hover {
  color: var(--coral);
}

.navbar-wagtail .nav-link.active {
  color: var(--bg-ivory);
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--coral);
}

/* Offcanvas Menu for Mobile */
.offcanvas-wagtail {
  background-color: var(--bg-ivory);
  color: var(--teal-dark);
}

.offcanvas-wagtail .nav-link {
  color: var(--teal-deep);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(15, 76, 82, 0.1);
}

.offcanvas-wagtail .nav-link:hover, .offcanvas-wagtail .nav-link.active {
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-color: var(--coral);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 540px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(15, 76, 82, 0.15);
  background-color: var(--bg-ivory);
}

.hero-slider-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out, transform 7s ease-out;
  transform: scale(1);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1.05);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Desktop Hero Scrim */
@media (min-width: 576px) {
  .hero-scrim {
    background: linear-gradient(to right, rgba(250,246,238,0.92) 0%, rgba(250,246,238,0.65) 45%, transparent 100%),
                linear-gradient(to bottom, rgba(250,246,238,0.3) 0%, transparent 60%, rgba(250,246,238,0.7) 100%);
  }
}

/* Mobile Hero View: Card is completely transparent, scrim illuminates text, high contrast */
@media (max-width: 575.98px) {
  .hero-scrim {
    background: linear-gradient(to bottom, rgba(250,246,238,0.75) 0%, rgba(250,246,238,0.40) 50%, rgba(250,246,238,0.30) 100%);
  }

  .hero-content-box {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .hero-headline {
    text-shadow: 0 1px 3px rgba(250, 246, 238, 0.95);
  }

  .hero-lead-text {
    color: #052226 !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px #FAF6EE, 0 0 8px #FAF6EE, 0 0 12px #FAF6EE;
  }
}

/* Coverflow Interactive Filter Tabs */
.filter-pill-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-pill {
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--bg-ivory);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-pill:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.filter-pill.active {
  background-color: var(--coral);
  color: var(--teal-dark);
  border-color: var(--coral);
  box-shadow: 0 4px 12px rgba(255, 107, 74, 0.35);
}

/* View Mode Toggler (Coverflow vs Grid) */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
  border-radius: 9999px;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 2rem;
}

.view-mode-btn {
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bg-ivory);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.view-mode-btn.active {
  background-color: var(--bg-ivory);
  color: var(--teal-deep);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Coverflow 3D Stage & Interactive Cards */
.coverflow-stage {
  position: relative;
  width: 100%;
  height: 520px;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  cursor: grab;
}

.coverflow-stage:active {
  cursor: grabbing;
}

.coverflow-radial-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255, 107, 74, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.coverflow-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.coverflow-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  max-width: calc(100vw - 40px);
  height: 440px;
  border-radius: 1.5rem;
  overflow: hidden;
  pointer-events: auto;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background-color: var(--teal-dark);
  color: var(--bg-ivory);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  transform-origin: center center;
  cursor: pointer;
  z-index: 10;
}

.coverflow-card.is-front {
  border-color: var(--coral) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 25px rgba(255, 107, 74, 0.25) !important;
}

.coverflow-card:hover {
  border-color: rgba(255, 107, 74, 0.6);
}

.coverflow-card .card-icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--bg-ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.coverflow-card.is-front .card-icon-box {
  background-color: var(--coral);
  color: var(--teal-dark);
}

.coverflow-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.coverflow-nav-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-color: var(--bg-ivory);
  color: var(--teal-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.coverflow-nav-btn:hover {
  background-color: var(--coral);
  color: var(--teal-dark);
  border-color: var(--coral);
  transform: scale(1.05);
}

.coverflow-nav-btn:active {
  transform: scale(0.95);
}

.coverflow-counter {
  min-width: 5.5rem;
  text-align: center;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  background-color: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--bg-ivory);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: monospace;
  backdrop-filter: blur(4px);
}

.coverflow-toggle-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--bg-ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.coverflow-toggle-btn:hover {
  background-color: var(--coral);
  color: var(--teal-dark);
}

/* Category Grid View */
.category-grid-item {
  background-color: var(--teal-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.25rem;
  padding: 1.5rem;
  color: var(--bg-ivory);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: all 0.3s ease;
}

.category-grid-item:hover {
  border-color: rgba(255, 107, 74, 0.7);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.category-grid-item .grid-icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--bg-ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.category-grid-item:hover .grid-icon-box {
  background-color: var(--coral);
  color: var(--teal-dark);
}

/* Benefit List with Checkmark */
.benefit-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
  margin-bottom: 0;
}

.benefit-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  color: var(--teal-dark);
  line-height: 1.45;
}

.benefit-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--coral);
  font-weight: 900;
}

/* Product & Feature Cards */
.card-wagtail {
  background-color: #ffffff;
  border: 1px solid rgba(15, 76, 82, 0.15);
  border-radius: 1.25rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-wagtail:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 35px rgba(10, 58, 63, 0.12);
  border-color: rgba(15, 76, 82, 0.35);
}

.feature-icon-box {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background-color: var(--teal-deep);
  color: var(--bg-ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.card-wagtail:hover .feature-icon-box {
  background-color: var(--coral);
  color: var(--teal-dark);
  transform: scale(1.05);
}

/* Value Cards with Letter Emblem */
.value-card {
  padding: 1.5rem;
  border-radius: 1rem;
  background-color: rgba(241, 234, 219, 0.6);
  border: 1px solid rgba(15, 76, 82, 0.12);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.value-card:hover {
  border-color: rgba(255, 107, 74, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(15, 76, 82, 0.08);
}

.value-letter-box {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background-color: var(--teal-deep);
  color: var(--bg-ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Direct Procurement Banner & Accents */
.direct-procurement-section {
  background-color: var(--teal-dark);
  color: var(--bg-ivory);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.glow-orb-coral {
  position: absolute;
  top: 0;
  right: 0;
  width: 24rem;
  height: 24rem;
  background-color: rgba(255, 107, 74, 0.12);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.glow-orb-white {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 20rem;
  height: 20rem;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}

/* Contact Snippet Card */
.contact-snippet-card {
  padding: 1.75rem;
  border-radius: 1.25rem;
  background-color: rgba(241, 234, 219, 0.5);
  border: 1px solid rgba(15, 76, 82, 0.12);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  height: 100%;
  transition: all 0.25s ease;
}

.contact-snippet-card:hover {
  background-color: #ffffff;
  border-color: rgba(15, 76, 82, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(10, 58, 63, 0.08);
}

/* Footer */
.footer-wagtail {
  background-color: var(--teal-dark);
  color: var(--bg-ivory);
  border-top: 4px solid var(--coral);
  position: relative;
}

.footer-wagtail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #FF6B4A 0%, #E5533A 50%, #FF6B4A 100%);
}

.footer-wagtail a {
  color: rgba(241, 234, 219, 0.8);
}

.footer-wagtail a:hover {
  color: var(--coral);
}

.social-pill-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--bg-ivory);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.social-pill-btn:hover {
  background-color: var(--coral);
  color: var(--teal-dark) !important;
  transform: translateY(-2px);
}

/* Floating WhatsApp / Phone Contact Button */
.floating-contact-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1040;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
}

.floating-contact-btn:hover {
  transform: scale(1.1);
  color: #ffffff;
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.55);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 480px;
  z-index: 1050;
  background-color: var(--bg-ivory);
  border: 2px solid rgba(15, 76, 82, 0.2);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
}

@media (min-width: 768px) {
  .cookie-banner {
    left: auto;
    right: 1.5rem;
  }
}
