/* ==========================================================
   AVANEEIS TRADERS — brand theme (navy + red from the logo)
   ========================================================== */
:root {
  --brand-navy: #0E1471;
  --brand-navy-dark: #080C4A;
  --brand-red: #C90C0C;
  --brand-red-dark: #A00909;
  --brand-green: #0B6B1E;
  --ink: #1B1D2E;
  --muted: #6B7080;
  --surface: #F4F6FB;

  --bs-primary: var(--brand-navy);
  --bs-primary-rgb: 14, 20, 113;
  --bs-danger: var(--brand-red);
  --bs-danger-rgb: 201, 12, 12;
  --bs-link-color: var(--brand-navy);
  --bs-link-color-rgb: 14, 20, 113;
  --bs-link-hover-color: var(--brand-red);
}

body { font-family: 'Poppins', 'Segoe UI', Arial, sans-serif; background: var(--surface); color: var(--ink); }
.text-brand-red { color: var(--brand-red) !important; }
.text-brand-navy { color: var(--brand-navy) !important; }

/* ---------- Preloader (chicken logo) ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#preloader.done { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; }
.preloader-inner img {
  width: min(260px, 60vw); height: auto;
  animation: preloader-pop 1.4s ease-in-out infinite;
}
.preloader-bar { width: 180px; height: 4px; margin: 18px auto 0; background: #e6e8f3; border-radius: 4px; overflow: hidden; }
.preloader-bar span {
  display: block; width: 40%; height: 100%;
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-red));
  animation: preloader-slide 1.1s ease-in-out infinite;
}
@keyframes preloader-pop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes preloader-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) {
  .preloader-inner img, .preloader-bar span { animation: none; }
}

/* ---------- Top bar + navbar ---------- */
.topbar { background: var(--brand-navy); color: rgba(255,255,255,.85); font-size: .85rem; padding: 7px 0; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #ffd2d2; }

.main-nav { background: #fff; box-shadow: 0 2px 18px rgba(14,20,113,.08); padding: 8px 0; }
.main-nav .brand-logo { height: 54px; width: auto; }
.main-nav .nav-link { color: var(--brand-navy) !important; font-weight: 500; padding: 8px 12px !important; position: relative; }
.main-nav .nav-link::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--brand-red); transform: scaleX(0); transition: transform .2s ease;
}
.main-nav .nav-link:hover::after, .main-nav .nav-link.active::after { transform: scaleX(1); }
.main-nav .nav-link.active { color: var(--brand-red) !important; }
.main-nav .navbar-toggler { border: 0; color: var(--brand-navy); font-size: 1.4rem; }
.main-nav .navbar-toggler:focus { box-shadow: none; }

/* ---------- Buttons ---------- */
.btn-primary { --bs-btn-bg: var(--brand-navy); --bs-btn-border-color: var(--brand-navy); --bs-btn-hover-bg: var(--brand-navy-dark); --bs-btn-hover-border-color: var(--brand-navy-dark); --bs-btn-active-bg: var(--brand-navy-dark); }
.btn-danger { --bs-btn-bg: var(--brand-red); --bs-btn-border-color: var(--brand-red); --bs-btn-hover-bg: var(--brand-red-dark); --bs-btn-hover-border-color: var(--brand-red-dark); --bs-btn-active-bg: var(--brand-red-dark); }
.btn-outline-primary { --bs-btn-color: var(--brand-navy); --bs-btn-border-color: var(--brand-navy); --bs-btn-hover-bg: var(--brand-navy); --bs-btn-hover-border-color: var(--brand-navy); }
.btn { border-radius: 10px; }

/* ---------- Sections ---------- */
.hero-section {
  background:
    linear-gradient(120deg, rgba(8,12,74,.92) 0%, rgba(14,20,113,.82) 55%, rgba(201,12,12,.55) 100%),
    url('https://images.unsplash.com/photo-1581092580497-e0d23cbdf1dc?auto=format&fit=crop&w=1400&q=80') center/cover;
  min-height: 580px; color: #fff;
}
.page-header {
  background: linear-gradient(120deg, var(--brand-navy-dark), var(--brand-navy) 60%, var(--brand-red));
  color: #fff; padding: 56px 0 48px;
}
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: #ffd2d2; margin-bottom: 8px; }
.section-title { color: var(--brand-navy); font-weight: 800; margin-bottom: 24px; position: relative; }
.text-center > .section-title::after {
  content: ''; display: block; width: 64px; height: 4px; border-radius: 4px;
  margin: 14px auto 0; background: linear-gradient(90deg, var(--brand-navy) 50%, var(--brand-red) 50%);
}

