/* ==========================================================================
   1. Box Sizing & CSS Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  color: #1a1a1a;
  background-color: #ffffff;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   2. Unified Responsive Container (Max-width: 1320px)
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 24px;
  }
}

@media (min-width: 1280px) {
  .container {
    padding-inline: 20px;
  }
}

/* ==========================================================================
   3. Header Component (Desktop Version)
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 83px;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid #F3F4F6;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 22.5px;
  color: #4B5563;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #111827;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #F3F4F6;
  border: 1px solid #F3F4F6;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.desktop-search {
  width: 256px;
  height: 42px;
  border-radius: 9999px;
  padding: 0 16px;
}

.search-box:focus-within {
  background-color: #ffffff;
  border-color: #d1d5db;
}

.search-icon {
  flex-shrink: 0;
  margin-right: 8px;
  display: block;
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.search-input::placeholder {
  color: #9CA3AF;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.action-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  color: #1A1A1A;
  transition: opacity 0.2s ease;
}

.action-btn:hover {
  opacity: 0.75;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #A81894 0%, #7B1FA2 45%, #2962FF 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid white;
}

.mobile-menu-btn,
.mobile-search-row {
  display: none;
}

/* ==========================================================================
   4. Header Mobile Responsive (max-width: 900px)
   ========================================================================== */
@media (max-width: 900px) {
  .header {
    height: auto;
    padding: 12px 0 10px 0;
  }

  .header-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    row-gap: 12px;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    grid-column: 1;
    width: 28px;
    height: 28px;
  }

  .mobile-menu-btn svg {
    display: block;
    flex-shrink: 0;
  }

  .logo {
    grid-column: 2;
    justify-self: center;
  }

  .logo-img {
    height: 24px;
  }

  .header-actions {
    grid-column: 3;
    justify-self: end;
    gap: 0;
  }

  .nav-menu,
  .desktop-search,
  .wishlist-btn {
    display: none !important;
  }

  .mobile-search-row {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
  }

  .mobile-search-row .search-box {
    width: 100%;
    height: 36px;
    border-radius: 12px;
    padding: 0 12px;
  }

  .mobile-search-row .search-input {
    font-size: 14px;
    font-weight: 400;
  }

  .cart-badge {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
}

/* ==========================================================================
   5. Footer Component (Desktop Version)
   ========================================================================== */
.footer {
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid #F9FAFB;
  padding-top: 80px;
  padding-bottom: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
}

.footer-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}

.about-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 26px;
  color: #6B7280;
  max-width: 280px;
  letter-spacing: 0%;
}

.footer-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: #1A1A1A;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-link {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: #6B7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #111827;
}

.newsletter-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #6B7280;
  margin-bottom: 16px;
}

.newsletter-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 272px;
  height: 58px;
  background-color: #F3F4F6;
  border: 1px solid #F3F4F6;
  border-radius: 16px;
  padding: 9px;
  box-sizing: border-box;
}

.newsletter-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1A1A1A;
  padding-left: 7px;
}

.newsletter-input::placeholder {
  color: #9CA3AF;
  font-weight: 700;
}

.newsletter-btn {
  width: 78.23px;
  height: 40px;
  background: linear-gradient(135deg, #FF007A 0%, #8A2BE2 50%, #0070FF 100%);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.newsletter-btn:hover {
  opacity: 0.9;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid #F3F4F6;
}

.copyright-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #9CA3AF;
}

.dev-link {
  color: #6B7280;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dev-link:hover {
  color: #111827;
  text-decoration: underline;
}

/* ==========================================================================
   6. Footer Tablet & Mobile Responsive (Pixel to Pixel Figma Specs)
   ========================================================================== */
@media (max-width: 1024px) and (min-width: 641px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
  }
}

