/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {
  /**
   * colors
   */
  --spanish-gray: hsl(0, 0%, 60%);
  --sonic-silver: hsl(0, 0%, 47%);
  --eerie-black: hsl(0, 0%, 13%);
  --salmon-pink: #267D50;
  --sandy-brown: hsl(29, 90%, 65%);
  --bittersweet: #3F8A6E;
  --ocean-green: hsl(152, 51%, 52%);
  --davys-gray: hsl(0, 0%, 33%);
  --cultured: hsl(0, 0%, 93%);
  --white: hsl(0, 100%, 100%);
  --onyx: hsl(0, 0%, 27%);

  /**
   * typography
   */
  --fs-1: 1.563rem;
  --fs-2: 1.375rem;
  --fs-3: 1.25rem;
  --fs-4: 1.125rem;
  --fs-5: 1rem;
  --fs-6: 0.938rem;
  --fs-7: 0.875rem;
  --fs-8: 0.813rem;
  --fs-9: 0.75rem;
  --fs-10: 0.688rem;
  --fs-11: 0.625rem;

  --weight-300: 300;
  --weight-400: 400;
  --weight-500: 500;
  --weight-600: 600;
  --weight-700: 700;

  /**
   * border-radius
   */
  --border-radius-md: 10px;
  --border-radius-sm: 5px;

  /**
   * transition
   */
  --transition-timing: 0.2s ease;
}

/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

li {
  list-style: none;
}

button {
  background: none;
  font: inherit;
  border: none;
  cursor: pointer;
}

img,
ion-icon,
button,
a {
  display: block;
}

span {
  display: inline-block;
}

html {
  font-family: "Poppins", sans-serif;
  overscroll-behavior: contain;
}

input {
  display: block;
  width: 100%;
  font: inherit;
}

input::placeholder {
  font: inherit;
}

body {
  background: var(--white);
  /* 💡 FIX: Increased padding to a very safe value to ensure banner clears the stacked fixed header on small screens. */
  padding-top: 100px;
}

/*-----------------------------------*\
  #HEADER (FIXED POSITION & REDUCED HEIGHT)
\*-----------------------------------*/

/* CRITICAL: Make the entire header fixed and on top of all content */
#header-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-top,
.header-user-actions,
.desktop-navigation-menu {
  display: none;
}

.header-main {
  /* 💡 REDUCED HEIGHT: Global padding reduced from 20px 0 to 10px 0 */
  padding: 10px 0;
  border-bottom: 1px solid var(--cultured);
}

.header-logo {
  margin-bottom: 20px;
}

.header-logo img {
  margin: auto;
}

.header-search-container {
  position: relative;
}

.header-search-container .search-field {
  font-size: var(--fs-7);
  color: var(--onyx);
  padding: 10px 15px;
  padding-right: 50px;
  border: 1px solid var(--cultured);
  border-radius: var(--border-radius-md);
}

.search-field::-webkit-search-cancel-button {
  display: none;
}

.search-btn {
  background: var(--white);
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
  color: var(--onyx);
  font-size: 18px;
  padding: 8px 15px;
  border-radius: var(--border-radius-md);
  transition: color var(--transition-timing);
}

.search-btn:hover {
  color: var(--salmon-pink);
}

.mobile-bottom-navigation {
  background: var(--white);
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  margin: auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 5px 0;
  box-shadow: 0 0 10px hsla(0, 0%, 0%, 0.25);
  z-index: 5;
}

.mobile-bottom-navigation .action-btn {
  position: relative;
  font-size: 26px;
  color: var(--eerie-black);
  padding: 10px;
}

.mobile-bottom-navigation .count {
  background: var(--bittersweet);
  color: var(--white);
  position: absolute;
  top: 0;
  right: 0;
  font-size: 12px;
  font-weight: var(--weight-500);
  line-height: 1;
  padding: 2px 4px;
  border-radius: 20px;
}

