/* =========================
   FONTS
========================= */

@font-face {
  font-family: "SFR";
  src: url("../font/SFPRODISPLAYREGULAR.OTF") format("opentype");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: "SFR";
  src: url("../font/SFPRODISPLAYMEDIUM.OTF") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "SFR";
  src: url("../font/SFPRODISPLAYBOLD.OTF") format("opentype");
  font-weight: 600;
  font-style: normal;
}

/* =========================
   BASE
========================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: SFR, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body.menu-open {
  overflow: hidden;
}

button,
a {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================
   NAVBAR
========================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  width: 100%;
  min-height: 64px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 12px 18px;

  background: transparent;
  color: #244c44;

  z-index: 1000;

  transition:
    top 0.28s ease,
    left 0.28s ease,
    right 0.28s ease,
    padding 0.28s ease,
    border-radius 0.28s ease,
    background 0.28s ease,
    box-shadow 0.28s ease;
}

.nav.shrink {
  top: 12px;
  left: 16px;
  right: 16px;
  width: auto;

  padding: 10px 18px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);

  border: 1px solid rgba(255, 255, 255, 0.38);

  box-shadow:
    0 10px 28px rgba(36, 76, 68, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

/* =========================
   LEFT / LOGO
========================= */

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-left {
  gap: 12px;
  min-width: 0;
}

.nav-right {
  gap: 10px;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.logos {
  display: block;
  width: auto;
  height: 38px;
  object-fit: contain;
}

/* =========================
   BUTTONS
========================= */

.menu-btn,
.cart-btn,
.profile-btn {
  width: 40px;
  height: 40px;
  place-items: center;

  border: none;
  border-radius: 999px;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.menu-btn {
  /* background: rgba(255, 255, 255, 0.48); */
  color: #244c44;
  font-size: 21px;
  line-height: 1;
}

.cart-btn {
  position: relative;
  /* background: rgba(255, 255, 255, 0.48); */
}

.profile-btn {
  background: #f1b76a;
  color: #244c44;
  font-size: 13px;
  font-weight: 800;
}

.menu-btn:active,
.cart-btn:active,
.profile-btn:active {
  transform: scale(0.94);
}

.cartico {
  width: 23px;
  height: 23px;
  object-fit: contain;
}

#cartCount {
  position: absolute;
  top: -3px;
  right: -3px;

  width: 18px;
  height: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  background-color: #244c449d;
  color: #ffffff;
  border: none;

  font-size: 10px;
  font-weight: 700;
  line-height: 1;

  border: 1px solid rgba(255, 255, 255, 0.85);
}

.mobile-menu-btn {
  display: none;
}

.desktop-menu-btn {
  display: grid;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 38px;
  padding: 0 14px;

  border-radius: 999px;

  /* background: rgba(255, 255, 255, 0.48); */
  color: #244c44;

  font-size: 14px;
  font-weight: 700;
}

/* =========================
   MINI CART + PROFILE PANEL
========================= */

.cart-wrapper,
.profile-wrapper {
  position: relative;
}

.mini-cart,
.profile-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;

  width: 300px;
  overflow-y: auto;

  display: none;
  flex-direction: column;
  gap: 14px;

  padding: 18px;

  color: #244c44;

  border: 1px solid rgba(36, 76, 68, 0.10);
  border-radius: 22px;

  box-shadow: 0 18px 44px rgba(36, 76, 68, 0.14);

  z-index: 2300;
}

.mini-cart {
  max-height: 430px;
  background: rgba(255, 253, 248, 0.96);
}

.profile-panel {
  max-height: calc(100dvh - 96px);
  background: rgba(255, 253, 248, 0.97);
}

.mini-cart.active,
.profile-panel.active {
  display: flex;
}

/* =========================
   MINI CART
========================= */

.mini-cart h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#miniCartItems {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-cart-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;

  padding: 10px 0;

  border-bottom: 1px solid rgba(36, 76, 68, 0.10);

  font-size: 14px;
}

