/* Adore Me Clone - Custom UI/UX Enhancements & Styles */

/* Font Definitions */
@font-face {
  font-family: 'amsans';
  font-display: swap;
  src: url('/fonts/jost.woff2') format('woff2');
}
@font-face {
  font-family: 'amserif';
  font-display: swap;
  src: url('/fonts/cortese-sans-regular.woff2') format('woff2');
  font-weight: 400 600;
}
@font-face {
  font-family: 'amserif';
  font-display: swap;
  src: url('/fonts/cortese-sans-bold.woff2') format('woff2');
  font-weight: 700 900;
}
@font-face {
  font-family: 'amserif';
  font-display: swap;
  src: url('/fonts/cortese-sans-thin.woff2') format('woff2');
  font-weight: 100 300;
}
@font-face {
  font-family: 'amscript';
  font-display: swap;
  src: url('/fonts/instrument-serif.woff2') format('woff2');
}
@font-face {
  font-family: 'Tiempos';
  font-display: swap;
  src: url('/fonts/tiempos-fine-web-medium.woff2') format('woff2');
  font-weight: 500;
}

/* Ensure Desktop Mega Menu visibility on active / hover */
@media (min-width: 992px) {
  .nav-group.--level-1 {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-top: 1px solid #eaeaea;
    z-index: 999;
    padding: 24px 40px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
  }
  
  .nav-group.--level-1.--active,
  .nav-group.--level-1.--active-hover {
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }

  .nav-group.--level-1 > .nav-group__content {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
  }

  .nav-group.--level-1 .nav-group {
    min-width: 180px;
  }

  .nav-group.--level-1 label.nav-item {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1a1a1a;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    display: block;
  }

  .nav-group.--level-1 a.nav-item {
    font-size: 14px;
    color: #555555;
    padding: 6px 0;
    display: block;
    transition: color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
  }

  .nav-group.--level-1 a.nav-item:hover {
    color: #000000;
    transform: translateX(3px);
  }
}

/* Mobile Sidebar Drawer */
body.--sidebar {
  overflow: hidden;
}

body.--sidebar .sidebar {
  transform: translateX(0) !important;
  box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  display: block !important;
}

body.--sidebar .sidebar-shadow {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.sidebar {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 10000 !important;
}

.sidebar-shadow {
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
  z-index: 9999 !important;
}

/* Interactive Modals and Drawers */
.am-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.am-modal-overlay.--open {
  opacity: 1;
  visibility: visible;
}

.am-modal-dialog {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  position: relative;
  padding: 32px 28px;
}

.am-modal-overlay.--open .am-modal-dialog {
  transform: scale(1);
}

.am-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}
.am-modal-close:hover {
  color: #000;
  background: #f4f4f4;
}

/* Slide-over Cart Drawer */
.am-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -10px 0 35px rgba(0,0,0,0.2);
  z-index: 100000;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.am-cart-drawer.--open {
  transform: translateX(0);
}

.am-cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.am-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.am-cart-footer {
  padding: 20px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

/* Toast Notifications */
.am-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #111111;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-family: amsans, sans-serif;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.am-toast.--show {
  transform: translateY(0);
  opacity: 1;
}

/* Sticky Header styling */
.header {
  position: sticky !important;
  top: 0 !important;
  background: #ffffff !important;
  z-index: 1000 !important;
  transition: box-shadow 0.25s ease;
}
.header.--scrolled {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* Video & Media Polish */
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Smooth Link & Button Transitions */
button, a {
  cursor: pointer;
}
