/* ==============================================================================
   Glossier Cosmetics — Official Redesign Stylesheet
   (Top Announcement Bar, Navigation Header, Hero Banner, Typography)
   ============================================================================== */

/* 1. Official Fonts (Apercu Suite) */
@font-face {
  font-family: 'Apercu';
  font-weight: 300;
  font-style: normal;
  src: url('../fonts/Apercu-Light.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Apercu';
  font-weight: 400;
  font-style: normal;
  src: url('../fonts/Apercu-Regular.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Apercu';
  font-weight: 500;
  font-style: normal;
  src: url('../fonts/Apercu-Medium.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Apercu';
  font-weight: 700;
  font-style: normal;
  src: url('../fonts/Apercu-Bold.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Apercu Mono';
  font-weight: 400;
  font-style: normal;
  src: url('../fonts/Apercu-Mono.woff2') format('woff2');
  font-display: swap;
}

:root {
  --gl-font-body: 'Apercu', 'Gill Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gl-font-mono: 'Apercu Mono', monospace;
  --gl-promo-height: 32px;
  --gl-header-height: 40px;
  --gl-color-black: #000000;
  --gl-color-white: #ffffff;
  --gl-color-gray-btn: #e8e8e8;
  --gl-color-border: rgba(0, 0, 0, 0.06);
}

/* Base Body Overrides for Smooth Typography */
body {
  font-family: var(--gl-font-body) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  color: var(--gl-color-black);
}

/* ==============================================================================
   2. Top Announcement Bar
   ============================================================================== */
.gl-promo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--gl-promo-height);
  background-color: var(--gl-color-black);
  color: var(--gl-color-white);
  z-index: 1040;
  display: flex;
  align-items: center;
  transition: top 0.2s ease-in-out;
}

.gl-promo-bar__container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.gl-promo-bar__text {
  font-family: var(--gl-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 18.4px;
  letter-spacing: 0;
  margin: 0;
  color: var(--gl-color-white);
}

.gl-promo-bar__text a {
  color: var(--gl-color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gl-promo-bar__text a:hover {
  color: var(--gl-color-white);
}

/* ==============================================================================
   3. Main Header & Navigation
   ============================================================================== */
.gl-header {
  position: fixed;
  top: var(--gl-promo-height);
  left: 0;
  right: 0;
  height: var(--gl-header-height);
  background-color: var(--gl-color-white);
  border-bottom: 1px solid var(--gl-color-border);
  z-index: 1030;
  font-family: var(--gl-font-body);
  transition: top 0.2s ease-in-out;
}

.gl-header__container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 3-Column Flex Alignment */
.gl-header__col {
  display: flex;
  align-items: center;
  flex: 1 1 0%;
}

.gl-header__col--left {
  justify-content: flex-start;
}

.gl-header__col--center {
  justify-content: center;
}

.gl-header__col--right {
  justify-content: flex-end;
}

/* Logo with Iconic Hover Micro-Interaction */
.gl-logo {
  display: inline-block;
  overflow: hidden;
  height: 17px;
  text-decoration: none !important;
}

.gl-logo__wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateY(0);
  transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}

.gl-logo:hover .gl-logo__wrapper {
  transform: translateY(-17px);
}

.gl-logo__main,
.gl-logo__hover {
  display: flex;
  align-items: center;
  height: 17px;
}

.gl-logo__svg {
  display: block;
  width: 78px;
  height: 17px;
}

.gl-logo__hover-text {
  font-family: var(--gl-font-body);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--gl-color-black);
  letter-spacing: 0.02em;
  line-height: 17px;
}

/* Center Desktop Navigation */
.gl-nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gl-nav__item {
  margin: 0 10px;
  white-space: nowrap;
}

.gl-nav__link {
  display: inline-block;
  color: var(--gl-color-black) !important;
  font-family: var(--gl-font-body);
  font-size: 12px;
  font-weight: 400;
  line-height: 19.6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease-in-out;
}

.gl-nav__link:hover {
  border-bottom-color: var(--gl-color-black);
}

/* Right Utilities Block */
.gl-utilities {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 16px;
}

.gl-utilities__item {
  display: flex;
  align-items: center;
  position: relative;
}

.gl-utility-btn,
.gl-utility-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--gl-color-black) !important;
  font-family: var(--gl-font-body);
  font-size: 12px;
  font-weight: 400;
  line-height: 19.6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease-in-out;
}

.gl-utility-link:hover {
  border-bottom-color: var(--gl-color-black);
}

.gl-utility-btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.gl-utility-btn--icon svg {
  display: block;
}

/* OpenCart Cart Integration */
#gl-cart-widget {
  position: relative;
}

#gl-cart-widget #cart {
  margin: 0;
  padding: 0;
}

#gl-cart-widget #cart > button {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--gl-color-black) !important;
  font-family: var(--gl-font-body) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 19.6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  border-bottom: 1px solid transparent !important;
  cursor: pointer !important;
  outline: none !important;
}

#gl-cart-widget #cart > button:hover {
  border-bottom-color: var(--gl-color-black) !important;
}

#gl-cart-widget #cart > ul.dropdown-menu {
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  min-width: 340px;
  border: 1px solid var(--gl-color-border);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 16px;
  background: var(--gl-color-white);
}