.mobile-navigation-menu {
  background: var(--white);
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  padding: 20px;
  box-shadow: 0 0 10px hsla(0, 0%, 0%, 0.1);
  overflow-y: scroll;
  overscroll-behavior: contain;
  visibility: hidden;
  transition: 0.5s ease;
  z-index: 20;
}

.mobile-navigation-menu.active {
  left: 0;
  visibility: visible;
}

.menu-top {
  padding-bottom: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--cultured);
}

.menu-top .menu-title {
  color: var(--salmon-pink);
  font-size: var(--fs-4);
  font-weight: var(--weight-600);
}

.menu-close-btn {
  color: var(--eerie-black);
  font-size: 22px;
}

.menu-close-btn ion-icon {
  --ionicon-stroke-width: 50px;
}

.mobile-menu-category-list {
  margin-bottom: 30px;
}

.menu-category .accordion-menu {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu-category-list .menu-category {
  border-bottom: 1px solid var(--cultured);
}

.mobile-menu-category-list .menu-title {
  color: var(--onyx);
  font-size: var(--fs-6);
  font-weight: var(--weight-500);
  padding: 12px 0;
}

.accordion-menu > div {
  font-size: 14px;
}

.accordion-menu ion-icon {
  color: var(--onyx);
  --ionicon-stroke-width: 90px;
}

.accordion-menu.active .add-icon,
.accordion-menu .remove-icon {
  display: none;
}

.accordion-menu .add-icon,
.accordion-menu.active .remove-icon {
  display: block;
}

.menu-category .submenu-category-list {
  margin-left: 10px;
}

.submenu-title {
  padding: 6px 0;
  font-size: var(--fs-6);
  color: var(--sonic-silver);
  font-weight: var(--weight-300);
}

.submenu-title:hover {
  color: var(--davys-gray);
}

.submenu-category-list {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: 0.5s ease-in-out;
}

.submenu-category-list.active {
  max-height: 148px;
  visibility: visible;
}

.menu-bottom .menu-category-list {
  margin-bottom: 20px;
}

.menu-bottom .menu-category {
  border-bottom: none;
}

.menu-bottom .menu-title {
  font-size: var(--fs-6);
  font-weight: var(--weight-500);
  color: var(--eerie-black);
  padding: 12px 0;
}

.accordion-menu.active .caret-back {
  transform: rotate(-0.25turn);
}

.menu-bottom .submenu-category-list {
  border: 1px solid var(--cultured);
  border-radius: var(--border-radius-md);
  padding: 0 15px;
  margin-left: 0;
  box-shadow: 0 0 10px hsla(0, 0%, 0%, 0.05);
}

.menu-bottom .submenu-category:not(:last-child) {
  border-bottom: 1px solid var(--cultured);
}

.menu-social-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.menu-social-container .social-link {
  background: var(--cultured);
  color: var(--eerie-black);
  font-size: 20px;
  padding: 10px;
  border-radius: var(--border-radius-md);
}

.go-to-bag-btn {
    background-color: var(--sonic-silver);
    color: var(--white);
    padding: 10px 15px;
    border-radius: var(--border-radius-md);
    font-weight: var(--weight-600);
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.go-to-bag-btn:hover {
    background-color: var(--eerie-black);
}


/*-----------------------------------*\
  #RESPONSIVE
\*-----------------------------------*/

/**
 * responsive larger than 480px screen
 */
@media (min-width: 480px) {
  /* #CUSTOM PROPERTY */
  :root {
    /**
     * typography
     */
    --fs-1: 1.875rem;
  }

  /* #HEADER */
  .header-top {
    display: block;
    /* 💡 REDUCED HEIGHT: Changed from 10px 0 to 5px 0 */
    padding: 5px 0;
    border-bottom: 1px solid var(--cultured);
  }

  .header-social-container,
  .header-top-actions {
    display: none;
  }

  .header-alert-news {
    color: var(--sonic-silver);
    font-size: var(--fs-9);
    text-transform: uppercase;
  }

  .header-alert-news b {
    font-weight: var(--weight-500);
  }

  .header-main {
    /* 💡 REDUCED HEIGHT: Changed from 25px 0 to 10px 0 */
    padding: 10px 0;
  }

  .mobile-bottom-navigation {
    border-top-left-radius: var(--border-radius-md);
    border-top-right-radius: var(--border-radius-md);
  }
}

/**
 * responsive larger than 570px screen
 */
@media (min-width: 570px) {
  /* #HEADER */
  .header-top .container,
  .header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-logo {
    margin-bottom: 0;
  }

  .header-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .header-top-actions select {
    border: none;
    display: block;
    min-width: 80px;
    padding: 5px 0;
    font: inherit;
    color: var(--sonic-silver);
    font-size: var(--fs-8);
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-timing);
  }

  .header-top-actions select:hover {
    color: var(--eerie-black);
  }

  .header-search-container {
    min-width: 300px;
  }
}

/**
 * responsive larger than 768px screen
 */
@media (min-width: 768px) {
  /* #CUSTOM PROPERTY */
  :root {
    /**
     * typography
     */
    --fs-1: 2.375rem;
  }

  /* #BASE */
  html {
    font-size: 17px;
  }

  /* #REUSED STYLE */
  .container {
    max-width: 750px;
    margin: auto;
  }

  /* #MODAL */
  .modal-content {
    display: flex;
    align-items: center;
    max-width: 750px;
    width: fit-content;
  }

  /* #HEADER */
  .header-main .container {
    gap: 80px;
  }

  .header-search-container {
    flex-grow: 1;
  }
}

/**
 * responsive larger than 1024px screen
 */
@media (min-width: 1024px) {
  /* #CUSTOM PROPERTY */
  :root {
    /**
     * typography
     */
    --fs-1: 2.625rem;
    --fs-2: 1.125rem;
  }

  /* #REUSED STYLE */
  .container {
    max-width: 980px;
  }

  /* #NOTIFICATION TOAST */
  .notification-toast {
    bottom: 30px;
  }
  
  /* 💡 FIX: Reduce body padding for desktop screens where the header is shorter. */
  body {
    padding-top: 95px; 
  }

  /* #HEADER */
  .header-social-container {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .header-social-container .social-link {
    padding: 5px;
    background: hsl(0, 0%, 95%);
    border-radius: var(--border-radius-sm);
    color: var(--sonic-silver);
    transition: var(--transition-timing);
  }

  .header-social-container .social-link:hover {
    background: var(--salmon-pink);
    color: var(--white);
  }

  .header-user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .header-user-actions .action-btn {
    position: relative;
    font-size: 35px;
    color: var(--onyx);
    padding: 5px;
  }

  .header-user-actions .count {
    position: absolute;
    top: -2px;
    right: -3px;
    background: var(--bittersweet);
    color: var(--white);
    font-size: 12px;
    font-weight: var(--weight-500);
    line-height: 1;
    padding: 2px 4px;
    border-radius: 20px;
  }

  .desktop-navigation-menu {
    display: block;
  }

  .desktop-menu-category-list {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
  }

  .desktop-menu-category-list .menu-category:not(:nth-child(2)) {
    position: relative;
  }

  .desktop-menu-category-list .menu-category > .menu-title {
    position: relative;
    color: var(--onyx);
    font-size: var(--fs-7);
    font-weight: var(--weight-600);
    text-transform: uppercase;
    padding: 15px 0;
    transition: var(--transition-timing);
  }

  .desktop-menu-category-list .menu-category > .menu-title:hover {
    color: var(--salmon-pink);
  }

  .desktop-menu-category-list .menu-category > .menu-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--salmon-pink);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-timing);
  }

  .desktop-menu-category-list .menu-category > .menu-title:hover::after {
    transform: scaleX(1);
  }

  .dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 30px;
    border: 1px solid var(--cultured);
    box-shadow: 0 3px 5px hsla(0, 0%, 0%, 0.1);
    border-radius: var(--border-radius-md);
    transform: translateY(50px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: var(--transition-timing);
    z-index: 5;
  }

  .desktop-menu-category-list .menu-category:hover > .dropdown-panel {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  .dropdown-panel-list .menu-title a {
    color: var(--onyx);
    font-size: var(--fs-7);
    font-weight: var(--weight-600);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cultured);
    margin-bottom: 10px;
  }

  .panel-list-item a {
    color: var(--sonic-silver);
    font-size: var(--fs-7);
    text-transform: capitalize;
    transition: var(--transition-timing);
  }

  .panel-list-item a:hover {
    color: var(--salmon-pink);
  }

  .panel-list-item:not(:last-child) a {
    padding: 4px 0;
  }

  .panel-list-item:last-child {
    margin-top: 20px;
  }

  .panel-list-item img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
  }

  .dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background: var(--white);
    padding: 20px 0;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--cultured);
    box-shadow: 0 3px 5px hsla(0, 0%, 0%, 0.1);
    transform: translateY(50px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: var(--transition-timing);
    z-index: 5;
  }

  .desktop-menu-category-list .menu-category:hover > .dropdown-list {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  .dropdown-list .dropdown-item a {
    color: var(--sonic-silver);
    font-size: var(--fs-7);
    text-transform: capitalize;
    padding: 4px 20px;
    transition: var(--transition-timing);
  }

  .dropdown-list .dropdown-item a:hover {
    color: var(--salmon-pink);
  }

  .mobile-bottom-navigation {
    display: none;
  }
}