/* ---------- Cards ---------- */
.card { border-radius: 16px; box-shadow: 0 8px 30px rgba(14,20,113,.07); border: 0; }
.product-card, .category-card { transition: transform .2s ease, box-shadow .2s ease; overflow: hidden; }
.product-card:hover, .category-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(14,20,113,.14); }
.product-card img, .category-card img { height: 220px; object-fit: cover; border-radius: 16px 16px 0 0; }
.enquiry-card { border-top: 5px solid var(--brand-red); margin-top: -40px; }
.enquiry-card .input-group-text { background: #fff; color: var(--brand-navy); }
.form-control:focus, .form-select:focus { border-color: var(--brand-navy); box-shadow: 0 0 0 .2rem rgba(14,20,113,.15); }
.form-label { font-weight: 500; color: var(--brand-navy); }

.stat-box { background: linear-gradient(135deg, var(--brand-navy-dark), var(--brand-navy)); color: #fff; border-radius: 16px; padding: 20px; }

/* ---------- Footer ---------- */
.footer { background: var(--brand-navy-dark); color: rgba(255,255,255,.85); padding: 60px 0 20px; border-top: 5px solid var(--brand-red); }
.footer-logo { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; }
.footer-logo img { width: 52px; height: 52px; border-radius: 12px; background: #fff; padding: 4px; }
.footer .text-brand-red { color: #ff5a5a !important; }
.footer a.text-white-50:hover { color: #fff !important; }
.whatsapp-float { z-index: 1000; }

/* ---------- Admin ---------- */
.admin-body { background: var(--surface); }
.sidebar { background: var(--brand-navy-dark); min-height: 100vh; }
.sidebar a { color: #dfe3f8; text-decoration: none; }
.sidebar .nav-link { border-radius: 8px; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; }
.sidebar-brand img { width: 44px; height: 44px; background: #fff; border-radius: 10px; padding: 3px; }
.sidebar-brand b { display: block; color: #fff; letter-spacing: .05em; }
.sidebar-brand small { display: block; color: #ff8a8a; font-size: .75rem; }
.admin-main { background: var(--surface); }
.badge-new { background: var(--brand-navy); }
.badge-contacted { background: #268b32; }
.badge-follow-up { background: #f59e0b; }
.badge-closed { background: #6b7280; }

/* Admin login */
.login-wrap { min-height: 100vh; display: flex; }
.login-brand {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--brand-navy-dark), var(--brand-navy) 60%, var(--brand-red));
  color: #fff; padding: 40px; text-align: center;
}
.login-brand img { width: 220px; background: #fff; border-radius: 50%; padding: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-form { flex: 1; display: flex; align-items: center; justify-content: center; background: #fff; padding: 40px 24px; }
.login-form .inner { width: 100%; max-width: 400px; }

@media (max-width: 991px) {
  .login-brand { display: none; }
}
@media (max-width: 768px) {
  .hero-section { min-height: 480px; }
  .main-nav .brand-logo { height: 42px; }
  .enquiry-card { margin-top: -24px; }
}

/* ==========================================================
   MOTION & MODERN UI
   ========================================================== */
html { scroll-behavior: smooth; }
#scrollProgress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; background: linear-gradient(90deg, var(--brand-navy), var(--brand-red)); }
.main-nav { transition: padding .3s ease, box-shadow .3s ease, background .3s ease; }
.main-nav.scrolled { padding: 2px 0; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); box-shadow: 0 8px 30px rgba(14,20,113,.12); }
.main-nav .brand-logo { transition: height .3s ease; }
.main-nav.scrolled .brand-logo { height: 44px; }

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--delay, 0s); }
[data-reveal="left"] { transform: translateX(-48px); }
[data-reveal="right"] { transform: translateX(48px); }
[data-reveal].in-view { opacity: 1; transform: none; }

/* Hero entrance */
.anim-up { opacity: 0; transform: translateY(26px); animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--d, 0s) + .5s); }
.anim-zoom { opacity: 0; transform: scale(.85); animation: zoomIn 1s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--d, 0s) + .5s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes zoomIn { to { opacity: 1; transform: none; } }

/* Hero */
.hero-modern {
  position: relative; overflow: hidden; color: #fff;
  padding: 110px 0 150px;
  background: linear-gradient(125deg, var(--brand-navy-dark), var(--brand-navy) 45%, #3a1170 75%, var(--brand-red));
  background-size: 220% 220%;
  animation: gradientShift 14s ease infinite;
}
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45; animation: floatBlob 12s ease-in-out infinite; }
.blob-1 { width: 380px; height: 380px; background: #ff3b3b; top: -120px; right: -80px; }
.blob-2 { width: 300px; height: 300px; background: #3d4bff; bottom: -60px; left: -100px; animation-delay: -4s; }
.blob-3 { width: 200px; height: 200px; background: #ff8a3d; top: 40%; left: 45%; opacity: .25; animation-delay: -8s; }
@keyframes floatBlob { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(30px,-40px) scale(1.08); } 66% { transform: translate(-20px,20px) scale(.95); } }
.hero-chip { display: inline-block; padding: 8px 16px; border-radius: 50px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px); font-size: .9rem; margin-bottom: 20px; }
.hero-title { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.1; margin-bottom: 18px; }
.text-gradient { background: linear-gradient(90deg, #ffd0d0, #ff5a5a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.15rem; font-weight: 600; opacity: .95; }
.hero-sub .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff5a5a; margin: 0 10px 3px; }
.hero-text { opacity: .8; max-width: 560px; margin-bottom: 28px; }
.hero-stats { display: flex; gap: 36px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 2rem; font-weight: 800; }
.hero-stats span { font-size: .85rem; opacity: .75; }
.btn-glow { box-shadow: 0 10px 30px rgba(201,12,12,.45); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 0%,100% { box-shadow: 0 10px 30px rgba(201,12,12,.45); } 50% { box-shadow: 0 10px 45px rgba(255,60,60,.75); } }
.hero-visual { position: relative; width: min(520px, 100%); aspect-ratio: 1 / 1; margin: 0 auto; }
/* whole logo fits inside the white circle (padding keeps text away from the curved edge) */
.hero-visual::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: #fff; box-shadow: 0 30px 70px rgba(0,0,0,.35); animation: bob 5s ease-in-out infinite; }
.hero-visual img { position: absolute; left: 50%; top: 50%; width: 70%; height: auto; transform: translate(-50%, -50%); animation: bobCenter 5s ease-in-out infinite; }
@keyframes bobCenter { 0%,100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 14px)); } }
.hero-visual .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(255,255,255,.4); animation: spin 30s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.float-card { position: absolute; background: #fff; color: var(--brand-navy); font-weight: 600; font-size: .85rem; padding: 10px 14px; border-radius: 12px; box-shadow: 0 14px 30px rgba(0,0,0,.2); white-space: nowrap; animation: bob 4s ease-in-out infinite; }
.float-card i { color: var(--brand-red); margin-right: 6px; }
.fc-1 { top: 6%; left: -6%; }
.fc-2 { bottom: 3%; right: -4%; animation-delay: -1.3s; }
.fc-3 { bottom: -1%; left: 4%; animation-delay: -2.6s; }
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 90px; }
.hero-wave path { fill: var(--surface); }

/* Marquee */
.marquee { background: var(--brand-red); color: #fff; overflow: hidden; padding: 14px 0; font-weight: 600; }
.marquee-track { display: inline-flex; gap: 48px; white-space: nowrap; animation: marquee 28s linear infinite; padding-left: 48px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Feature cards */
.feature-card { background: #fff; border-radius: 18px; padding: 30px 26px; box-shadow: 0 8px 30px rgba(14,20,113,.06); position: relative; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.feature-card::before { content: ''; position: absolute; left: 0; top: 0; height: 4px; width: 0; background: linear-gradient(90deg, var(--brand-navy), var(--brand-red)); transition: width .4s ease; }
.feature-card:hover { transform: translateY(-8px); box-shadow: 0 20px 45px rgba(14,20,113,.14); }
.feature-card:hover::before { width: 100%; }
.feature-icon { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--brand-navy), #3340c9); margin-bottom: 18px; transition: transform .4s ease, background .4s ease; }
.feature-card:hover .feature-icon { transform: rotate(-8deg) scale(1.1); background: linear-gradient(135deg, var(--brand-red), #ff4d4d); }

/* About */
.eyebrow-dark { display: inline-block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--brand-red); margin-bottom: 6px; }
.about-visual { position: relative; max-width: 420px; margin: 0 auto; }
.about-visual img { width: 100%; border-radius: 28px; box-shadow: 0 30px 60px rgba(14,20,113,.18); }
.about-visual::before { content: ''; position: absolute; inset: 24px -24px -24px 24px; border-radius: 28px; border: 3px solid var(--brand-red); z-index: -1; }
.about-badge { position: absolute; bottom: -20px; right: -10px; background: var(--brand-navy); color: #fff; border-radius: 18px; padding: 16px 22px; box-shadow: 0 16px 40px rgba(14,20,113,.3); animation: bob 5s ease-in-out infinite; }
.about-badge b { display: block; font-size: 2rem; line-height: 1; }
.about-badge span { font-size: .8rem; opacity: .8; }
.check-list { list-style: none; padding: 0; margin: 18px 0; }
.check-list li { padding: 6px 0 6px 32px; position: relative; }
.check-list li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(201,12,12,.1); color: var(--brand-red); font-size: .7rem; display: grid; place-items: center; }
.section-title.text-start::after { display: none; }

/* Category tiles */
.cat-tile { display: block; position: relative; border-radius: 20px; overflow: hidden; height: 280px; text-decoration: none; box-shadow: 0 10px 30px rgba(14,20,113,.1); }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.cat-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(8,12,74,.92)); transition: background .4s ease; }
.cat-tile:hover::after { background: linear-gradient(180deg, rgba(201,12,12,.15) 0%, rgba(8,12,74,.95)); }
.cat-tile:hover img { transform: scale(1.1); }
.cat-tile-body { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; color: #fff; }
.cat-tile-body h5 { font-weight: 700; margin-bottom: 4px; }
.cat-tile-body span { font-size: .85rem; opacity: .85; display: inline-block; transition: transform .3s ease; }
.cat-tile:hover .cat-tile-body span { transform: translateX(6px); color: #ffb3b3; }

/* Product cards */
.img-zoom { position: relative; overflow: hidden; border-radius: 16px 16px 0 0; }
.img-zoom img { transition: transform .6s ease; border-radius: 0 !important; width: 100%; }
.product-card:hover .img-zoom img { transform: scale(1.08); }
.img-zoom .tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.95); color: var(--brand-navy); font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 30px; }
.product-card img { transition: transform .6s ease; }

/* Stats band */
.stats-band { background: linear-gradient(120deg, var(--brand-navy-dark), var(--brand-navy)); color: #fff; padding: 60px 0; position: relative; overflow: hidden; }
.stats-band::before { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: rgba(201,12,12,.35); filter: blur(80px); top: -200px; right: 10%; }
.stats-band b { display: block; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; position: relative; }
.stats-band span { opacity: .75; position: relative; }

/* Gallery */
.gallery-tile { position: relative; overflow: hidden; border-radius: 18px; height: 250px; box-shadow: 0 10px 30px rgba(14,20,113,.1); }
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease, filter .4s ease; }
.gallery-tile:hover img { transform: scale(1.1); filter: brightness(.7); }
.gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; color: #fff; font-weight: 600; transform: translateY(100%); transition: transform .35s ease; background: linear-gradient(transparent, rgba(8,12,74,.85)); }
.gallery-tile:hover .gallery-cap { transform: none; }

/* CTA */
.cta-box { border-radius: 24px; padding: 44px; color: #fff; background: linear-gradient(120deg, var(--brand-red), #8f0a3c 60%, var(--brand-navy)); background-size: 200% 200%; animation: gradientShift 10s ease infinite; box-shadow: 0 25px 60px rgba(201,12,12,.25); }

/* Generic hover lift for buttons & cards site-wide */
.btn { transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
main .card { transition: transform .3s ease, box-shadow .3s ease; }
main .card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(14,20,113,.12); }
.page-header { background-size: 200% 200%; animation: gradientShift 12s ease infinite; }
.page-header h1 { animation: fadeUp .8s ease both; animation-delay: .5s; }

/* Back to top + WhatsApp pulse */
#toTop { position: fixed; right: 26px; bottom: 100px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--brand-navy); color: #fff; box-shadow: 0 10px 25px rgba(14,20,113,.3); opacity: 0; transform: translateY(20px); pointer-events: none; transition: all .3s ease; z-index: 1000; }
#toTop.show { opacity: 1; transform: none; pointer-events: auto; }
#toTop:hover { background: var(--brand-red); }
.whatsapp-float::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #25d366; z-index: -1; animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.8); opacity: 0; } }

@media (max-width: 991px) {
  .hero-modern { padding: 70px 0 120px; }
  .hero-stats { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal], .anim-up, .anim-zoom { opacity: 1 !important; transform: none !important; }
}

/* QR enquiry admin page */
.qr-box { background: #fff; padding: 18px; border-radius: 18px; display: inline-block; box-shadow: 0 10px 30px rgba(14,20,113,.12); border: 3px solid var(--brand-navy); }
.qr-box canvas, .qr-box img { display: block; }
.badge-source-qr { background: var(--brand-red); }
.badge-source-website { background: var(--brand-navy); }
