/* 1. DEFINE THE FONT VARIATIONS */

/* Regular */
@font-face {
  font-family: "Segoe UI This";
  src: url("../fonts/segoeuithis.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Italic */
@font-face {
  font-family: "Segoe UI This";
  src: url("../fonts/segoeuithisi.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Bold */
@font-face {
  font-family: "Segoe UI This";
  src: url("../fonts/segoeuithibd.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Bold Italic */
@font-face {
  font-family: "Segoe UI This";
  src: url("../fonts/segoeuithisz.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* =========================
     COLORS
  ========================= */

  --primary-color: #ffffff;

  --theme-color-1: #000a1a;
  --theme-color-2: #163c66;
  --theme-color-3: #de4049;
  --theme-color-4: #f6c134;
  --theme-color-5: #0950b3;
  --theme-color-6: #31a400;
  --theme-color-7: #ffde59;
  --theme-color-8: #8690db;

  --theme-color-9: #e9f2ff;
  --theme-color-10: #b3c7e6;
  --theme-color-11: #ccd8eb;
  --theme-color-12: #4488ae;
  --theme-color-13: #163b65;
  --theme-color-14: #fff2e3;
  --theme-color-15: #f9f5ff;
  --theme-color-16: #ffbf00;
  --theme-color-17: #fdd82e;


  /* =========================
     GRADIENTS
  ========================= */

  /* #0950b3 → #b3c7e6 */
  --bg-gradient-theme-5_10: linear-gradient(
    180deg,
    var(--theme-color-5) 0%,
    var(--theme-color-10) 100%
  );

  /* #e9f2ff → #b3c7e6 */
  --bg-gradient-theme-9_primary: linear-gradient(
    180deg,
    var(--theme-color-9) 0%,
    var(--primary-color) 100%
  );
  
  /* #e9f2ff → #b3c7e6 */
  --bg-gradient-theme-9_10: linear-gradient(
    180deg,
    var(--theme-color-9) 0%,
    var(--theme-color-10) 100%
  );

  /* #b3c7e6 → #ccd8eb */
  --bg-gradient-theme-10_11: linear-gradient(
    180deg,
    var(--theme-color-10) 0%,
    var(--theme-color-11) 100%
  );

  /* #4488ae → #163b65 */
  --bg-gradient-theme-12_13: linear-gradient(
    90deg,
    var(--theme-color-12) 0%,
    var(--theme-color-13) 100%
  );

  /* #ffffff → #fff2e3 */
  --bg-gradient-primary_14: linear-gradient(
    180deg,
    var(--primary-color) 0%,
    var(--theme-color-14) 100%
  );

  /* #ffffff → #f9f5ff */
  --bg-gradient-primary_15: linear-gradient(
    180deg,
    var(--primary-color) 0%,
    var(--theme-color-15) 100%
  );

  /* #ffbf00 → #fdd82e */
  --bg-gradient-theme-16_17: linear-gradient(
    90deg,
    var(--theme-color-16) 0%,
    var(--theme-color-17) 100%
  );

  /* =========================
     FONTS
  ========================= */
  --primary-font: "Segoe UI This", sans-serif;

  /* Base font */
  --primary-font-size: clamp(0.9rem, 1vw + 0.5rem, 1.125rem);

  /* Headings */
  --h1-font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
  --h2-font-size: clamp(1.75rem, 4vw + 0.5rem, 3rem);
  --h3-font-size: clamp(1.5rem, 3vw + 0.5rem, 2.5rem);
  --h4-font-size: clamp(1.25rem, 2.5vw + 0.25rem, 2rem);
  --h5-font-size: clamp(1.1rem, 2vw, 1.5rem);
  --h6-font-size: clamp(1rem, 1.5vw, 1.25rem);

  /* =========================
     GENERAL UI VARIABLES
  ========================= */

  --text-color: var(--theme-color-1);
  --heading-color: var(--theme-color-1);
  --body-bg-color: var(--primary-color);

  --border-color: var(--theme-color-11);

  --link-color: var(--theme-color-5);
  --link-hover-color: var(--theme-color-2);

  --success-color: var(--theme-color-6);
  --danger-color: var(--theme-color-3);
  --warning-color: var(--theme-color-4);
}

/* 2. APPLY THE FONT TO YOUR PAGE */

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--primary-font);
  font-weight: 400;
  font-style: normal;
  font-size: var(--primary-font-size);
  min-width: 320px;
  background: var(--bg-gradient-primary_14);
}

.bg-pattern {
  background-image: url(../imgs/bg-pattern.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ============================================
   B2B BUTTONS — fill-sweep hover animation
   ============================================ */
.ce-btn {
  --_base: var(--theme-color-3);
  --_hover: var(--theme-color-2);
  --_text-base: var(--primary-color);
  --_text-hover: var(--primary-color);

  position: relative;
  z-index: 1;
  overflow: hidden;
  display: inline-block;

  background: var(--_base) !important;
  color: var(--_text-base);
  border: none !important;
  padding: 0.6rem 1.2rem;
  border-radius: 200px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;

  transition: color 0s ease 0.1s;
}

/* Prevent legacy hover rules overriding */
.ce-btn:hover,
.ce-btn:focus,
.ce-btn:target {
  background: var(--_base) !important;
  color: var(--_text-hover);
}

.ce-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  left: auto;
  width: 0%;
  z-index: -1;

  background: var(--_hover);
  transition: width 0.4s ease;
}

.ce-btn:hover::before,
.ce-btn:focus::before,
.ce-btn:target::before {
  width: 100%;
}

/* ============================================
   BUTTON VARIANTS
   ============================================ */

/* white → navy */
.ce-btn-white-navy {
  --_base: var(--primary-color);
  --_hover: var(--theme-color-2);
  --_text-base: var(--theme-color-2);
  --_text-hover: var(--primary-color);
}

/* yellow → green */
.ce-btn-yellow-green   {
  --_base: var(--bg-gradient-theme-16_17);
  --_hover: var(--theme-color-6);
  --_text-base: var(--theme-color-2);
  --_text-hover: var(--primary-color);
}

/* green → pink */
.ce-btn-green-pink   {
  --_base: var(--theme-color-6);
  --_hover: var(--theme-color-3);
  --_text-base: var(--primary-color);
  --_text-hover: var(--primary-color);
}

/* =========================================================
   HEADER / NAV
========================================================= */
.ce-hdr-navbar {
  background: var(--primary-color);
}

.ce-hdr-logo {
  height: 60px;
  width: fit-content;
}

/*
 * Scoped with the parent class so the fixed logo height wins over
 * WooCommerce's ".woocommerce-page img { height: auto }" rule (which is more
 * specific than a single class) without resorting to !important.
 */
.ce-hdr-logo .ce-hdr-logo-img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Nav links */
.ce-hdr-nav-link {
  color: var(--theme-color-2);
  font-weight: 500;
  transition: color 0.2s ease;
}

.ce-hdr-nav-link:hover,
.ce-hdr-nav-link.active {
  color: var(--theme-color-5);
}

/* Cart (now standalone, outside the ul) */
.ce-hdr-mobile-actions {
  overflow: visible;
}

.ce-hdr-cart-link {
  position: relative;
  color: var(--theme-color-2);
  font-size: 2.3rem;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
}

.ce-hdr-cart-link:hover {
  color: var(--theme-color-5);
}

/* Cart item count badge (notification bubble on the cart icon). */
.ce-hdr-cart-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 200px;
  background: var(--theme-color-3);
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--primary-color);
  pointer-events: none;
  z-index: 2;
}

/* Hide the bubble when the cart is empty. */
.ce-hdr-cart-count--empty {
  display: none;
}

.ce-hdr-toggler {
  padding: 0.25rem 0.5rem;
  border-color: var(--theme-color-11);
}

/* Search bar */
.ce-hdr-search-container {
  max-width: 300px;
  width: 100%;
}

.ce-hdr-search-container form {
  background: var(--theme-color-9);
  border-radius: 200px;
  padding: 0.3rem 0.3rem 0.3rem 1.25rem;
}

.ce-hdr-search-input {
  flex: 1;
  background: transparent !important;
  font-size: var(--primary-font-size);
  color: var(--theme-color-1);
}

.ce-hdr-search-input:focus {
  outline: none;
  box-shadow: none;
}

.ce-hdr-search-input::placeholder {
  color: #8896ab;
}

.ce-hdr-search-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--theme-color-1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.ce-hdr-search-btn:hover {
  color: var(--theme-color-5);
}

/* =========================================================
   RESPONSIVE / MOBILE FIXES
========================================================= */
@media (max-width: 991.98px) {
  .ce-hdr-logo {
    height: 50px;
  }

  .ce-hdr-search-container {
    max-width: 100%;
  }
}

/* =========================================================
   MEDIA SAFETY NET
   Editor / widget / comment images are kept inside their
   container and keep their aspect ratio so nothing ever
   renders oversized. Fixed-size UI images (the logo and the
   cover-cropped card/hero thumbnails) opt out via their own,
   more specific rules, so they are unaffected.
========================================================= */
.entry-content img,
.ce-sglblg-content img,
.wp-block-image img,
.widget img,
.comment-content img,
.wp-caption img,
figure.wp-block-image > img {
  max-width: 100%;
  height: auto;
}

/* WordPress alignment helpers stay responsive too. */
.entry-content .alignleft,
.entry-content .alignright {
  max-width: 50%;
  height: auto;
}

@media (max-width: 575.98px) {
  .entry-content .alignleft,
  .entry-content .alignright {
    float: none;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}