/**
 * responsive larger than 1200px screen
 */
@media (min-width: 1200px) {
  /* #REUSED STYLE */
  .container {
    max-width: 1200px;
  }

  /* #HEADER */
  .desktop-menu-category-list {
    gap: 45px;
  }
}

/**
 * responsive larger than 1400px screen
 */
@media (min-width: 1400px) {
  /* #BASE */
  html {
    font-size: 18px;
  }

  /* #REUSED STYLE */
  .container {
    max-width: 1350px;
  }
}

/*-----------------------------------*\
  #PRODUCT AND CART STYLES
\*-----------------------------------*/

.add-to-cart-btn,
.added-to-cart-btn {
  background-color: #ff9900;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-action.heart-active ion-icon {
  color: rgb(234, 105, 105);
  transition: color 0.3s ease;
}

.btn-action ion-icon {
  font-size: 20px;
  cursor: pointer;
}

/* --- Product Image Uniform Size Fix --- */
.product-card img,
.product-item img,
.product-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.product-card,
.product-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 420px;
}

/*-----------------------------------*\
  #USER DROPDOWN STYLES
\*-----------------------------------*/

.user-profile-dropdown-container {
    position: relative;
    padding: 10px 0;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 15px;
}

.user-profile-dropdown-container:hover .user-dropdown-content {
    display: block;
}