.mini-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.mini-left span {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-left small,
.mini-empty {
  color: #6d7a75;
  font-size: 12px;
}

.mini-right {
  font-weight: 800;
  white-space: nowrap;
}

.mini-cart-footer,
.profile-footer {
  display: grid;
  gap: 10px;
}

#miniCartTotal {
  margin: 0;
  color: #244c44;
  font-weight: 900;
  font-size: 17px;
}

.mini-cart-footer button,
.profile-footer button {
  width: 100%;
  min-height: 44px;

  border: none;
  border-radius: 999px;

  background: #244c44;
  color: #fffdf8;

  font-size: 14px;
  cursor: pointer;
}

.mini-cart-footer button {
  font-weight: 800;
}

.profile-footer button {
  font-weight: 850;
}

/* =========================
   PROFILE PANEL
========================= */

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 46px;
  height: 46px;
  min-width: 46px;

  display: grid;
  place-items: center;

  border-radius: 16px;

  background: #f1b76a;
  color: #244c44;

  font-size: 17px;
  font-weight: 900;
}

.profile-info {
  min-width: 0;
}

.profile-info div:first-child {
  font-size: 15px;
  font-weight: 900;
  color: #244c44;
}

.profile-info div:last-child {
  max-width: 205px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  color: #6d7a75;

  font-size: 12px;
}

.profile-panel hr {
  width: 100%;
  margin: 0;

  border: none;
  border-top: 1px solid rgba(36, 76, 68, 0.10);
}

.section-title {
  margin: 0 0 8px;

  color: #87918d;

  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-section {
  display: grid;
  gap: 7px;
}

.profile-section a {
  min-height: 42px;

  display: flex;
  align-items: center;

  padding: 0 12px;

  border-radius: 14px;

  background: rgba(36, 76, 68, 0.045);
  color: #244c44;

  font-size: 14px;
  font-weight: 750;
}

.profile-footer {
  text-align: center;
}

.version {
  color: #8a938f;
  font-size: 11px;
}

/* =========================
   OVERLAY + SIDE MENU
========================= */

.menu-overlay {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.34);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.26s ease;

  z-index: 1500;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 0;
  left: 0;

  width: min(82vw, 330px);
  height: 100dvh;

  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 20px 16px;

  background: #fffdf8;
  color: #244c44;

  border-radius: 0 26px 26px 0;

  box-shadow: 18px 0 44px rgba(36, 76, 68, 0.16);

  transform: translateX(-105%);
  transition: transform 0.28s ease;

  overflow-y: auto;

  z-index: 2000;
}

.side-menu.active {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 10px;
}

.menu-header span {
  color: #244c44;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.menu-header button {
  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border: none;
  border-radius: 999px;

  background: rgba(36, 76, 68, 0.075);
  color: #244c44;

  font-size: 17px;
  cursor: pointer;
}

.side-menu a {
  min-height: 46px;

  display: flex;
  align-items: center;

  padding: 0 14px;

  border-radius: 16px;

  background: transparent;
  color: #244c44;

  font-size: 15px;
  font-weight: 800;
}

.side-menu a:hover {
  background: rgba(36, 76, 68, 0.06);
}

.mobile-cart-link {
  background: #244c44 !important;
  color: #fffdf8 !important;
}

