/* EarthPure Shop Plugin - Frontend Styles */
:root {
  --ep-green: #4CAF50;
  --ep-green-dark: #388E3C;
  --ep-radius: 12px;
}

/* Cart Sidebar */
#ep-cart-sidebar {
  position: fixed;
  right: -420px;
  top: 0; bottom: 0;
  width: 400px;
  background: #fff;
  z-index: 99999;
  box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  transition: right 0.35s ease;
  display: flex;
  flex-direction: column;
}
#ep-cart-sidebar.open { right: 0; }
#ep-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99998;
  display: none;
}
#ep-cart-overlay.open { display: block; }

.ep-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
}
.ep-cart-header h3 { margin: 0; font-size: 1.1rem; }
.ep-cart-close {
  background: none; border: none;
  cursor: pointer; font-size: 1.5rem; color: #999;
}
.ep-cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.ep-cart-empty { text-align: center; padding: 40px 0; color: #999; }
.ep-cart-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
}
.ep-cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.ep-cart-item-info { flex: 1; }
.ep-cart-item-info h4 { margin: 0 0 4px; font-size: 0.95rem; }
.ep-cart-item-price { color: var(--ep-green); font-weight: 700; }
.ep-cart-item-remove {
  background: none; border: none;
  color: #ccc; cursor: pointer; font-size: 1.2rem;
}
.ep-cart-item-remove:hover { color: #e53935; }
.ep-cart-footer { padding: 20px 24px; border-top: 1px solid #eee; }
.ep-cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.ep-checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--ep-green);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.ep-checkout-btn:hover { background: var(--ep-green-dark); }

/* PayPal Modal */
#ep-checkout-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
}
#ep-checkout-modal.open { display: flex; }
.ep-modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 90%; max-width: 480px;
  position: relative;
}
.ep-modal-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none; border: none;
  font-size: 1.5rem; cursor: pointer; color: #999;
}
.ep-modal-box h3 { margin: 0 0 20px; }
.ep-address-field {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  resize: vertical;
}
.ep-address-field:focus { outline: none; border-color: var(--ep-green); }
#paypal-button-container { min-height: 50px; }

/* Login Modal */
#ep-login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
}
#ep-login-modal.open { display: flex; }

/* Notification toast */
#ep-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ep-green);
  color: #fff;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  z-index: 200000;
  transition: transform 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(76,175,80,0.4);
}
#ep-toast.show { transform: translateX(-50%) translateY(0); }

/* Products Grid */
.ep-products-grid .ep-product-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.ep-products-grid .ep-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
}
.ep-add-to-cart:hover {
  background: var(--ep-green-dark) !important;
}

@media (max-width: 600px) {
  #ep-cart-sidebar { width: 100%; right: -100%; }
}