.dropdown-header {
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.dropdown-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-color, #333);
}

.dropdown-header p {
    margin: 3px 0 0 0;
    font-size: 12px;
    color: var(--label-color, #666);
}

.login-signup-btn {
    display: block;
    width: 100%;
    padding: 8px 15px;
    margin-bottom: 15px;
    background-color: #fff;
    border: 1px solid var(--primary-color, #ff3366);
    color: var(--primary-color, #ff3366);
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.login-signup-btn:hover {
    background-color: #fce4ec;
}

.dropdown-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu-list li a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-color, #333);
    text-decoration: none;
    transition: font-weight 0.1s;
}

.dropdown-menu-list li a:hover {
    font-weight: 700;
}

/*-----------------------------------*\
  #FLOATING CHATBOT (FIXED)
\*-----------------------------------*/

#chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background-color: var(--salmon-pink);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  z-index: 999999;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

#chatbot-widget:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

#chatbot-box {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 350px;
  height: 450px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 999998;
}

#chatbot-box.active {
  display: flex;
}

/*-----------------------------------*\
  #BANNER COMPONENT STYLES (Image Fix)
\*-----------------------------------*/

#banner-container {
    /* Ensure the container has enough height to avoid excessive cropping */
    height: 350px;
    overflow: hidden;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This ensures the top of the image (where the face is) is prioritized */
    object-position: top;
}
