/**
 * Hookarish Got Webbed - Floating Cart Styles
 */

/* Cart Trigger Button */
.hgw-floating-cart-trigger {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: #b88114;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(184, 129, 20, 0.4);
  transition: all 0.3s ease;
  z-index: 9999;
}

.hgw-floating-cart-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(184, 129, 20, 0.6);
}

.hgw-cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #000000;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Modal Container */
.hgw-floating-cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: none;
}

.hgw-floating-cart-modal.active {
  display: block;
}

body.hgw-cart-open {
  overflow: hidden;
}

.hgw-cart-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.hgw-cart-container {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 420px;
  max-width: 90%;
  background: white;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Cart Header */
.hgw-cart-header {
  padding: 20px;
  background: linear-gradient(135deg, #b88114 0%, #9a6b0f 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hgw-cart-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  font-family: 'Futurism', sans-serif;
}

button.hgw-cart-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

button.hgw-cart-close:hover {
  transform: rotate(90deg);
}

/* Progress Bar */
.hgw-cart-progress {
  padding: 15px 20px;
  background: #f5f5f5;
  border-bottom: 1px solid #eee;
}

.hgw-sale-notes {
  padding: 15px 20px;
  background: #fffbf0;
  border-bottom: 1px solid #eee;
  position: relative;
  min-height: 24px;
}

.hgw-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  position: relative;
  min-height: 120px;
}

.hgw-cart-body.hgw-is-loading::before,
.hgw-sale-notes.hgw-is-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  margin-left: -15px;
  border: 3px solid rgba(184, 129, 20, 0.2);
  border-top-color: #b88114;
  border-radius: 50%;
  animation: hgw-cart-spin 0.7s linear infinite;
  z-index: 2;
}

.hgw-cart-body.hgw-is-loading::after,
.hgw-sale-notes.hgw-is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  z-index: 1;
}

@keyframes hgw-cart-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hgw-sale-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: white;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 2px dashed #b88114;
  font-family: 'Polin', sans-serif;
  font-size: 14px;
  color: #333;
}

.hgw-sale-note:last-child {
  margin-bottom: 0;
}

.hgw-sale-notes-slider {
  overflow: hidden;
  width: 100%;
}

.hgw-sale-notes-track {
  display: flex;
  width: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}

.hgw-sale-note-slide {
  flex: 0 0 100%;
  min-width: 100%;
}

.hgw-sale-note-slide .hgw-sale-note {
  margin-bottom: 0;
}

.hgw-sale-notes-dots {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

button.hgw-sale-note-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: #d4c9aa;
  padding: 0;
  cursor: pointer;
}

button.hgw-sale-note-dot.is-active {
  background: #b88114;
}

.hgw-sale-note .iconify {
  color: #b88114;
  flex-shrink: 0;
}

.hgw-sale-note-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.hgw-sale-brands-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

button.hgw-sale-brands-trigger {
  border: none;
  background: transparent;
  color: #b88114;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

button.hgw-sale-brands-trigger:hover,
button.hgw-sale-brands-trigger:focus {
  background: transparent;
}

button.hgw-sale-brands-trigger .iconify {
  font-size: 14px;
}

.hgw-sale-brands-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  right: -45px;
  min-width: 220px;
  max-width: 340px;
  background: #ffffff;
  border: 1px solid #e6d19d;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #333;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 10;
  display: none;
  line-height: 1.5;
}

.hgw-sale-brands-tooltip.is-visible {
  display: block;
}

.hgw-sale-brands-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
}

.hgw-sale-brand-chip {
  display: inline-flex;
  align-items: center;
  background: #000000;
  color: #ffffff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.hgw-progress-note {
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #444;
  margin-bottom: 8px;
  font-family: 'Polin', sans-serif;
}

.hgw-progress-bar-wrapper {
  height: 24px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.hgw-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b88114 0%, #d4a434 100%);
  transition: width 0.4s ease;
}

.hgw-progress-bar-text {
  position: absolute;
  width: 100%;
  text-align: center;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: white;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-family: 'Polin', sans-serif;
}