@media (max-width: 640px) {
  body {
    background-color: #F8F9FA;
  }

  .footer {
    background-color: inherit;
    border-top: none;
    padding: 16px 8px 75px 8px;
  }

  .footer-container {
    padding-inline: 0;
    max-width: 100%;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 0;
    width: 100%;
    max-width: 334px;
    margin: 0 auto 24px auto;
  }

  .footer-about {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 20px;
    width: 100%;
  }

  .footer-logo {
    display: inline-block;
    margin-bottom: 8px;
  }

  .footer-logo-img {
    height: 28px;
    width: auto;
  }

  .about-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 10.73px;
    font-weight: 400;
    line-height: 17.44px;
    color: #6B7280;
    text-align: left;
    max-width: 342.33px;
    margin: 0;
  }

  .footer-heading,
  .footer-newsletter {
    display: none !important;
  }

  .footer-col:nth-child(2),
  .footer-col:nth-child(3) {
    width: 100%;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    margin: 0;
  }

  /* 1st Column Left-Aligned */
  .footer-col:nth-child(2) .footer-links {
    align-items: flex-start;
    text-align: left;
  }

  /* 2nd Column Right-Aligned */
  .footer-col:nth-child(3) .footer-links {
    align-items: flex-end;
    text-align: right;
  }

  .footer-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11.8px;
    font-weight: 700;
    line-height: 17.71px;
    color: #4B5563;
    display: block;
    white-space: nowrap;
  }

  .footer-bottom {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 16px;
    border-top: none;
    text-align: center;
    width: 100%;
    max-width: 342.33px;
    margin-inline: auto;
  }

  .payment-icons {
    display: flex;
    justify-content: center;
    opacity: 0.4;
  }

  .payment-icons svg {
    width: 24px;
    height: 13px;
  }

  .copyright-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 9.66px;
    font-weight: 400;
    line-height: 14.49px;
    color: #9CA3AF;
    text-align: center;
  }

  .dev-link {
    font-size: 9.66px;
  }
}

/* ==========================================================================
   7. Mobile Floating Bottom Navigation Bar
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 57px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid #F3F4F6;
    border-top-left-radius: 35px;
    border-top-right-radius: 35px;
    box-shadow: 0px -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .bottom-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    text-decoration: none;
  }

  .active-indicator {
    width: 35px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, #FF007A 0%, #8A2BE2 50%, #0070FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(255, 0, 122, 0.25);
  }

  .bottom-nav-item svg {
    display: block;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   8. Mobile Drawer Sidebar (Pixel-to-Pixel Specs)
   ========================================================================== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 294px;
  max-width: 85vw;
  height: 100vh;
  background: #ffffff;
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
  border-right: 1px solid #E5E7EB;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 24px 16px 24px 22px;
  box-sizing: border-box;
}

.mobile-sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.sidebar-logo-img {
  height: 28px;
  width: auto;
}

.sidebar-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  background-color: #ffffff;
  border: 1px solid #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sidebar-close-btn:hover {
  background-color: #F9FAFB;
}

.sidebar-menu-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 6px;
}

.sidebar-menu-list::-webkit-scrollbar {
  width: 6px;
}

.sidebar-menu-list::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-menu-list::-webkit-scrollbar-thumb {
  background: #D1D1D1;
  border-radius: 10px;
}

.menu-item-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 234.66px;
}

.menu-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 234.66px;
  min-height: 52.89px;
  height: 52.89px;
  padding: 0 14px 0 10px;
  border-radius: 17.31px;
  background-color: #ffffff;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

.menu-item-group.open .menu-item-header {
  background-color: #FFE9F7;
}

.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Icon Box (32.7px x 33.66px, Radius: 8.66px) */
.item-icon-box {
  width: 32.7px;
  height: 33.66px;
  border-radius: 8.66px;
  background-color: #D1D1D1;
  color: #4B5563;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s ease, color 0.25s ease;
}

.item-icon-box svg {
  display: block;
}

.menu-item-group.open .item-icon-box {
  background: linear-gradient(135deg, #FF007A 0%, #8A2BE2 50%, #0070FF 100%);
  color: #ffffff;
}

.item-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}

.accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.toggle-icon {
  position: relative;
  width: 11px;
  height: 2px;
  background-color: #9CA3AF;
  border-radius: 17px;
  display: block;
}

.toggle-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  height: 2px;
  background-color: #9CA3AF;
  border-radius: 17px;
  transform: rotate(90deg);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.menu-item-group.open .toggle-icon::after {
  transform: rotate(0deg);
  opacity: 0;
}

.submenu-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 26px;
  border-left: 1px solid #E5E7EB;
  padding-left: 17px;
}

.menu-item-group.open .submenu-wrapper {
  max-height: 300px;
  padding-top: 10px;
  padding-bottom: 6px;
}

.submenu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.submenu-link {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 19.89px;
  color: #464646;
  letter-spacing: -0.83px;
  text-decoration: none;
  display: block;
  transition: color 0.2s ease;
}

.submenu-link:hover {
  color: #FF007A;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  flex-shrink: 0;
}

.sidebar-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 234.66px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FF007A 0%, #8A2BE2 50%, #0070FF 100%);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(255, 0, 122, 0.25);
  transition: opacity 0.2s ease;
}

.sidebar-auth-btn:hover {
  opacity: 0.92;
}