.side-menu hr {
  width: 100%;
  margin: 8px 0;

  border: none;
  border-top: 1px solid rgba(36, 76, 68, 0.10);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  .nav {
    min-height: 60px;
    padding: 10px 14px;
  }

  .nav.shrink {
    top: 10px;
    left: 12px;
    right: 12px;

    padding: 10px 14px;

    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
  }

  .nav-left,
  .nav-right {
    gap: 8px;
  }

  .nav-link,
  .desktop-menu-btn {
    display: none;
  }

  .mobile-menu-btn {
    display: grid;
    order: 3;
  }

  .cart-wrapper {
    display: block;
    order: 1;
  }

  .profile-wrapper {
    order: 2;
  }

  .menu-btn,
  .cart-btn,
  .profile-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .mini-cart,
  .profile-panel {
    position: fixed;
    top: 72px;
    right: 12px;
    left: 12px;
    bottom: auto;

    width: auto;
    max-height: min(420px, calc(100dvh - 92px));

    border-radius: 22px;
    padding: 16px;
  }

  .profile-info div:last-child {
    max-width: calc(100vw - 132px);
  }

  .side-menu {
    width: min(84vw, 320px);
    padding: 18px 14px;
  }

  .side-menu a {
    min-height: 44px;
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .nav {
    padding: 10px 12px;
  }

  .logos {
    height: 31px;
  }

  .menu-btn,
  .cart-btn,
  .profile-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .cartico {
    width: 21px;
    height: 21px;
  }

  .mini-cart,
  .profile-panel {
    top: 66px;
    left: 10px;
    right: 10px;
    max-height: min(390px, calc(100dvh - 84px));
  }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
/* =========================
   NAV ALIGNMENT FIX
   Paste at END of CSS
========================= */

/* Keep navbar above page sections */
.nav {
  z-index: 5000;
  display: flex;
  align-items: center;
}

/* Keep left and right blocks clean */
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Let logo area shrink safely */
.nav-left {
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

.logos {
  display: block;
  flex-shrink: 1;
}

/* Fix ALL nav icon buttons */
.menu-btn,
.cart-btn,
.profile-btn {
  display: grid;
  place-items: center;

  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;

  padding: 0;
  margin: 0;

  line-height: 1;
  flex-shrink: 0;

  border: none;
  border-radius: 999px;

  text-align: center;
  vertical-align: middle;
}

/* Anchor cart button fix */
.cart-btn {
  position: relative;
  overflow: visible;
}

/* Cart image center fix */
.cartico {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
}
.cartico img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Cart number position fix */
#cartCount {
  position: absolute;
  top: -4px;
  right: -4px;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 18px;

  margin: 0;
  padding: 0;

  line-height: 1;
  pointer-events: none;
  border: none;
}

/* Wrapper alignment fix */
.cart-wrapper,
.profile-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Panels should not affect navbar layout */
.mini-cart,
.profile-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  left: auto;

  z-index: 5500;
}

/* Side menu should appear above navbar when opened */
.menu-overlay {
  z-index: 6000;
}

.side-menu {
  z-index: 7000;
}

/* =========================
   MOBILE FIX
========================= */

@media (max-width: 768px) {
  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-left {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 8px;
  }

  .menu-btn,
  .cart-btn,
  .profile-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .cartico {
    width: 22px;
    height: 22px;
  }

  .mobile-menu-btn {
    display: grid;
    order: 3;
  }

  .cart-wrapper {
    order: 1;
  }

  .profile-wrapper {
    order: 2;
  }

  .desktop-menu-btn {
    display: none;
  }

  .mini-cart,
  .profile-panel {
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;

    width: auto;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .menu-btn,
  .cart-btn,
  .profile-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .cartico {
    width: 21px;
    height: 21px;
  }

  .mini-cart,
  .profile-panel {
    top: 66px;
    left: 10px;
    right: 10px;
  }
}

/* =========================
   DESKTOP / MOBILE MENU BUTTON FIX
   Paste at very END of CSS
========================= */

/* Desktop default */
.menu-btn.mobile-menu-btn {
  display: none;
}

.menu-btn.desktop-menu-btn {
  display: grid;
}

/* Mobile */
@media (max-width: 768px) {
  .menu-btn.desktop-menu-btn {
    display: none;
  }

  .menu-btn.mobile-menu-btn {
    display: grid;
  }
}
.cart-wrapper img{
  width: 100%;
  height: 70%;
  object-fit: contain;
}