/* Glossier Interactive Search Bar */
.gl-search-overlay {
  position: absolute;
  top: var(--gl-header-height);
  left: 0;
  right: 0;
  background: var(--gl-color-white);
  border-bottom: 1px solid var(--gl-color-border);
  padding: 12px 16px;
  display: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.gl-search-overlay.is-open {
  display: block;
}

.gl-search-overlay-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.gl-search-form {
  flex: 1;
  margin: 0;
  display: flex;
  align-items: center;
  position: relative;
}

.gl-search-input {
  width: 100%;
  height: 38px;
  border: 1px solid #000000;
  border-radius: 0;
  padding: 0 40px 0 14px;
  font-family: var(--gl-font-body);
  font-size: 14px;
  outline: none;
  color: #000000;
}

.gl-search-submit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gl-search-close {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 14px;
  font-size: 24px;
  line-height: 1;
  color: #000000;
  padding: 4px 8px;
}

/* ==============================================================================
   4. Hero Banner Section
   ============================================================================== */
.gl-hero {
  position: relative;
  width: 100%;
  margin-top: calc(var(--gl-promo-height) + var(--gl-header-height));
  overflow: hidden;
  background-color: #f7f7f7;
}

.gl-hero__link {
  display: block;
  width: 100%;
  text-decoration: none;
}

.gl-hero__picture {
  display: block;
  width: 100%;
}

.gl-hero__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Floating Content Card */
.gl-hero__card {
  position: absolute;
  top: 56px;
  left: 16px;
  background-color: var(--gl-color-white);
  padding: 20px 24px;
  max-width: 390px;
  width: calc(100% - 32px);
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.gl-hero__card-title {
  font-family: var(--gl-font-body);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  color: var(--gl-color-black);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.gl-hero__card-desc {
  font-family: var(--gl-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 19.6px;
  color: var(--gl-color-black);
  margin: 0 0 18px 0;
}

.gl-hero__card-desc strong {
  font-weight: 700;
}

.gl-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 40px;
  padding: 8px 24px;
  background-color: var(--gl-color-gray-btn);
  color: var(--gl-color-black);
  font-family: var(--gl-font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.026px;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid #000000;
  box-sizing: border-box;
  outline: none;
  user-select: none;
}

@-webkit-keyframes marching-ants-full-1 {
  0% {
    background-position: 0 0, 0 100%, 0 0, 100% 0;
  }
  100% {
    background-position: 10px 0, -10px 100%, 0 -10px, 100% 10px;
  }
}

@keyframes marching-ants-full-1 {
  0% {
    background-position: 0 0, 0 100%, 0 0, 100% 0;
  }
  100% {
    background-position: 10px 0, -10px 100%, 0 -10px, 100% 10px;
  }
}

.gl-btn-primary:hover,
.gl-btn-primary:focus {
  border-color: transparent;
  background-color: var(--gl-color-gray-btn);
  color: var(--gl-color-black);
  background-size: 5px 1px, 5px 1px, 1px 5px, 1px 5px;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-image: 
    linear-gradient(to right, #000000 50%, transparent 50%), 
    linear-gradient(to right, #000000 50%, transparent 50%), 
    linear-gradient(to bottom, #000000 50%, transparent 50%), 
    linear-gradient(to bottom, #000000 50%, transparent 50%);
  -webkit-animation: 1.5s linear infinite marching-ants-full-1;
  animation: 1.5s linear infinite marching-ants-full-1;
}

.common-home #slideshow0,
.common-home .slideshow {
  display: none !important;
}

/* ==============================================================================
   5. Mobile Drawer Menu & Responsive Controls
   ============================================================================== */
.gl-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 85%;
  background-color: var(--gl-color-white);
  z-index: 1060;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.gl-mobile-drawer.is-open {
  transform: translateX(0);
}

.gl-mobile-drawer__header {
  padding: 16px;
  border-bottom: 1px solid var(--gl-color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gl-mobile-drawer__close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.gl-mobile-drawer__body {
  padding: 20px 16px;
  overflow-y: auto;
  flex: 1;
}

.gl-mobile-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gl-mobile-drawer__item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.gl-mobile-drawer__link {
  display: block;
  padding: 14px 0;
  font-family: var(--gl-font-body);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--gl-color-black) !important;
  text-decoration: none !important;
  letter-spacing: 0.04em;
}

.gl-mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1050;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gl-mobile-drawer-backdrop.is-open {
  display: block;
  opacity: 1;
}

/* Responsive Breakpoints */
.gl-desktop-only {
  display: flex !important;
}

.gl-mobile-only {
  display: none !important;
}

@media (max-width: 1024px) {
  .gl-desktop-only {
    display: none !important;
  }
  .gl-mobile-only {
    display: inline-flex !important;
  }
}

@media (max-width: 767px) {
  :root {
    --gl-promo-height: 24px;
  }

  .gl-promo-bar__container {
    padding: 0 12px;
  }

  .gl-promo-bar__text {
    font-size: 12px;
    line-height: 16px;
  }

  .gl-header__container {
    padding: 0 12px;
  }

  .gl-hero {
    margin-top: calc(var(--gl-promo-height) + var(--gl-header-height));
  }

  .gl-hero__card {
    top: 20px;
    left: 12px;
    padding: 14px 16px;
    width: calc(100% - 24px);
    max-width: 368px;
  }

  .gl-hero__card-title {
    font-size: 18px;
    line-height: 25.2px;
  }

  .gl-hero__card-desc {
    font-size: 13px;
    line-height: 18px;
    margin-bottom: 14px;
  }

  .gl-btn-primary {
    height: 42px;
    padding: 6px 18px;
  }
}
