/* ========================================
   Grow Labs Cart Plugin CSS
   Matches original Weblium cart design
   ======================================== */

/* Hide the original Weblium shopping cart icon */
.w-shopping-cart,
[class*="shopping-cart-icon_"],
[class*="wrapper_1mY"],
[data-hydrate-id*="shopping-cart"] {
  display: none !important;
}

/* Weblium responsive utility classes (normally from external runtime) */
/* Breakpoints: sm < 576px, md 576-991px, lg 992-1199px, xl 1200+ */
@media (max-width: 575px) {
  .w-hide--sm {
    display: none !important;
  }
}

@media (min-width: 576px) and (max-width: 991px) {
  .w-hide--md {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .w-hide--lg {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  .w-hide--xl {
    display: none !important;
  }
}

/* Hide mobile header on desktop (lg+) */
@media (min-width: 992px) {
  .header--mobile_3ne {
    display: none !important;
  }
}

/* ---- Weblium layout fixes ---- */
.block_1xN>div {
  max-width: 100% !important;
}

.block-background_3D5 {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

[class*="stretched-block_"],
.stretched-block_2iP {
  position: relative !important;
}

.block_1xN svg,
.block-content_3e0 svg {
  max-width: 100%;
  height: auto;
}

.block-content_3e0 {
  position: relative;
  z-index: 1;
}

/* ---- Toast ---- */
.gl-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1a1a2e;
  color: #85fc2f;
  padding: 14px 24px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  z-index: 999999;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: all 0.3s ease;
  border: 1px solid #85fc2f;
  box-shadow: 0 4px 20px rgba(133, 252, 47, 0.2);
}

.gl-toast.gl-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.gl-toast__icon {
  font-size: 18px;
  font-weight: bold;
}

/* ---- Overlay ---- */
.gl-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gl-overlay.gl-active {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Cart Popup (right-side panel like original) ---- */
.gl-cart-popup {
  position: fixed;
  top: 0;
  right: -520px;
  width: 500px;
  max-width: 100vw;
  height: 100vh;
  background: #1c1c2b;
  z-index: 99999;
  transition: right 0.35s ease;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

.gl-cart-popup.gl-active {
  right: 0;
}

/* ---- Popup Header ---- */
.gl-popup__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

.gl-popup__title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-transform: none;
}

.gl-popup__close {
  background: none;
  border: none;
  color: #888;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.gl-popup__close:hover {
  color: #fff;
}

/* ---- Popup Body (scrollable) ---- */
.gl-popup__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* ---- Product Rows ---- */
.gl-product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #2a2a3d;
}

.gl-product-row__info {
  flex: 1;
  min-width: 0;
}

.gl-product-row__name {
  font-size: 14px;
  color: #ddd;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.gl-product-row__qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gl-qty-btn {
  width: 28px;
  height: 28px;
  background: #2a2a3d;
  border: 1px solid #444;
  color: #aaa;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.2s;
}

.gl-qty-btn:hover {
  background: #3a3a4d;
  color: #fff;
}

.gl-qty-input {
  width: 40px;
  height: 28px;
  text-align: center;
  background: #2a2a3d;
  border: 1px solid #444;
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
  -moz-appearance: textfield;
}

.gl-qty-input::-webkit-outer-spin-button,
.gl-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.gl-product-row__right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 16px;
}

.gl-product-row__price {
  font-size: 16px;
  font-weight: 700;
  color: #85fc2f;
  white-space: nowrap;
}

.gl-product-row__remove {
  background: rgba(233, 30, 99, 0.15);
  border: 1px solid rgba(233, 30, 99, 0.4);
  cursor: pointer;
  font-size: 16px;
  padding: 6px 8px;
  border-radius: 6px;
  opacity: 1;
  color: #ff4d6a;
  transition: all 0.2s;
  line-height: 1;
}

.gl-product-row__remove:hover {
  background: rgba(233, 30, 99, 0.35);
  border-color: #e91e63;
  transform: scale(1.1);
}

/* ---- Total ---- */
.gl-popup__total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #2a2a3d;
}

.gl-popup__total-label {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.gl-popup__total-value {
  font-size: 24px;
  font-weight: 700;
  color: #85fc2f;
}

/* ---- Form Section ---- */
.gl-popup__form-section {
  padding: 20px 0;
}

.gl-popup__form-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 16px 0;
}

.gl-field {
  margin-bottom: 14px;
}

.gl-field__label {
  display: block;
  font-size: 13px;
  color: #bbb;
  margin-bottom: 6px;
}

.gl-required {
  color: #ff4757;
}

.gl-field__input,
.gl-field__textarea {
  width: 100%;
  padding: 10px 14px;
  background: #252538;
  border: 1px solid #3a3a4d;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.gl-field__input:focus,
.gl-field__textarea:focus {
  outline: none;
  border-color: #85fc2f;
}

.gl-field__input::placeholder,
.gl-field__textarea::placeholder {
  color: #666;
}

.gl-field__textarea {
  resize: vertical;
  min-height: 60px;
}

/* ---- Payment Section ---- */
.gl-popup__payment-section {
  padding: 16px 0;
  border-top: 1px solid #2a2a3d;
}

.gl-payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #252538;
  border: 1px solid #3a3a4d;
  border-radius: 8px;
  cursor: pointer;
}

.gl-payment-option--active {
  border-color: #85fc2f;
}

.gl-payment-option__radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #85fc2f;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gl-payment-option--active .gl-payment-option__radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #85fc2f;
}

.gl-payment-option__text {
  font-size: 14px;
  color: #ddd;
}

/* ---- ORDER Button ---- */
.gl-popup__order-btn {
  width: 100%;
  padding: 16px;
  background: #e91e8c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.2s;
  margin-top: 20px;
}

.gl-popup__order-btn:hover {
  background: #d1177d;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(233, 30, 140, 0.4);
}

/* ---- Empty Cart ---- */
.gl-cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.gl-cart-empty svg {
  width: 64px;
  height: 64px;
  fill: #555;
  margin-bottom: 16px;
}

.gl-cart-empty p {
  font-size: 16px;
}

/* ---- Success ---- */
.gl-success {
  text-align: center;
  padding: 40px 20px;
}

.gl-success__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.gl-success__title {
  color: #85fc2f;
  font-size: 22px;
  margin: 0 0 16px 0;
}

.gl-success__text {
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
}

/* ---- Floating Cart Icon (replaces Weblium dynamic widget) ---- */
.gl-cart-icon {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #1c1c2b;
  border: 2px solid #85fc2f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99997;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(133, 252, 47, 0.15);
  transition: all 0.2s ease;
}

.gl-cart-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6), 0 0 25px rgba(133, 252, 47, 0.3);
}

.gl-cart-icon svg {
  width: 26px;
  height: 26px;
  color: #85fc2f;
}

.gl-cart-icon__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  background: #e91e8c;
  color: #fff;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* ---- Responsive ---- */
@media (max-width: 520px) {
  .gl-cart-popup {
    width: 100vw;
    right: -100vw;
  }

  .gl-cart-icon {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }

  .gl-cart-icon svg {
    width: 22px;
    height: 22px;
  }
}