/* Empty Cart */
.hgw-empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.hgw-empty-cart p {
  margin: 20px 0;
  font-size: 16px;
  color: #666;
  font-family: 'Polin', sans-serif;
}

.hgw-continue-shopping {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #b88114;
  color: white !important;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-family: 'Futurism', sans-serif;
  transition: all 0.3s ease;
}

.hgw-continue-shopping:hover {
  background: #9a6b0f;
  color: white !important;
  transform: translateY(-2px);
}

/* Cart Items */
.hgw-cart-items {
  padding: 0;
}

.hgw-cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  position: relative;
  transition: background 0.2s ease;
}

.hgw-cart-item:hover {
  background: #f9f9f9;
}

.hgw-item-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
}

.hgw-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hgw-item-details {
  flex: 1;
  min-width: 0;
}

.hgw-item-name {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 94%;
  font-size: 14px;
}

.hgw-item-name a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  font-family: 'Polin', sans-serif;
}

.hgw-item-name a:hover {
  color: #b88114;
}

.hgw-free-badge {
  display: inline-flex;
  padding: 2px 8px;
  background: #000;
  color: white;
  font-size: 11px;
  font-weight: bold;
  border-radius: 4px;
  font-family: 'Polin', sans-serif;
}

.hgw-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hgw-item-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-size: 14px;
  color: #b88114;
  font-weight: 600;
  font-family: 'Polin', sans-serif;
}

.hgw-item-sale-price {
  display: inline-flex;
  font-size: 12px;
  color: grey;
  font-weight: 400;
  text-decoration: line-through;
  font-family: 'Polin', sans-serif;
}

.hgw-item-regular-price {
  font-size: 13px;
  color: #b88114;
}

.hgw-item-price del {
  opacity: 0.7;
}

.hgw-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  border-radius: 6px;
  padding: 4px;
}

button.hgw-qty-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: white;
  color: #b88114;
  font-size: 16px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Futurism', sans-serif;
}

button.hgw-qty-btn:hover {
  background: #b88114;
  color: white;
}

.hgw-qty-value {
  min-width: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Polin', sans-serif;
}
input.hgw-qty-input {
  min-width: 40px;
  width: 40px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Polin', sans-serif;
  border: none;
  background: transparent;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

input.hgw-qty-input:focus {
  outline: none;
  background: white;
  box-shadow: 0 0 0 2px #b88114;
}
.hgw-item-subtotal {
  font-size: 15px;
  font-weight: bold;
  color: #333;
  margin-right: auto;
  font-family: 'Polin', sans-serif;
}

button.hgw-item-remove {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 18px;
  padding: 0;
  height: 18px;
  background: transparent;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: black;
  font-size: 24px;
}

button.hgw-item-remove:hover {
  color: #a02020;
  transform: scale(1.1);
}

/* Cart Footer */
.hgw-cart-footer {
  padding: 20px;
  background: #f9f9f9;
  border-top: 2px solid #eee;
}

.hgw-cart-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

button.hgw-empty-cart-btn {
  background: transparent;
  border: none;
  color: black;
  font-size: 14px;
  font-family: 'Polin', sans-serif;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: opacity 0.2s ease;
}

button.hgw-empty-cart-btn:hover {
  opacity: 0.7;
}

.hgw-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  margin-bottom: 15px;
  font-family: 'Polin', sans-serif;
}

.hgw-cart-total strong {
  color: #b88114;
  font-size: 18px;
  font-family: 'Polin';
}

.hgw-cart-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #b88114 0%, #9a6b0f 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: 'Futurism', sans-serif;
}

.hgw-cart-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 129, 20, 0.4);
  background: black;
  color: white;
}

@media (max-width: 1023px) {
  .hgw-floating-cart-trigger {
    bottom: 12px;
    left: 12px;
    width: 48px;
    height: 48px;
  }
  .hgw-floating-cart-trigger svg {
    width: 24px;
    height: 24px;
  }

  .hgw-cart-count {
    font-size: 10px;
    font-weight: 100;
    width: 20px;
    height: 20px;
  }
}
