/* Header Search & Cart Components Styles */

/* ============================================
   SEARCH FORM STYLES
   ============================================ */

/* Search Form Overlay */
.header-search-icon .search-form-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Search Form Container */
.header-search-icon .search-form {
  position: relative;
  background: white;
  border-radius: 10px;
  padding: 60px 40px;
  max-width: 600px;
  width: 90%;
  margin: 0 auto;
}

/* Search Close Button */
.header-search-icon .search-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  z-index: 10001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.header-search-icon .search-close:hover {
  color: #000;
  transform: rotate(90deg);
}

/* Search Form Box */
.header-search-icon .search-form-box {
  text-align: center;
}

/* Search Form Title */
.header-search-icon .search-form-box h2 {
  margin-bottom: 30px;
}

/* Input Wrapper - container for input and button */
.header-search-icon .search-input-wrapper {
  position: relative;
  width: 100%;
}

/* Search Input Field */
.header-search-icon .search-input {
  width: 100%;
  padding: 15px 140px 15px 20px;
  border: 2px solid #eee;
  border-radius: 50px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
}

.header-search-icon .search-input:focus {
  border-color: var(--primary-color, #d4af37);
}

/* Search Button - positioned inside the input wrapper */
.header-search-icon .search-button {
  background: var(--primary-color, #d4af37);
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search-icon .search-button:hover {
  background: var(--primary-color-dark, #b8941f);
}

/* Search Icon Position Adjustment */
.header-search-icon .search-button .feather.icon-feather-search {
  font-size: 18px;
}

/* Desktop: Slightly more padding on larger screens */
@media (min-width: 992px) {
  .header-search-icon .search-input {
    padding: 18px 160px 18px 25px;
  }

  .header-search-icon .search-button {
    right: 8px;
    padding: 14px 32px;
  }
}

/* ============================================
   CART ICON STYLES
   ============================================ */

.header-cart-icon {
  position: relative;
  margin-left: 15px;
}

.header-cart-icon .cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary-color, #d4af37);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
}

/* ============================================
   CART PANEL STYLES
   ============================================ */

.cart-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  z-index: 10000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.cart-panel.active {
  right: 0;
}

.cart-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cart-panel-overlay.active {
  display: block;
  opacity: 1;
}

.cart-panel-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.cart-panel-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
}

.cart-panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cart-panel-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-panel-footer {
  border-top: 1px solid #eee;
  padding: 20px;
}

.cart-panel-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 16px;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablet & Mobile */
@media (max-width: 768px) {
  .header-icon {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .header-search-icon,
  .header-cart-icon {
    margin-left: 0;
  }

  .cart-panel {
    width: 100vw;
    right: -100vw;
  }

  .header-search-icon .search-form {
    width: 95%;
    padding: 30px 20px;
  }

  /* Make search input have more padding on mobile to avoid icon overlap */
  .header-search-icon .search-input {
    padding: 15px 70px 15px 20px;
  }
}

/* Small Screens */
@media (max-width: 576px) {
  .header-icon {
    gap: 5px;
  }

  .header-search-icon .search-form {
    padding: 20px 15px;
  }
}
